-
-
Notifications
You must be signed in to change notification settings - Fork 229
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
refactor: make ContentSwitcher tabs design reusable #4066
Conversation
especially necessary for analytics tracking, so we can consistently recognize clicks inside the button padding
7d2c1d1
to
d35eb9f
Compare
Quick links (staging server):
Login:
SVG tester:Number of differences (default views): 0 ✅ Edited: 2024-10-17 15:54:17 UTC |
0635b71
to
0311406
Compare
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.
Nice!
The "Show more" button in the sources tab should be styled a bit differently, otherwise looks good!
Example chart: http://staging-site-content-switcher-refactor/grapher/covid-vaccine-by-age
Prod | Staging |
---|---|
Ah good catch, thank you! |
Part of #4015.
This makes it so the existing
<Tabs>
component now also handles<ContentSwitcher>
, which is the component used for chart/map/table tabs.I'm doing this by creating two styling variants for
<Tabs>
:default
, which is used in the sources tabslim
, which is used for the content switcher (and will be used in Cycle 2024.6: Refreshed Grapher download UI that uses server side csv generation #4015)Upsides:
Downside:
ContentSwitcher.tsx
now relies on variables inside bothContentSwitcher.scss
andTabs.scss
There shouldn't be any visual differences before and after, these tabs should look precisely the same as they did before 🕵🏻