fix: mobile interface bugs + text-derived export filenames#14
Merged
Conversation
…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>
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.
Fixes the mobile-interface bugs plus the export-naming request from the "Исправить баги мобильного интерфейса и общие тоже" task.
Mobile
right-0to 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 onsm+, with a max-height and internal scroll.px-0 py-3 sm:p-4);sm+unchanged.General
alignment.*; now they're seeded from the first non-empty line, e.g.al-hello-world.png. NewexportBaseName()keeps letters/digits from any script (Cyrillic, CJK stay readable), turns everything else into single dashes, caps length by code point, and falls back toalignmentfor 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 forexportBaseName, incl. empty/punctuation/emoji/CJK/length-cap/unsafe-char cases).🤖 Generated with Claude Code