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

Remove global css module that was applying red borders #40112

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rafpaf
Copy link
Contributor

@rafpaf rafpaf commented Mar 13, 2024

This PR removes global.module.css, which was applying a red border to anything with class "undefined". I think this is debugging code that can be removed.

image

Screenshot from /reference/segments

@rafpaf rafpaf requested a review from deniskaber March 13, 2024 21:58
@metabase-bot metabase-bot bot added the .Team/AdminWebapp Admin and Webapp team label Mar 13, 2024
@rafpaf rafpaf added the backport Automatically create PR on current release branch on merge label Mar 13, 2024
Copy link

replay-io bot commented Mar 13, 2024

Status Complete ↗︎
Commit e80c44d
Results
1 Failed
⚠️ 3 Flaky
2346 Passed

Copy link
Contributor

@deniskaber deniskaber left a comment

Choose a reason for hiding this comment

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

Hey @rafpaf ! We should find why undefined is passed as classname to those components rather than removing this css rule. It was added to track such incorrect class names usages.

@iethree
Copy link
Contributor

iethree commented Mar 13, 2024

🤔 This feels like a strange approach to me. I can see how this red box would be helpful in development, but it looks like we're shipping debug code in production here.

Copy link
Contributor Author

rafpaf commented May 13, 2024

I'm still concerned about this. I only know part of the story, so let me share that part - how things look from my point of view. The red line might make sense if we will easily notice it. On the screenshotted page, though, it appeared on items that are tucked away on the "Learn about our data" page. That is a somewhat high-visibility page (you can get to it by clicking two high-visibility links in a row). But it's not a page that we visit often, and we don't have any visual tests that cover it. To my mind, this indicates that the red border strategy is quite risky. It risks creating an embarrassing visual error that we might not notice until we hear about it from users.

I am sure that I don't understand the whole context though. What am I missing?

@rafpaf
Copy link
Contributor Author

rafpaf commented May 13, 2024

A middle way might be to switch this on just in development environments and in stats, if this is possible.

@dpsutton
Copy link
Contributor

@deniskaber would a good solution being coming up with a way to enable the red CSS in stats and local dev, but suppressing it in the regular course of business in production builds?

I really like stats to highlight these as it's heavily used. Highlighting these CSS cases in the regular production jar feels far worse than an undefined class to me.

Does this seem like a good way to track CSS issues while not drawing unwarranted attention to perhaps minor mistakes in customer builds?

@deniskaber
Copy link
Contributor

@deniskaber would a good solution being coming up with a way to enable the red CSS in stats and local dev, but suppressing it in the regular course of business in production builds?

I really like stats to highlight these as it's heavily used. Highlighting these CSS cases in the regular production jar feels far worse than an undefined class to me.

Does this seem like a good way to track CSS issues while not drawing unwarranted attention to perhaps minor mistakes in customer builds?

Hey @dpsutton! Sure! I think it is a good idea, let's do it.

@rafpaf rafpaf marked this pull request as draft May 29, 2024 17:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport Automatically create PR on current release branch on merge .Team/AdminWebapp Admin and Webapp team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants