Skip to content

fix(oc-docs): cap menu dropdown height so long lists scroll - #137

Merged
bijin-bruno merged 1 commit into
opencollection-dev:mainfrom
vasharma05-bruno:fix/assertion-operator-dropdown-height
Jul 22, 2026
Merged

fix(oc-docs): cap menu dropdown height so long lists scroll#137
bijin-bruno merged 1 commit into
opencollection-dev:mainfrom
vasharma05-bruno:fix/assertion-operator-dropdown-height

Conversation

@vasharma05-bruno

@vasharma05-bruno vasharma05-bruno commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Problem

Opening the operator dropdown in the assertions table (playground) renders all 28 options at full height. The shared MenuDropdown surface was capped at max-height: 90vh, but vh is the browser viewport height, not the embedded OpenCollection component's height — so the list spilled well past the app area.

Before

image

After

image image

Fix

Cap the dropdown surface at min(20rem, 90vh) so a long list scrolls inside the popover instead of overflowing. 20rem shows ~12 items; min(…, 90vh) keeps it safe on small viewports. Short-list dropdowns (env switcher, body-mode, query bar, select) never reach the cap, so they're unaffected.

Change is a single CSS line in src/ui/MenuDropdown/StyledWrapper.ts.

Testing

  • npm run lint — no new problems (identical count vs. main)
  • npm run test:run — all MenuDropdown/AssertsTab unit tests pass

The assertion operator dropdown lists 28 options; the shared MenuDropdown
surface was capped at 90vh, which measures the browser viewport rather than
the embedded component, so the list spilled past the app. Cap the surface at
min(20rem, 90vh) so long lists scroll instead of overflowing.
@vasharma05-bruno
vasharma05-bruno force-pushed the fix/assertion-operator-dropdown-height branch from 3635d5e to 3211c62 Compare July 22, 2026 04:45
@bijin-bruno
bijin-bruno merged commit 88698a6 into opencollection-dev:main Jul 22, 2026
1 check passed
@vasharma05-bruno
vasharma05-bruno deleted the fix/assertion-operator-dropdown-height branch July 23, 2026 14:42
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.

3 participants