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

Friendly class names for styled-components Elements in non-official builds #4125

Merged
merged 1 commit into from
Dec 18, 2019

Conversation

petemill
Copy link
Member

@petemill petemill commented Dec 3, 2019

Aids devtools usage. Instead of just the classname "iHRorp", an element will get an additional className to identify the component name, e.g. "Header-sc-ofpjq6 iHRorp"

image

Fix brave/brave-browser#7193

Submitter Checklist:

Test Plan:

  • Open NTP
  • Inspect element
  • Expected: all elements should have human-understandable class name

Reviewer Checklist:

  • New files have MPL-2.0 license header.
  • Request a security/privacy review as needed.
  • Adequate test coverage exists to prevent regressions
  • Verify test plan is specified in PR before merging to source

After-merge Checklist:

  • The associated issue milestone is set to the smallest version that the
    changes has landed on.
  • All relevant documentation has been updated.

…uilds

Aids devtools usage. Instead of just the classname "iHRorp", an element will get an additional className to identify the component name, e.g. "Header-sc-ofpjq6 iHRorp"
@petemill petemill self-assigned this Dec 3, 2019
@cezaraugusto
Copy link
Contributor

@petemill it seems #4126 is a duplicate. can you confirm which one is valid?

@petemill
Copy link
Member Author

@cezaraugusto they are both exactly the same, so I will close the other one

Copy link
Contributor

@cezaraugusto cezaraugusto left a comment

Choose a reason for hiding this comment

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

++ thanks @petemill

@cezaraugusto cezaraugusto merged commit 7e9a300 into master Dec 18, 2019
@cezaraugusto cezaraugusto deleted the styled-components-devtools branch December 18, 2019 15:38
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.

WebUI elememts made with styled-components are not human-identifiable
2 participants