-
Notifications
You must be signed in to change notification settings - Fork 861
[High contrast mode] DRY utilities #8205
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
[High contrast mode] DRY utilities #8205
Conversation
- with example usage for toast
- not totally sure why VRT is registering new changes - it looks the same to me? - no changes to EuiSwitch 🤷♂️
- some fun shenanignas with our `euiButton` color utils returning objects instead of strings, and Emotion _really_ not liking that / requiring manual serialization to a string - also not sure why VRT is being finicky here, but might as well update everything. SuperDatePicker hasn't been updated in a while I think
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.
Looks like a tiny difference in width somehow. I'd assume this is not an actual change but some rendering difference 🤷♀️
Screen.Recording.2024-12-05.at.20.34.51.mov
packages/eui/src/components/date_picker/react_date_picker.styles.ts
Outdated
Show resolved
Hide resolved
mgadewoll
left a comment
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.
🚢 🐈⬛ I really like the utils! Thanks for iterating on the names and syntax, it definitely fits nicely now, imho. 🎉
|
Preview staging links for this PR:
|
💚 Build Succeeded
History
|
Summary
Note
This PR merges into a feature branch.
@mgadewoll made the excellent suggestion last PR to add some utilities that reduce the number of high contrast mode ternaries in our styles. 🎉
While technically these "DRY" utils add more net lines, these are mostly due to formatting/syntax. Overall, I find this significantly more pleasant to read and easier to understand than the previous ternaries, although of course this is subjective - I'm open to feedback on this.
I'm particularly also looking for feedback on the names, as that's the hardest part of coding 😅
QA
Unit tests and VRT should have caught any issues, but if you want to quickly smoke test some touched components for
any regressions:
General checklist