-
Notifications
You must be signed in to change notification settings - Fork 0
Add Cursor Rules for Medusa Forms Components and Stories #87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Cursor Rules for Medusa Forms Components and Stories #87
Conversation
- Add medusa-forms-patterns.mdc for component development patterns - Add medusa-stories-patterns.mdc for Storybook story patterns - Focus on @medusajs/ui integration and react-hook-form Controller patterns - Complement existing form-component-patterns.mdc with Medusa-specific guidance - Include validation, error handling, and accessibility requirements - Provide comprehensive story examples and best practices
|
|
|
Important Review skippedBot user detected. To trigger a single review, invoke the You can disable this status message by setting the 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Join our Discord community for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
|
📝 Storybook Preview: View Storybook This preview will be updated automatically when you push new changes to this PR.
|
- Update monorepo-organization.mdc with proper globs and new package structure - Add medusa-forms package and directory structure documentation - Update storybook-testing.mdc to include react-hook-form and @medusajs/ui - Add medusa-forms story directory to project structure - Update form-component-patterns.mdc to clarify scope (Remix Hook Form only) - Add note directing to medusa-forms-patterns.mdc for Medusa components
Overview
This PR adds specialized cursor rules for Medusa Forms components and stories, complementing the existing form component patterns with Medusa-specific guidance.
What's Added
🎯 medusa-forms-patterns.mdc
@medusajs/uiandreact-hook-formcontrolled/vsui/)📚 medusa-stories-patterns.mdc
Key Differences from Existing Form Rules
Design Principles
✅ Modular Approach: Separate files for component and story patterns
✅ Auto-Attached: Automatically applies to relevant file patterns
✅ Complementary: Works alongside existing cursor rules
✅ Comprehensive: Covers validation, accessibility, and testing
✅ Best Practices: Follows Notion document guidelines
File Targeting
packages/medusa-forms/**/*.{ts,tsx}andapps/docs/src/medusa-forms/**/*.{ts,tsx}apps/docs/src/medusa-forms/**/*.stories.{ts,tsx}Benefits
🚀 Faster Development: Clear patterns for Medusa component creation
🎨 Design System Compliance: Ensures proper @medusajs/ui integration
📖 Better Documentation: Comprehensive story examples
🔒 Type Safety: Proper TypeScript patterns and generics
♿ Accessibility: Built-in accessibility requirements
Related
.cursor/rules/form-component-patterns.mdc💻 View my work • About Codegen