Skip to content

Add preview card component from Base UI#27

Merged
carlosabadia merged 5 commits intomainfrom
devin/1721034641-preview-card-component
Jul 15, 2025
Merged

Add preview card component from Base UI#27
carlosabadia merged 5 commits intomainfrom
devin/1721034641-preview-card-component

Conversation

@devin-ai-integration
Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration bot commented Jul 15, 2025

Update all preview card prop descriptions with official Base UI documentation

Summary

This PR comprehensively updates all prop descriptions across all PreviewCard components to match the official Base UI documentation. The changes ensure accuracy, consistency, and completeness of component documentation by sourcing descriptions directly from the official Base UI JSON documentation files.

Key improvements:

  • Accurate descriptions: All prop descriptions now match the official Base UI documentation exactly
  • Consistent render prop descriptions: All components with render props use the same official description format
  • Default values: Updated to reflect official Base UI defaults (e.g., align: "center", side: "bottom", delay: 600ms)
  • Comprehensive coverage: Added missing descriptions for all render props across 7 components
  • Format consistency: Maintained established comment format while improving accuracy

Review & Testing Checklist for Human

  • Cross-reference prop descriptions with official Base UI docs - Verify descriptions match Base UI PreviewCard JSON files exactly, especially default values and technical details
  • Test component functionality thoroughly - Verify the preview card still works correctly with hover delays, positioning, and content rendering after description updates
  • Validate description consistency - Ensure all render prop descriptions are identical across components and follow the established format pattern

Recommended test plan: Test the preview card component in the demo application with various configurations (different positions, delays, content types) to ensure functionality remains intact after documentation updates.


Diagram

%%{ init : { "theme" : "default" }}%%
graph TD
    A["Base UI JSON<br/>Documentation Files"]:::context --> B["reflex_ui/components/base/<br/>preview_card.py"]:::major-edit
    B --> C["PreviewCardRoot<br/>prop descriptions"]:::major-edit
    B --> D["PreviewCardTrigger<br/>prop descriptions"]:::major-edit
    B --> E["PreviewCardPortal<br/>prop descriptions"]:::major-edit
    B --> F["PreviewCardPositioner<br/>prop descriptions"]:::major-edit
    B --> G["PreviewCardPopup<br/>prop descriptions"]:::major-edit
    B --> H["PreviewCardArrow<br/>prop descriptions"]:::major-edit
    B --> I["PreviewCardBackdrop<br/>prop descriptions"]:::major-edit
    J["demo/demo/demo.py"]:::context --> K["Component Testing"]:::context
    
    A -.->|"sourced from"| B
    J -.->|"validates"| B
    
    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:#FFFFFF
Loading

Notes

  • Comprehensive update: All 7 PreviewCard components updated with official Base UI descriptions
  • Testing completed: Component functionality verified in demo application - hover interaction works correctly
  • CI status: All pre-commit checks passed (ruff, codespell, pyright)
  • Documentation source: Descriptions sourced from official Base UI JSON files at https://github.com/mui/base-ui/blob/master/docs/reference/generated/
  • Consistency maintained: All render prop descriptions use identical official Base UI text
  • Session requested by Carlos Cutillas (carlos@reflex.dev) - Link to Devin run

Component Testing Screenshot

- Create PreviewCard component with all sub-components (Root, Trigger, Portal, Positioner, Popup, Arrow, Backdrop)
- Implement HighLevelPreviewCard wrapper with trigger and content props as requested
- Follow existing component patterns from popover and tooltip components
- Add component to lazy loading system in __init__.py
- Add demo usage in demo application
- All prop descriptions sourced from official Base UI documentation

Co-Authored-By: Carlos Cutillas <carlos@reflex.dev>
@devin-ai-integration
Copy link
Copy Markdown
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

devin-ai-integration bot and others added 4 commits July 15, 2025 09:48
- Add description for default_open prop
- Add description for open prop
- Add description for on_open_change prop
- Add description for delay prop with default value
- Follow established comment format for consistency

Co-Authored-By: Carlos Cutillas <carlos@reflex.dev>
- Source all prop descriptions from official Base UI JSON documentation files
- Update PreviewCardRoot, PreviewCardTrigger, PreviewCardBackdrop, PreviewCardPortal, PreviewCardPositioner, PreviewCardPopup, and PreviewCardArrow components
- Add render prop descriptions for all components that support it
- Include default values where specified in official docs
- Follow established comment format for consistency
- Maintain existing functionality while improving documentation accuracy

Co-Authored-By: Carlos Cutillas <carlos@reflex.dev>
@carlosabadia carlosabadia merged commit 9d97154 into main Jul 15, 2025
1 check passed
@carlosabadia carlosabadia deleted the devin/1721034641-preview-card-component branch July 15, 2025 10:14
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.

1 participant