V2 backport - modern-UI for harmony + few small features (rev 10)#15
Open
barakbl wants to merge 3 commits into
Open
V2 backport - modern-UI for harmony + few small features (rev 10)#15barakbl wants to merge 3 commits into
barakbl wants to merge 3 commits into
Conversation
- New floating glass toolbar: single colour swatch, brush selector, brush-size slider, save, clear; overflow (...) menu with theme, background colour and .harmony download/upload; about moved to the bar. - Light/dark theme (auto/light/dark), persisted; design-token styling. - Reusable glass modal (keyboard-operable, defaults to the safe choice) replacing native confirm() for Clear and the import overwrite warning. - .harmony project format (zip via vendored fflate): image.png + map.json (brush point map) + manifest.json (date, selected_brush, canvas dims). Upload validates the PNG header (anti-bomb), the image<->manifest size coordination, and the point map (count/bounds). - Brush-size slider kept in sync with the d/f shortcuts. Co-authored-by: @barakbl
- Grip handle on the left of the toolbar drags it anywhere (pointer capture, clamped to the viewport); resize stops re-centering once moved. - Zoom: CSS-transform the canvas (translate(pan) scale(zoom)); ctrl+scroll zooms toward the cursor, zoom % pill shows the level and resets on click. Input coordinates are converted via screenToCanvas so strokes and the eyedropper stay accurate at any zoom. - About lists the ctrl+scroll zoom shortcut.
- Remove the brush-size glyph, shrink the size slider (84->66px). - Add a <=640px media query that tightens the toolbar (smaller buttons, slider, gaps, brush pill) so it fits narrow phones (~374px wide). - Pinch-to-zoom: two-finger touch zooms toward the pinch midpoint via the existing zoom transform; single-touch drawing is unaffected.
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.
A a refreshed UI, based on changed in v2 fork and my Nekudot re-implementation of the idea (other repo).
Kept intentionally minimal — the goal was a nicer shell without losing the simplicity that makes Harmony great at its core
Live preview: https://barakbl.github.io/harmony/test_backport/ (will delete after merge or close).
What's included:
.harmonydownload/upload..harmonyproject files — a zip of the PNG + brush point map + manifest, with safe-open checks.The brushes and drawing engine are unchanged from upstream.
Some notes not related to this PR. 2 bugs(?) found:
Tested with: IPHONE pro, SAFARI+Chrome (OSX).
attched screenshots