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

Forbid using styles prop for Mantine components #42213

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

uladzimirdev
Copy link
Contributor

@uladzimirdev uladzimirdev commented May 3, 2024

Description

In several cases I faced overriding default styles in our metabase/ui components could be avoided (by using a variant of the same component or using another component), one of the simplest ways to override styles is to use styles prop, so let's forbid its usage by default

Copy link

github-actions bot commented May 3, 2024

Codenotify: Notifying subscribers in CODENOTIFY files for diff f418e68...8f2f324.

Notify File(s)
@alxnddr frontend/src/metabase/visualizations/visualizations/SmartScalar/SettingsComponents/AnotherColumnForm.tsx
frontend/src/metabase/visualizations/visualizations/SmartScalar/SettingsComponents/ComparisonPicker.tsx
@kdoh frontend/src/metabase/ui/components/data-display/Image/Image.tsx

Copy link

replay-io bot commented May 3, 2024

Status Complete ↗︎
Commit 8f2f324
Results
⚠️ 9 Flaky
2472 Passed

@iethree iethree self-requested a review May 3, 2024 15:24
Copy link
Contributor

@iethree iethree left a comment

Choose a reason for hiding this comment

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

I think you've identified an important issue here, but i think it probably needs a more subtle solution than simply banning styles props. Adding variants every time we need internal changes to a component is no good either. I fear that this approach will just leave us with lots of // eslint-disable comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
.Team/QueryingComponents visual Run Percy visual testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants