Skip to content

feat(PermissionsEditor): add interactive Storybook controls for Docs page#70

Merged
garrity-miepub merged 1 commit intomainfrom
feature/premissions-editor-updstes
Feb 4, 2026
Merged

feat(PermissionsEditor): add interactive Storybook controls for Docs page#70
garrity-miepub merged 1 commit intomainfrom
feature/premissions-editor-updstes

Conversation

@garrity-miepub
Copy link
Copy Markdown
Contributor

  • Add argTypes configuration for userName, showEmployerAccess, and className
  • Disable controls for complex props (groups, assignedPermissions, onPermissionsChange, employers, selectedEmployers, onEmployersChange, labels)
  • Add default args to meta config for proper control initialization
  • Reorder stories to make Default the primary story on Docs page
  • Simplify Default story render function to use args directly
  • Controls now properly update the inline preview on the Docs page

Props with controls:

  • userName (text): User name being edited
  • showEmployerAccess (boolean): Toggle employer access section
  • className (text): Custom CSS class

Props without controls (complex types):

  • groups, assignedPermissions, onPermissionsChange
  • employers, selectedEmployers, onEmployersChange, labels
premissions-editor.mov

…page

- Add argTypes configuration for userName, showEmployerAccess, and className
- Disable controls for complex props (groups, assignedPermissions, onPermissionsChange, employers, selectedEmployers, onEmployersChange, labels)
- Add default args to meta config for proper control initialization
- Reorder stories to make Default the primary story on Docs page
- Simplify Default story render function to use args directly
- Controls now properly update the inline preview on the Docs page

Props with controls:
- userName (text): User name being edited
- showEmployerAccess (boolean): Toggle employer access section
- className (text): Custom CSS class

Props without controls (complex types):
- groups, assignedPermissions, onPermissionsChange
- employers, selectedEmployers, onEmployersChange, labels
Copilot AI review requested due to automatic review settings February 4, 2026 00:42
@garrity-miepub garrity-miepub marked this pull request as ready for review February 4, 2026 00:42
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR enhances the PermissionsEditor Storybook documentation by adding interactive controls to the Docs page. The changes enable users to dynamically modify simple props (userName, showEmployerAccess, className) directly in the documentation, while appropriately disabling controls for complex props like callbacks and arrays.

Changes:

  • Added argTypes configuration with interactive controls for userName, showEmployerAccess, and className
  • Disabled controls for complex props (groups, assignedPermissions, callbacks, etc.) to prevent confusion
  • Reordered stories by moving Default story before Interactive story, making it the primary example on the Docs page

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@garrity-miepub garrity-miepub merged commit e98cb1c into main Feb 4, 2026
16 checks passed
@garrity-miepub garrity-miepub deleted the feature/premissions-editor-updstes branch February 4, 2026 00:48
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.

2 participants