Skip to content

📐 feat: Give Dropdown the Positioning Props DropdownPopup Takes - #17461

Merged
berry-13 merged 1 commit into
devfrom
berry-13/dropdown-positioning-props
Oct 26, 2026
Merged

berry-13 merged 1 commit into
devfrom
berry-13/dropdown-positioning-props

Conversation

@berry-13

Copy link
Copy Markdown
Collaborator

Pull Request

Summary

Dropdown (select a value) and DropdownPopup (run an action) already share their surface and item styling, but not their sizing API. DropdownPopup takes sameWidth, minWidth (capped to the room the list has) and gutter; Dropdown took none of them, so its callers reached for sizeClasses with ad hoc widths and z-50 classes, the latter added to clear the Settings dialog before Dropdown learned to layer itself inside dialogs in #17432.

This PR gives Dropdown the same three props with the same meaning, and moves the Settings dropdowns onto them: the Langfuse project list takes sameWidth, the code environment, stateful workspace and voice lists take minWidth, and the z-50 classes the dialog layer already overrides are dropped. Fixed widths stay in sizeClasses, which is what it is for. Defaults are unchanged, so dropdowns that pass none of the new props draw exactly as before.

Type of change

  • Refactor

Testing

Tested environments/configuration:

  • Mock e2e harness, Settings dialog, desktop light and mobile (Pixel 7).

Automated tests:

  • Added dropdown-min-width to nested-popovers.spec.ts: the Settings workspace list is at least its 18rem minimum where the viewport has room; all 26 tests in the spec pass on desktop and mobile.
  • Dropdown.spec.tsx: minWidth is capped like DropdownPopup's and left to the stylesheet when unset.
  • The Settings dropdowns that only lost z-50 measure the same before and after (computed z-index, size, position, and on top of the dialog).
  • Related client tests (13 suites, 119 tests) and the Dropdown spec pass; tsc --noEmit for both projects is clean.

Screenshots / recordings

No visible change: the moved call sites resolve to the same layer and size, as measured above.

Risk / compatibility

Additive for @librechat/client. A minWidth is now also capped to the viewport, so on a phone narrower than the requested width the list fits the screen instead of running past it. Escape in a Settings dropdown closing the whole Settings dialog predates this change and is tracked in berry-13#429.

Checklist

  • I reviewed my own changes
  • Relevant tests have been added or updated
  • Existing relevant tests pass
  • The change does not introduce new warnings or errors

Copilot AI balanced review requested due to automatic review settings October 26, 2026 16:36

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

@berry-13
berry-13 marked this pull request as ready for review October 26, 2026 16:40
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-26T17:00:08.211090Z 2cedee1 New commits
🔒 Security Review ✅ Completed 2026-10-26T16:42:35.655149Z ce07bf2 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@codegraph-librechat codegraph-librechat Bot added the 🗺️ UI Foundation codegraph: the taxonomy area this belongs to (classifier, confidence ≥ 0.9) label Oct 26, 2026
…Popup takes

Callers sized and layered Dropdown lists through ad hoc sizeClasses, while
DropdownPopup takes sameWidth, minWidth (capped to the room the list has)
and gutter. Dropdown now takes the same three, and the Settings dropdowns
move onto them and drop z-50 classes the dialog layer already overrides.
@berry-13
berry-13 force-pushed the berry-13/dropdown-positioning-props branch from ce07bf2 to 2cedee1 Compare October 26, 2026 16:59
@berry-13
berry-13 merged commit 19ba23e into dev Oct 26, 2026
46 checks passed
@berry-13
berry-13 deleted the berry-13/dropdown-positioning-props branch October 26, 2026 21:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🗺️ UI Foundation codegraph: the taxonomy area this belongs to (classifier, confidence ≥ 0.9)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants