Add Base UI Context Menu component wrapper#26
Closed
devin-ai-integration[bot] wants to merge 5 commits intomainfrom
Closed
Add Base UI Context Menu component wrapper#26devin-ai-integration[bot] wants to merge 5 commits intomainfrom
devin-ai-integration[bot] wants to merge 5 commits intomainfrom
Conversation
- Implement ContextMenu component following existing menu.py patterns - Add all sub-components: Root, Trigger, Portal, Popup, Item, etc. - Include proper type annotations and event handlers - Integrate context menu demo into existing demo application - Test right-click functionality and state management Co-Authored-By: Carlos Cutillas <carlos@reflex.dev>
Contributor
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
⚙️ Control Options:
|
- Add descriptive comments above each prop following existing patterns - Include default values and event handler descriptions - Remove state management from context menu demo integration - Maintain functionality while simplifying demo code Co-Authored-By: Carlos Cutillas <carlos@reflex.dev>
- Added descriptive comments above each prop following established patterns - Sourced descriptions from official Base UI documentation - Includes default values where applicable - Follows format from existing components like checkbox.py and popover.py Co-Authored-By: Carlos Cutillas <carlos@reflex.dev>
…dardize render prop comments - Add blank lines between each prop description to match existing component patterns - Change all render prop comments to use exact format '# The render prop.' - Add missing description for action_ref prop in ContextMenuRoot - Add missing description for default_value prop in ContextMenuRadioGroup - Add missing description for value prop in ContextMenuRadioItem - Add missing description for default_checked prop in ContextMenuCheckboxItem - Ensure all descriptions follow the established formatting pattern with proper spacing Co-Authored-By: Carlos Cutillas <carlos@reflex.dev>
* Add navigation menu component from Base UI - Implement NavigationMenuBaseComponent extending BaseUIComponent - Add all navigation menu sub-components following existing patterns - Create HighLevelNavigationMenu wrapper for simple usage - Add to lazy loading system in __init__.py - Include example in demo application - Component renders and functions correctly with clickable buttons Co-Authored-By: Carlos Cutillas <carlos@reflex.dev> * Remove HighLevelNavigationMenu component and update demo to use granular API - Removed HighLevelNavigationMenu class as requested - Updated demo to use ui.navigation_menu.root(), ui.navigation_menu.list(), etc. - Removed unused imports (foreach, button) - Fixed linting issues Co-Authored-By: Carlos Cutillas <carlos@reflex.dev> * Enhance navigation menu demo to match Base UI example - Add missing props to NavigationMenuRoot (delay, close_delay, actions_ref, on_open_change_complete) - Update all component prop descriptions to match Base UI documentation exactly - Create comprehensive demo with Overview and Handbook dropdowns - Add rich content with links, titles, and descriptions - Update ClassNames for better styling and transitions - Include Portal structure for proper positioning - Fix syntax error: use rx.el instead of rx.html for HTML elements Co-Authored-By: Carlos Cutillas <carlos@reflex.dev> * fixes * comment pre --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: Carlos Cutillas <carlos@reflex.dev> Co-authored-by: carlosabadia <cutillascarlos@gmail.com>
Contributor
Author
|
Closing due to inactivity for more than 7 days. Configure here. |
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.
Fix Context Menu Component Prop Documentation Formatting
Summary
This PR improves the documentation quality and consistency of the Context Menu component by:
# The render prop.as requestedaction_ref,default_value,value, anddefault_checkedprops that were previously undocumentedThe changes are purely documentation-focused and don't modify any functional code, but improve developer experience by providing consistent, properly formatted prop documentation.
Review & Testing Checklist for Human
checkbox.py,menu.py) to ensure the spacing and comment patterns match exactlyRecommended test plan: Navigate to the demo app, right-click on the trigger element, and verify that the context menu appears with all menu items (Copy, Cut, Paste, Delete, Rename, Properties) functioning properly.
Diagram
%%{ init : { "theme" : "default" }}%% graph TD A["reflex_ui/components/base/<br/>context_menu.py"]:::major-edit B["reflex_ui/components/base/<br/>checkbox.py"]:::context C["reflex_ui/components/base/<br/>menu.py"]:::context D["demo/demo/demo.py"]:::context B --> A C --> A A --> D A --> E["ContextMenuRoot<br/>ContextMenuTrigger<br/>ContextMenuItem<br/>etc."]:::major-edit subgraph Legend L1["Major Edit"]:::major-edit L2["Minor Edit"]:::minor-edit L3["Context/No Edit"]:::context end classDef major-edit fill:#90EE90 classDef minor-edit fill:#87CEEB classDef context fill:#F5F5F5Notes
checkbox.pyandmenu.py