-
Notifications
You must be signed in to change notification settings - Fork 646
Simplify for hex values #7244
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
Merged
Merged
Simplify for hex values #7244
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
2945c3b
simplify for hex values
lukasoppermann 2aa5cad
add changeset
lukasoppermann 3fd0c2f
Merge branch 'main' into lukasoppermann/issueLabel
lukasoppermann dce9d35
test(vrt): update snapshots
lukasoppermann 1e23a3a
Merge branch 'main' into lukasoppermann/issueLabel
lukasoppermann 0cd0900
Merge branch 'main' into lukasoppermann/issueLabel
jonrohan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| '@primer/react': patch | ||
| --- | ||
|
|
||
| "Update logic for how hex codes are applied" |
Binary file modified
BIN
-183 Bytes
(89%)
...omponents/IssueLabel.test.ts-snapshots/IssueLabel-Hex-dark-colorblind-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-184 Bytes
(89%)
...ts/components/IssueLabel.test.ts-snapshots/IssueLabel-Hex-dark-dimmed-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-183 Bytes
(89%)
...onents/IssueLabel.test.ts-snapshots/IssueLabel-Hex-dark-high-contrast-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-183 Bytes
(89%)
...snapshots/components/IssueLabel.test.ts-snapshots/IssueLabel-Hex-dark-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-183 Bytes
(89%)
...omponents/IssueLabel.test.ts-snapshots/IssueLabel-Hex-dark-tritanopia-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-255 Bytes
(85%)
...mponents/IssueLabel.test.ts-snapshots/IssueLabel-Hex-light-colorblind-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-255 Bytes
(85%)
...nents/IssueLabel.test.ts-snapshots/IssueLabel-Hex-light-high-contrast-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-255 Bytes
(85%)
...napshots/components/IssueLabel.test.ts-snapshots/IssueLabel-Hex-light-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-255 Bytes
(85%)
...mponents/IssueLabel.test.ts-snapshots/IssueLabel-Hex-light-tritanopia-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
158 changes: 0 additions & 158 deletions
158
packages/react/src/experimental/IssueLabel/getColorFromHex.ts
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
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.
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.
The simplified implementation loses critical functionality that was present in the previous code:
No hover/active states for custom colors: The old implementation generated different colors for rest/hover/active states using CSS custom properties (
--label-bgColor-rest,--label-bgColor-hover,--label-bgColor-active). The new implementation only sets staticbackgroundColorandcolor, so hover/active states won't work for customfillColorvalues.No light/dark mode support for custom colors: The previous implementation generated separate color schemes for light and dark modes (e.g.,
--label-bgColor-light-rest,--label-bgColor-dark-rest). The new implementation only sets a single background color that won't adapt to theme changes.Loss of color refinement logic: The old implementation had sophisticated logic to avoid overly bright/intense colors by capping saturation based on hue ranges, ensuring better visual consistency across different input colors.
The CSS module still expects these custom properties (lines 9-37 in IssueLabel.module.css), so this change will break the styling for labels with custom
fillColorvalues.