Repository navigation
fix(fx): make envelope screen usable on mobile - #10
Merged
Merged
Conversation
The ENV-mode LCD was collapsing to a thin strip on mobile because the 158×78 LCD plate sat in a flex-row with the encoders without `shrink-0`. On a narrow viewport, restructure the FX panel so the LCD takes its own full-width row (96 px tall) with mode buttons + encoders horizontally underneath, then the pad grid wraps below. Also enlarge the P/E mode-switch buttons (14×11 → 18×14) and grow the ADSR knot hit-target from r=9 to r=14 SVG units (~30 px tap diameter on mobile) so envelope points are reliably draggable with a finger. `touchAction:"none"` is now also set on the SVG itself for browsers that don't honour it on `<g>` subnodes during knot drag. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
4 of 5 tasks
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.
Summary
The ADSR envelope editor in the FX panel was unusable on mobile — the LCD collapsed to a thin strip and the knot hit-targets were too small to grab with a finger. This restructures the narrow-viewport layout and enlarges the touch targets.
What changed
Mobile layout restructure (FxHardwarePanel.tsx)
< 640 px, the LCD now takes its own full-width row at 96 px tall (was sharing a row with the encoders at fixed 158×78 px and getting squeezed to a strip).[mode buttons | encoder1 | encoder2].LCD_STYLEis now alcdStyle(narrow)helper;Lcd,LcdEnvelopeView, andScreenModeColumnthread anarrowprop.padBodyHeightNarrow()recomputed for the new three-row structure.ENV plot scales with the new LCD
LcdEnvelopeViewplot height isnarrow ? 84 : 66SVG units.height="100%"andtouchAction:"none"(defence in depth — some mobile browsers ignoretouch-actionon the inner<g>and steal the drag for page scroll).ADSR knot hit-target (
AdsrNode)r=9 → r=14SVG units → ~30 px tap diameter on a typical mobile LCD width, close to Apple HIG without overlapping neighbouring knots.Mode buttons P/E
Why
User reported on touch device: ENV screen renders as "schmaler Streifen ohne Inhalt", knots not draggable, P/E switches too tiny.
Root cause: the LCD plate was hardcoded to
width: 158but lived in a flex-row withoutshrink-0, so on a 360 px phone the encoder pair (50 + 50 + gap) plus the mode column shrank the LCD container to almost nothing. The SVG'spreserveAspectRatio="none"then stretched the curve into a sliver, and ther=9hit-targets ended up only a few screen pixels across.Test plan
EnvelopePlayheadstill animates the curve correctly.npm test— 604 unit tests pass.🤖 Generated with Claude Code