[High contrast mode] DRY utilities#8205
Merged
cee-chen merged 10 commits intoelastic:high-contrast-modefrom Dec 6, 2024
Merged
[High contrast mode] DRY utilities#8205cee-chen merged 10 commits intoelastic:high-contrast-modefrom
cee-chen merged 10 commits intoelastic:high-contrast-modefrom
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
cee-chen
commented
Dec 5, 2024
cee-chen
commented
Dec 5, 2024
cee-chen
commented
Dec 5, 2024
mgadewoll
reviewed
Dec 5, 2024
Contributor
There was a problem hiding this comment.
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
approved these changes
Dec 6, 2024
Contributor
mgadewoll
left a comment
There was a problem hiding this comment.
🚢 🐈⬛ 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:
|
Collaborator
💚 Build Succeeded
History
|
cee-chen
added a commit
that referenced
this pull request
Dec 6, 2024
cee-chen
added a commit
that referenced
this pull request
Dec 12, 2024
mgadewoll
pushed a commit
to mgadewoll/eui
that referenced
this pull request
Mar 14, 2025
12 tasks
mgadewoll
pushed a commit
to mgadewoll/eui
that referenced
this pull request
Mar 18, 2025
mgadewoll
pushed a commit
to mgadewoll/eui
that referenced
this pull request
Mar 18, 2025
mgadewoll
pushed a commit
to mgadewoll/eui
that referenced
this pull request
Mar 20, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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