Repository navigation
fix(web): stop filter controls crowding out search bars on phones - #1607
Merged
joshunrau merged 1 commit intoOct 4, 2026
Merged
Conversation
The instrument showcase laid its search bar and three filter dropdowns out in one unwrapped row, so on a 390px phone the search bar shrank to 55px. It now stacks the search bar on its own full-width row, with the dropdowns sharing the row beneath, until the lg breakpoint. md is too early here: the sidebar appears at md and takes 19rem, which left the search bar 97px wide at 768px. The data hub search bar already gets its own row from libui's DataTableControls, but its Subject Lookup, Filters and Export controls did not wrap, which pushed Export off the right edge of a phone screen. They now wrap below md, and the md and wider layout is unchanged. Closes DouglasNeuroInformatics#1583 Co-Authored-By: Claude Opus 5.5 <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.
Closes #1583
What changed
Instrument search (
InstrumentShowcase, used by Administer Instrument and Remote Assignment). The search bar and the Kind, Tags and Language dropdowns sat in one unwrapped row. At 390px that left the search bar 55px wide. Belowlg, the search bar now gets its own full-width row, and the three dropdowns share the row underneath it.I used
lgrather thanmdbecause the sidebar appears atmdand takes 19rem. With anmdbreakpoint, a 768px screen still left the search bar only 97px wide. Withlgit is 400px at 768px and 532px at 900px. At 1024px and wider the row layout comes back, with the same measurements as before.Data hub. Installed libui (6.16.1)
DataTableControlsalready puts the search bar on its own full-width row belowmd, so the search bar itself was fine. The real problem at phone width was the row of Subject Lookup, Filters and Export: it didn't wrap, and Export ran past the right edge of the screen (right edge at 393px on a 375px or 390px screen). Belowmdthese controls now wrap: Subject Lookup and Filters share the first row, and Export takes the second. Atmdand wider the layout is unchanged. Before and after measurements match exactly at 768, 900, 1024 and 1280px.Verification
Unit tests:
apps/web/src/components/InstrumentShowcase/__tests__/InstrumentShowcase.test.tsxand the newapps/web/src/__tests__/datahub-table-controls.test.tsx. happy-dom does no layout, so both assert on the responsive utility classes. I confirmed both are collected (vitest list --filesOnly) and that both fail when the old classes are put back.E2E tests: new
on a phonedescribe blocks intesting/src/specs/accessible-instruments.spec.tsandtesting/src/specs/datahub.spec.ts, using a sharedPHONE_VIEWPORT(390x844). They measure layout withboundingBox():Against the old layout they fail with
Received: 55.109375(expected 358) andReceived: 392.796875(expected <= 374).pnpm lint,pnpm test(172 files, 1579 tests) andpnpm test:e2e(264 passed) are all green.Not covered
DataTableControls, which switches to its row layout atmdwhile the sidebar takes 19rem. Fixing it needs a libui change, so it isn't in this PR.Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com