Skip to content

Give expanded problem cards room below setup - #410

Merged
jserv merged 1 commit into
sysprog21:mainfrom
hszzt:improve-problem-picker-layout
Oct 22, 2026
Merged

jserv merged 1 commit into
sysprog21:mainfrom
hszzt:improve-problem-picker-layout

Conversation

@hszzt

@hszzt hszzt commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Problem

On wide screens, the expanded problem list is constrained to Step 1, creating a long single-column list while space below the other panels remains unused.

Implementation

Keep the picker controls in Step 1 and display fixed-width problem cards below the setup panels. Cards wrap as space changes and return inside Step 1 on narrow screens.

An L-shaped container visually connects the controls and cards. The reading and keyboard navigation order is Step 1 controls, problem cards, Step 2, then Step 3. Filtering, selection, source-title visibility, and collapse behavior are preserved.

Design for review

This differs from the proposed approach of moving the entire details.problem-picker below the setup panels. This PR presents the alternative layout for review.

Screenshots

Collapsed

The problem picker is collapsed inside Step 1.
PR1_1

Expanded — wide window

Four fixed-width cards per row, with an L-shaped container connecting Step 1 to the cards below the setup panels.

PR1_2

Expanded — medium-width window

Cards wrap into three columns as the window narrows.

PR1_3

Expanded — narrow window

Cards return inside Step 1 and fit two per row at this width.

PR1_4

Validation

Ran ./scripts/test.sh after the review fixes. All 1,316 browser tests passed. The run skipped checks requiring unavailable tools and one Linux-specific Python test; these skips were reviewed.

Closes #394


Summary by cubic

The expanded problem picker now uses the space below the setup panels instead of confining problem cards to a long single column in Step 1. Picker controls stay in Step 1 while fixed-width problem cards wrap below the setup panels on wide screens and return inside the picker on narrow ones; the cards stay in the DOM so reading order, focus, and screen-reader behavior are unchanged.

  • An L-shaped SVG outline visually connects the controls and cards; a MutationObserver updates cards and outline before paint, and a resize-and-event fallback keeps the outline in place when ResizeObserver is missing or content below grows.
  • Filtering, selection, source-title visibility, and collapse behavior are preserved; closing the picker returns focus to its summary. Collapsed cards remain searchable via hidden="until-found" and fragment links reveal them by opening the picker.

Written for commit 3a5dad1. Summary will update on new commits.

View guided diff

cubic-dev-ai[bot]

This comment was marked as resolved.

Comment thread web/problem-grid.js Outdated
@jserv
jserv requested review from ColtenOuO and alanhc October 21, 2026 13:40
@hszzt

hszzt commented Oct 21, 2026

Copy link
Copy Markdown
Contributor Author

Also addressed the three AI review findings in 983d6b6: added a ResizeObserver fallback, restored compact laptop spacing, and restored the mobile select font size to 16px.

@hszzt hszzt changed the title Let the expanded problem bank use the space below setup panels Give expanded problem cards room below setup Oct 21, 2026
@jserv

jserv commented Oct 22, 2026

Copy link
Copy Markdown
Contributor

Rebase latest main branch and resolve conflicts.

@hszzt
hszzt force-pushed the improve-problem-picker-layout branch from 983d6b6 to 7eccacf Compare October 22, 2026 05:42
@hszzt

hszzt commented Oct 22, 2026

Copy link
Copy Markdown
Contributor Author

Rebased onto main at 3198a99 and resolved the test conflict, preserving both sets of tests. Ran ./scripts/test.sh: all 1,367 browser tests passed; skipped checks were reviewed.

Comment thread web/problem-grid.js Outdated

@jserv jserv left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rebase the current branch onto the upstream default branch and rework the series into functionally minimal commits, folding similar ones and enforcing the project's commit message rules.

@hszzt
hszzt force-pushed the improve-problem-picker-layout branch from d0e0704 to a7008eb Compare October 22, 2026 06:43
@hszzt

hszzt commented Oct 22, 2026

Copy link
Copy Markdown
Contributor Author

Rebased onto the latest upstream main and folded the four commits into one functional commit, a7008eb. The final file contents are unchanged, and the commit message passes the project hook.

Comment thread tests/browser/lobby.test.js Outdated
Comment thread web/problem-grid.js Outdated
Comment thread web/problem-grid.js Outdated
Comment thread web/styles.css
@hszzt
hszzt force-pushed the improve-problem-picker-layout branch from a7008eb to 7088b33 Compare October 22, 2026 07:43
@hszzt

hszzt commented Oct 22, 2026

Copy link
Copy Markdown
Contributor Author

Addressed the four review comments in 7088b33: added meaningful breakpoint assertions, removed the incomplete ResizeObserver fallback, restored findability of collapsed cards with automatic expansion, and corrected the compact-spacing breakpoint to 640px. Folded the fixes into the existing commit. Ran ./scripts/test.sh: all 1,370 browser tests passed; skipped checks were reviewed.

Comment thread web/styles.css
Confining the problem bank to Step 1 leaves wide layouts underused.
Keep its controls in Step 1 and wrap fixed-width cards below the
panels, retaining reading order and the narrow-screen flow. A
measured outline preserves the visual connection across layouts.
@hszzt
hszzt force-pushed the improve-problem-picker-layout branch from 7088b33 to 3a5dad1 Compare October 22, 2026 08:18
@jserv
jserv merged commit 87a301c into sysprog21:main Oct 22, 2026
10 checks passed
@jserv

jserv commented Oct 22, 2026

Copy link
Copy Markdown
Contributor

Thank @hszzt for contributing!

jserv added a commit that referenced this pull request Oct 22, 2026
Since #401 each card sits in an entry that filtering hides along with
it, but #410's layout test toggled only the card and counted cards by
their attribute, so cards inside hidden entries measured as one row of
57. The test now hides and restores whole entries and counts what is
rendered, and the outline measures the entries the grid lays out.
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.

Use the full lobby width for the expanded problem picker

2 participants