Skip to content

fix(CookieConsent): add comprehensive Storybook controls#52

Merged
garrity-miepub merged 1 commit intomainfrom
feature/cookie-consent-updates
Feb 3, 2026
Merged

fix(CookieConsent): add comprehensive Storybook controls#52
garrity-miepub merged 1 commit intomainfrom
feature/cookie-consent-updates

Conversation

@garrity-miepub
Copy link
Copy Markdown
Contributor

  • Add argTypes for all controllable props including showDecline and showCustomize
  • Add boolean controls for isVisible, showDecline, showCustomize, isMobileApp
  • Add text controls for message, acceptText, declineText, customizeText, appName
  • Add select controls for position and variant (already existed, now with descriptions)
  • Disable controls for complex link props (termsLink, privacyLink, cookieLink)
  • Add action handlers for onAccept, onDecline, onCustomize callbacks
  • Add default args at meta level with sensible defaults
  • Add Playground story for easy testing of all controls
  • Clean up existing stories to remove redundant args that are inherited from meta
  • Remove inline onAccept handlers that were overriding action handlers

The showDecline and showCustomize controls now work properly in the Storybook Controls panel, allowing dynamic toggling of these buttons.

cookie-consent-updates.mov

- Add argTypes for all controllable props including showDecline and showCustomize
- Add boolean controls for isVisible, showDecline, showCustomize, isMobileApp
- Add text controls for message, acceptText, declineText, customizeText, appName
- Add select controls for position and variant (already existed, now with descriptions)
- Disable controls for complex link props (termsLink, privacyLink, cookieLink)
- Add action handlers for onAccept, onDecline, onCustomize callbacks
- Add default args at meta level with sensible defaults
- Add Playground story for easy testing of all controls
- Clean up existing stories to remove redundant args that are inherited from meta
- Remove inline onAccept handlers that were overriding action handlers

The showDecline and showCustomize controls now work properly in the
Storybook Controls panel, allowing dynamic toggling of these buttons.
Copilot AI review requested due to automatic review settings February 3, 2026 00:03
@garrity-miepub garrity-miepub marked this pull request as ready for review February 3, 2026 00:04
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 CookieConsent Storybook configuration by adding comprehensive controls for all component props, enabling dynamic testing of the cookie consent banner through Storybook's Controls panel.

Changes:

  • Added comprehensive argTypes for all CookieConsent props with appropriate control types (boolean, text, select) and descriptions
  • Configured action handlers for callback props (onAccept, onDecline, onCustomize) to enable event tracking in Storybook
  • Added sensible default args at the meta level to reduce duplication across stories
  • Introduced a new Playground story for interactive testing of all controls
  • Cleaned up individual stories by removing redundant args that now inherit from meta defaults

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

@garrity-miepub garrity-miepub merged commit ded4dec into main Feb 3, 2026
16 checks passed
@garrity-miepub garrity-miepub deleted the feature/cookie-consent-updates branch February 3, 2026 00:08
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