Skip to content
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

🔨 extract LabeledSwitch into components library #3850

Merged
merged 1 commit into from
Aug 6, 2024

Conversation

ikesau
Copy link
Member

@ikesau ikesau commented Aug 5, 2024

I need this thing for the data catalog, and didn't want to bog that PR down with a dependency refactor 🙂

The SCSS was scoped pretty aggressively to

@at-root {
    .controlsRow .chart-controls,
    .settings-menu-contents {
        .labeled-switch {
            // rules here
        }
}

It's the only component we have with the class name labeled-switch - so my first instinct is that it's safe to lift this up. I've also gone through and checked each of the places it's used:

TableFilterToggle.tsx
https://github.com/user-attachments/assets/d916b9bd-c613-47a7-b3b3-522d60a4aaec

FacetYDomainToggle.tsx
https://github.com/user-attachments/assets/263aa2bd-3ebe-43fa-b136-5a3473464358

AbsRelToggle.tsx
https://github.com/user-attachments/assets/9d2cdf3a-b12d-4a48-871f-06f32144dbe7

ZoomToggle.tsx
https://github.com/user-attachments/assets/e21a0686-86dc-4a7c-aa8e-fb1603eeb9eb

NoDataAreaToggle.tsx
Where do we show this? 😀

@ikesau ikesau requested a review from marcelgerber August 5, 2024 23:29
@ikesau ikesau self-assigned this Aug 5, 2024
@owidbot
Copy link
Contributor

owidbot commented Aug 5, 2024

Quick links (staging server):

Site Admin Wizard

Login: ssh owid@staging-site-extract-labeled-switch

SVG tester:

Number of differences (default views): 0 ✅
Number of differences (all views): 0 ✅

Edited: 2024-08-05 23:37:20 UTC
Execution time: 1.18 seconds

@marcelgerber
Copy link
Member

NoDataAreaToggle.tsx
Where do we show this? 😀

On Marimekko only, you're fine :) http://staging-site-extract-labeled-switch/grapher/life-expectancy-marimekko

Copy link
Member

@marcelgerber marcelgerber left a comment

Choose a reason for hiding this comment

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

yes please!

@ikesau ikesau merged commit bc66a38 into master Aug 6, 2024
27 checks passed
@ikesau ikesau deleted the extract-labeled-switch branch August 6, 2024 12:50
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.

3 participants