Skip to content

V2 backport - modern-UI for harmony + few small features (rev 10)#15

Open
barakbl wants to merge 3 commits into
mrdoob:masterfrom
barakbl:v2_backport
Open

V2 backport - modern-UI for harmony + few small features (rev 10)#15
barakbl wants to merge 3 commits into
mrdoob:masterfrom
barakbl:v2_backport

Conversation

@barakbl

@barakbl barakbl commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

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:

  • Floating toolbar: drag handle, colour swatch, brush picker, size slider, zoom indicator.
  • ⋯ menu -> light/dark theme, background colour, About, and .harmony download/upload.
  • Zoom via ctrl+scroll (desktop) and pinch (mobile); toolbar shrinks to fit narrow screens.
  • .harmony project 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:

  • blog post link in about the idea (in about modal) -> dead link
  • alt (nothing happend on my OSX machine)

Tested with: IPHONE pro, SAFARI+Chrome (OSX).

attched screenshots

iphone menu iphone clear modal menus_dark menus_lite upload  harmony ovveride modal

barakbl added 3 commits July 11, 2026 22:27
- 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant