Skip to content

Show the scrollbar of result formulas wider than the screen - #5

Merged
IACBI merged 2 commits into
mainfrom
result-formula-scrollbar
Sep 27, 2026
Merged

IACBI merged 2 commits into
mainfrom
result-formula-scrollbar

Conversation

@IACBI

@IACBI IACBI commented Sep 27, 2026

Copy link
Copy Markdown
Owner

Problem

On a phone, the L and U of a 5×5 LU result (and wide result checks such as L·U = A with large entries) were cut at the right edge. They could be scrolled by swiping or Shift+wheel, but nothing showed that more was there: Flutter draws no scrollbar for a horizontal scroll view, and a matrix cut at the edge looks complete. Found in the live-site check at 390 px.

Change

  • SidewaysFormula (in solution_summary.dart) wraps each result part and each result check: a horizontal scroll view with an always-visible scrollbar, like the matrix grid's.
  • Room for the thumb (10 px) is reserved only while the formula overflows, decided from the scroll metrics after layout, so formulas that fit keep their spacing and show no thumb.
  • With a mouse, dragging the thumb is also a way to reach the hidden part (content itself is not mouse-draggable).
  • docs/DESIGN_SYSTEM.md records the rule.

Verification

  • test/result_scrollbar_test.dart (4 tests): a phone-width LU result overflows and a mouse drag on the thumb scrolls it; a wide check has the always-visible bar driving its own position; a fitting result keeps zero padding; the padding appears on a phone and goes on a wide window. All four fail without the change.
  • flutter analyze: no issues. flutter test: 501 passed. dart format check over all tracked files: no changes.
  • tool/all_shapes_sweep_test.dart: 63/63 passed.
  • Local release web build (--base-href /matriks/) in Chrome: at 390 px the bar shows under L and U in light and dark, dragging it reveals L's fifth column; at 1440 px a 2×2 LU shows no thumb and unchanged spacing; no console errors.

On a phone the L and U of a 5x5 LU, and wide result checks, were cut at the
right edge with nothing to say that they scroll: Flutter draws no scrollbar
for a horizontal scroll view. Result formulas and checks now show one, and
reserve room for the thumb only while they overflow, so a formula that fits
keeps its spacing. With a mouse, dragging the thumb is also the way to reach
the hidden part.
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@IACBI
IACBI merged commit 66e04c7 into main Sep 27, 2026
5 checks passed
@IACBI
IACBI deleted the result-formula-scrollbar branch September 27, 2026 13:17
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