-
Notifications
You must be signed in to change notification settings - Fork 0
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
Toggle the ticker from the banner design preview #517
Conversation
Needs styling.
We won't be showing the ticker toggle for any cases other than the banner design preview.
c52ab2a
to
4b0f771
Compare
shouldShowTickerToggle?: boolean; | ||
} | ||
|
||
const DEFAULT_TICKER_SETTINGS: TickerSettingsWithData = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if instead of hardcoding this in here we could include tickerSettings
in the variant data prop? And let useTickerData
do its thing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've refactored to support this - most of the complexity around toggling the ticker is now outside of the BannerVariantPreview
component. When toggled on for a design the ticker data is threaded through as part of the variant (as usual).
<BannerVariantPreview | ||
variant={buildVariantForPreview(design, shouldShowTicker)} | ||
design={design} | ||
controls={ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💯
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
great!
What does this change?
When live previewing a banner design, support toggling the ticker on and off (this setting usually comes from the variant, which is hardcoded in this case).
How to test
Live preview a banner design (locally or in CODE). Toggle the ticker with the control which pops up.
How can we measure success?
Have we considered potential risks?
Images
Accessibility