Repository navigation
fix: flexible icon color - #8717
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are reported for the shared-icon color inheritance changes.
No open issues 🎉
What changed in this PR
This PR makes shared icons inherit surrounding text color, fixing their appearance in dark menus when the global theme is light. The changes simplify color handling while preserving explicit color overrides.
Changes:
- Default server and folder icons to
currentColorinstead of global-theme colors. - Add an explicit color override to
FolderPlusIcon. - Remove the unused
FavoriteIconcomponent and export.
| File | Description |
|---|---|
| packages/compass-components/src/index.ts | Removes the FavoriteIcon export. |
| packages/compass-components/src/components/icons/server-icon.tsx | Defaults stroke color to surrounding text color. |
| packages/compass-components/src/components/icons/folder-plus-icon.tsx | Inherits text color and supports a color override. |
| packages/compass-components/src/components/icons/folder-icon.tsx | Defaults stroke color to surrounding text color. |
| packages/compass-components/src/components/icons/favorite-icon.tsx | Deletes the unused icon component. |
Review effort: Balanced
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.
Description
I noticed one of the newly added icons has the wrong color on the menu, because the menu is dark even though the global theme is light.
Using the color of the context makes things simpler - the icon now takes on dark/light depending on the surrounding text. I updated also some other icons and removed one that isn't used anymore.
Screenshots
Notice the same icon is on the sidebar and on the menu
Before
After