Skip to content

fix: mobile interface bugs + text-derived export filenames#14

Merged
dani-polani merged 1 commit into
mainfrom
fix/mobile-and-export-bugs
Jul 5, 2026
Merged

fix: mobile interface bugs + text-derived export filenames#14
dani-polani merged 1 commit into
mainfrom
fix/mobile-and-export-bugs

Conversation

@dani-polani

Copy link
Copy Markdown
Member

Fixes the mobile-interface bugs plus the export-naming request from the "Исправить баги мобильного интерфейса и общие тоже" task.

Mobile

  • Row drag-to-reorder now works on touch. The Text-tab handle used HTML5 drag-and-drop, which never fires on phones. Reworked to Pointer Events (mouse + touch) reusing the same drop-position model and index math; adds a 5px drag threshold and a larger handle hit area. Verified on both touch (CDP touch events) and mouse — no desktop regression.
  • Style picker no longer clips off-screen. Its dropdown was anchored right-0 to a mid-toolbar button, so on a 390px screen its left edge sat at −60px. Now it anchors to the viewport (fixed inset-x-2) on small screens and keeps button-anchoring on sm+, with a max-height and internal scroll.
  • Editor uses the full device width. Dropped the canvas's horizontal padding on mobile (px-0 py-3 sm:p-4); sm+ unchanged.

General

  • Export filenames come from the text. Files were always alignment.*; now they're seeded from the first non-empty line, e.g. al-hello-world.png. New exportBaseName() keeps letters/digits from any script (Cyrillic, CJK stay readable), turns everything else into single dashes, caps length by code point, and falls back to alignment for empty / whitespace / punctuation-only / emoji input. Applied to PNG/SVG/PDF/HTML and the share QR.

Checks

npm run check (0 errors), ESLint + Prettier clean, 136 tests passing (15 new for exportBaseName, incl. empty/punctuation/emoji/CJK/length-cap/unsafe-char cases).

🤖 Generated with Claude Code

…t names

- Line reorder now uses pointer events (mouse + touch) instead of HTML5
  drag-and-drop, which never fires on phones. Same drop-position model and
  index math; adds a small drag threshold and a larger handle hit area.
- Style picker dropdown no longer clips off-screen on mobile: it anchors to
  the viewport (fixed inset-x-2) on small screens and stays anchored to the
  button on sm+, with a max-height and internal scroll.
- Drop the editor's horizontal padding on mobile so the canvas uses the full
  device width; sm+ keeps its padding.
- Export files are named from the first non-empty line (e.g. al-hello-world)
  instead of always "alignment". New exportBaseName() keeps letters/digits
  from any script (Cyrillic, CJK), strips everything else to dashes, caps
  length, and falls back to "alignment" for empty / punctuation-only / emoji
  input. Applied to PNG/SVG/PDF/HTML and the share QR. Covered by tests.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@dani-polani dani-polani merged commit c12b801 into main Jul 5, 2026
2 checks passed
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