[WEB-4441]fix: members account type dropdown position#7759
[WEB-4441]fix: members account type dropdown position#7759sriramveeraghanta merged 1 commit intopreviewfrom
Conversation
WalkthroughMigrated CustomSelect from Headless UI Listbox to Combobox, rendering options via a React Portal to document.body. Adjusted Popper refs and container structure for positioning, updated styling and scrolling constraints, and removed an onClick close handler in favor of portal-based outside-click handling. Public API exports remain unchanged. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor U as User
participant CS as CustomSelect
participant CB as Combobox
participant PB as Portal (document.body)
participant P as Popper/Positioning
U->>CS: Click trigger
CS->>CB: Open Combobox
CB->>PB: Render Options via createPortal
PB->>P: Attach popper refs (setPopperElement)
P-->>PB: Compute position (placement, styles)
U->>PB: Navigate/select option
PB->>CB: onChange(value)
CB->>CS: Update selected state
CS->>CB: Close Combobox
CB-->>PB: Unmount Options (portal)
note over PB,CB: Outside clicks handled via portal container
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Suggested labels
Suggested reviewers
Pre-merge checks (2 passed, 1 warning)❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
Poem
Tip 👮 Agentic pre-merge checks are now available in preview!Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.
Please see the documentation for more information. Example: reviews:
pre_merge_checks:
custom_checks:
- name: "Undocumented Breaking Changes"
mode: "warning"
instructions: |
Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).Please share your feedback with us on this Discord post. ✨ Finishing Touches
🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Pull Request Linked with Plane Work Items Comment Automatically Generated by Plane |
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (1)
packages/ui/src/dropdowns/custom-select.tsx (1)
108-116: Potential z-index conflict with other UI elementsThe z-index value of
z-30(z-index: 30 in Tailwind) might not be sufficient to ensure the dropdown always appears above other UI elements like modals or overlays, which typically use higher z-index values.Consider using a higher z-index value or managing it through a z-index system:
className={cn( - "my-1 overflow-y-scroll rounded-md border-[0.5px] border-custom-border-300 bg-custom-background-100 px-2 py-2.5 text-xs shadow-custom-shadow-rg focus:outline-none min-w-48 whitespace-nowrap z-30", + "my-1 overflow-y-scroll rounded-md border-[0.5px] border-custom-border-300 bg-custom-background-100 px-2 py-2.5 text-xs shadow-custom-shadow-rg focus:outline-none min-w-48 whitespace-nowrap z-50", optionsClassName )}
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
packages/ui/src/dropdowns/custom-select.tsx(6 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
packages/ui/src/dropdowns/custom-select.tsx (2)
packages/ui/src/utils/classname.tsx (1)
cn(4-4)packages/ui/src/dropdowns/helper.tsx (1)
ICustomSelectItemProps(93-97)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: Build and lint web apps
- GitHub Check: Analyze (javascript)
🔇 Additional comments (3)
packages/ui/src/dropdowns/custom-select.tsx (3)
1-1: Migration to Combobox looks good!The migration from Listbox to Combobox is appropriate for this use case, as Combobox provides better support for portal rendering and keyboard navigation while maintaining similar dropdown functionality.
105-130: Good implementation of portal rendering for dropdown positioning!The use of
createPortalto render the dropdown options indocument.bodyeffectively solves the positioning issues relative to the viewport. Thedata-prevent-outside-clickattribute combined with the portal ensures proper click handling.
58-67: Good accessibility implementation with ComboboxThe Combobox implementation maintains keyboard navigation support through
onKeyDownhandler and properly manages focus states. Thedisabledprop is correctly propagated to the Combobox component.
* chore: added access for workspace admin to edit project settings * chore: workspace admin to update members details * chore: workspace admin to label, state, workflow settings * Revert "chore: added access for workspace admin to edit project settings" This reverts commit 803b56514887339d884eaef170de8a9e4ecfda8c. * chore: updated worspace admin access for projects * Revert "chore: workspace admin to update members details" This reverts commit ac465d618d7a89ef696db3484e515957b6b5e264. * Revert "chore: workspace admin to label, state, workflow settings" This reverts commit f01a89604e71792096cbae8e029cac160ea209fb. * chore: workspace admin access in permission classes and decorator * chore: check for teamspace members * chore: refactor permission logic * [WIKI-632] chore: accept additional props for document collaborative editor (#7718) * chore: add collaborative document editor extended props * fix: additional rich text extension props * fix: formatting * chore: add types to the trailing node extension --------- Co-authored-by: Aaryan Khandelwal <aaryankhandu123@gmail.com> * [WEB-4854] chore: project admin accesss to workspace admins (#7749) * chore: project admin accesss to workspace admins * chore: frontend changes * chore: remove console.log * chore: refactor permission decorator * chore: role enum * chore: rearrange role_choices * Potential fix for code scanning alert no. 636: URL redirection from remote source (#7760) Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> * [WEB-4441]fix: members account type dropdown position #7759 * [WEB-4857] fix: applied filters root update #7750 * [WEB-4858]chore: updated content for error page (#7766) * chore: updated content for error page * chore: updated btn url * fix: merge conflicts * fix: merge conflicts * fix: use enum for roles --------- Co-authored-by: vamsikrishnamathala <matalav55@gmail.com> Co-authored-by: Lakhan Baheti <94619783+1akhanBaheti@users.noreply.github.com> Co-authored-by: Aaryan Khandelwal <aaryankhandu123@gmail.com> Co-authored-by: sriram veeraghanta <veeraghanta.sriram@gmail.com> Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> Co-authored-by: Vamsi Krishna <46787868+vamsikrishnamathala@users.noreply.github.com>
Description
Migrated
CustomSelectdropdown from HeadlessUIListboxtoComboboxwith portal rendering to fix dropdown positioning relative to viewport, and improve accessibility.Type of Change
Screenshots and Media (if applicable)
Test Scenarios
References
Summary by CodeRabbit
Refactor
Bug Fixes
Style
Documentation