Repository navigation
fix(web): mobile trading layout, chart touch controls, reduced motion - #1098
Merged
abayomicornelius merged 1 commit intoNov 24, 2026
Conversation
Closes SO4-Markets#1055, SO4-Markets#1056, SO4-Markets#1057, SO4-Markets#1058. Responsive layout (SO4-Markets#1055/SO4-Markets#1058): the shared ScrollArea wrapper carried a leaked scrollbar-thumb class string (data-vertical:w-2.5, touch-none, select-none) from 387030d. data-orientation matches those variants, so every vertical ScrollArea collapsed to a 10px column: the trade shortcuts dialog rendered blank at all widths, and touch scrolling and text selection were off. The fixed Help button covered the OHLC table toggle (phone), the Positions tab (tablet) and Reset layout (desktop); it now sits in flow in the workspace footer. The chart source/OHLC strip did not wrap, clipping candle values and the network label off-screen. Chart touch (SO4-Markets#1056): the chart set touch-action:none, so any swipe that started on it could not scroll the page. It now uses pan-y with vertTouchDrag disabled; horizontal drag and pinch still drive the chart. Timeframe, view, retry and table-toggle controls use the shared touch-target utility, the timeframe highlight re-measures on resize, and zoom in/out/fit buttons give keyboard and AT users equivalents of the gestures. Reduced motion (SO4-Markets#1057): spinners were unconditionally animate-spin (the Button spinner paired it with motion-safe, defeating it); transform/width transitions, pulses and entry animations lacked reduced alternatives; EmptyState used one-off durations. Fixed per component with existing tokens, no broad rules. Select/DropdownMenu popups keep their fade but drop zoom and slide for both the system and in-app preference. Tests: ScrollArea regression (fails before, passes after), a shared reduced-motion contract suite (10 cases fail before, pass after), TVChart and TVChartContainer touch/view-control tests, KeyboardShortcutsHelp tests, and new trade-responsive e2e cases (24/24 pass with 2 workers). Opened at the user's request while the full commit gate was still running; results are reported on the PR.
|
@Petrelid is attempting to deploy a commit to the Ijai's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
@Petrelid Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
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.
Closes #1055
Closes #1056
Closes #1057
Closes #1058
Changes
Responsive layout: #1055 / #1058
data-vertical:w-2.5 touch-none select-none …) onto the wrapper.data-orientationmatches those variants, so every vertical ScrollArea was 10px wide with touch scrolling disabled. Because of this the trade keyboard-shortcuts dialog rendered blank at every width, and the command palette list was affected too. Removed the string and added a regression test.Chart touch usability: #1056
touch-action: none. It now usespan-ytogether with lightweight-charts'vertTouchDrag: false, so vertical swipes scroll the page while horizontal drag and pinch still pan and zoom.touch-targetutility (44px on coarse pointers).Reduced motion: #1057
animate-spin; the Button spinner even paired that withmotion-safe:animate-spin, which defeated it. Fixed in Button, TransactionStatus, TxStatus, LoadingPage, and the ConfirmationDialog submit spinner. Without motion they show a static ring, andaria-busy/ status text still convey the state.motion-reducealternatives to transform, width, and opacity motion: RollingNumber, Meter, ProgressIndicator, Switch thumb, Sidebar chevron, RouteProgressBar, depth-ladder fills, chart/depth-chart stale fades, market-selector chevron, trade-panel entry fades, and the Navbar arrow. Live/stale pulses are nowmotion-safe:.duration-500/duration-300now use the existingduration-slowest/duration-slowtokens, and there's no entry animation under reduced motion.Testing
packages/ui: ScrollArea regression (3 cases fail before / pass after). New__tests__/reduced-motion.test.tsxcontract suite (all 10 cases fail before / pass after).apps/web: newTVChart.test.tsx(touch sizing, indicator re-measure incl. scroll offset, arrow keys) andKeyboardShortcutsHelp.test.tsx.TVChartContainer.test.tsxgained touch-action / gesture options / zoom / fit / wrap cases (44/44 pass).e2e/trade-responsive.spec.ts: the network helper gained an opt-in deterministic klines stub, so the chart renders with data. New cases cover chart-strip containment, Help not overlapping any control plus a visible shortcut list, and coarse-pointer 44px chart controls with a tap-through. 24/24 pass with-j 2(CI's default). With 4 workers on my 8-core / 7 GB machine, the dev server starved and some page loads timed out; that was load, not the change (I compared idle DOM churn and long tasks with baseline and they matched).mainCI is already red on Playwright (128 failed), mostly visual-snapshot suites.Commit gate
tscfor apps/web (clean) and the targeted unit and e2e suites above. Things to know:apps/webhas notestscript, sobun run testdoes not run web unit tests. Run directly, the web suite already has 65 failures onmain.bun run changelog:validatealready fails onmainbecause of other entries (ob-058,ob-060,780); the new entry has no errors.main, so local updates wouldn't be CI-equivalent. The gallery ScrollArea demo and trade workspace will legitimately change (the old rendering was the 10px bug).Screenshots
Note: the "before" captures were taken mid-work. The 320 chart shot already includes the ScrollArea fix but none of the chart or Help changes, and the 768/1280 shots predate the Help and chart changes. The colourful circle at the bottom-right is the dev-only TanStack devtools launcher.