-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
base: master
Are you sure you want to change the base?
Conversation
|
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.
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.
🤔 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. |
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? |
A middle way might be to switch this on just in development environments and in stats, if this is possible. |
@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. |
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.
Screenshot from
/reference/segments