Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

fix(svelte): Fix icon color in search sidebar#63288

Merged
fkling merged 3 commits into
mainfrom
fkling/srch-552-properly-update-icon-color-in-selected-search-sidebar
Jun 17, 2024
Merged

fix(svelte): Fix icon color in search sidebar#63288
fkling merged 3 commits into
mainfrom
fkling/srch-552-properly-update-icon-color-in-selected-search-sidebar

Conversation

@fkling

@fkling fkling commented Jun 17, 2024

Copy link
Copy Markdown
Contributor

Fixes srch-552

When selecting a file filter in the search sidebar the file icon doesn't change color and is often difficult to see against the selected background color.

This commit fixes that and cleans up the icon coloring logic to be more consistent: All icons now have the default icon color --icon-color, which is set globally. This color can be overridden by setting --icon-color "locally", i.e. closer to the icon. --icon-fill-color and --color was removed.

Test plan

Manual inspection. I looked at most places where we have icons and compared them to the production version.

When selecting a file filter in the search sidebar the file icon doesn't
change color and is often difficult to see against the selected
background color.

This commit fixes that an cleans up the icon coloring logic to be more
consistent: All icons now have the default icon color `--icon-color`,
which is set globally. This color can be overridden by setting
`--icon-color` "locally", i.e. closer to the icon.
@fkling fkling requested a review from a team June 17, 2024 12:08
@fkling fkling self-assigned this Jun 17, 2024
@cla-bot cla-bot Bot added the cla-signed label Jun 17, 2024
<path
d="M17.5756 12.1801C18.1216 12.7075 18.1437 13.5851 17.625 14.1403L17.1423 14.6569C13.3654 18.6994 6.99777 18.5987 3.34628 14.4387C2.84481 13.8674 2.89377 12.9909 3.45565 12.481C4.01752 11.9711 4.87954 12.0209 5.38102 12.5922C7.97062 15.5424 12.4865 15.6139 15.1651 12.747L15.6477 12.2304C16.1664 11.6752 17.0296 11.6527 17.5756 12.1801Z"
fill="var(--icon-fill-color, #00cbec)"
fill="var(--icon-color, #00cbec)"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

If icon color is set globally, won't this make us unable to use the colored form of the icon? Or should we be doing something like --icon-color: unset to opt-in to the colors?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Mmmh, I guess you are right. I originally set it up to have no default. I just fixed it with --icon-color: initial.
It doesn't feel great to me but @taiyab suggested that having a default icon color is better than the other way round.
Should we go the other way though at some point I hope that it's not too difficult (yet) to do that.

@fkling fkling merged commit f716d7a into main Jun 17, 2024
@fkling fkling deleted the fkling/srch-552-properly-update-icon-color-in-selected-search-sidebar branch June 17, 2024 16:45
fkling added a commit that referenced this pull request Jun 20, 2024
Closes srch-458

This implements the new fuzzy finder design, specifically:

- Backdrop and dropshadow
- Border radius
- Tab header (affects all tab headers)
- Options

Note 1: Some aspects of the options UI (such as how paths are rendered
and highlighted), and the "footer" depend on how the highlighted parts
are computed. This will change when the local matching and ranking logic
is removed and will be updated when that happens.

Note 2: The symbol icon coloring was broken by #63288 and will be fixed
in a separate PR.

## Test plan

Manual testing
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants