Add Unit Converter tool - #10
Merged
Merged
Conversation
A single-file, fully offline unit converter covering the everyday categories people actually convert: length, weight, temperature, volume, area, speed, time, and digital storage. - Live two-way conversion (edit either field), a swap control, an equation echo, and a quick-reference list of the value in every unit. - Pure in-browser arithmetic (no network, no libraries); temperature handled with explicit offset formulas. Last category/units persist in localStorage under `unit-converter:v1`. - Styled to the Hillnote design system: azure primary, cool-mist canvas, Manrope 900 display, 24px card radius. - Registered in tools.json (version 1) and catalogVersion bumped to 21; screenshots/unit-converter.webp added. `npm run validate` passes. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0112G97ct4QHnyU8Ldb7zEjr
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What is this tool?
Unit Converter — a single-file, fully offline converter for the everyday quantities people actually reach for: length, weight, temperature, volume, area, speed, time, and digital storage. Pick a category, type in either field, and the other side updates live. It's for anyone in a note or draft who needs "how many km is 5 miles?" without leaving the workspace or opening a browser tab.
Highlights:
localStorageunderunit-converter:v1.#4d63ff, cool-mist canvas, Manrope 900 display, 24px card radius, per the Hillnote design system.Checklist
unit-converter/index.htmlwith all CSS + JS inline.fetch, orimport. All math is done in-browser.screenshots/unit-converter.webp(vianpm run screenshot unit-converter).tools.json(dir=unit-converter, matches the folder).catalogVersion(20 → 21).version: 1.npm run validatepasses locally (✓ catalog valid — 27 tool(s), catalogVersion 21).Notes for reviewers
toPrecision(8)(stripping trailing zeros) and falls back to exponential notation for very small/large magnitudes, so results stay readable across, e.g., milligrams and tonnes.textContent.main), so the branch-level diff includes it too. My commitAdd Unit Converter toolis self-contained to the new tool — the Metronome change drops out of this diff once its own PR lands inmain.Generated by Claude Code