Draft
Conversation
4f21007 to
c1e6846
Compare
Contributor
Author
|
Current approach seem to not work with design usage. Switching to draft to think out another way |
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
This change is originally requested by Anastasia
The problem: we use svg scaling (setting its
widthandheight) for different sizes of the same icon. It leads to incorrect stroke scaling, blurry icons sometimes and overall visually different resulting icon because Anastasia prepares different icon variants for different cases.To fix it I propose the following changes:
infowith viewbox 16x16 would be namedinfo.svg, and with viewbox 12x12 -info-12.svgCode changes from this PR:
w(width) prop forSvgcomponent. If width is not provided it is infered from name (use number postfix (e.g.info-12.svg->12px) or16pxby defaultButtonnow tries to find small (12px) icon if its size is notmdorlginstead of setting itssizeto12pxcheckSvgIdAvailablehelper function which check if there is icon with providedid. List of available icons is being filled build timesearchicon variants,sidebaricon is updated. Use correctsearchicon variant in componentsWarning
There can be unexpected icon changes present after merging this PR so some updates are needed in client projects (e.g. Sanbase): like icons updates and
iconSizeandwfixesNotion card
https://www.notion.so/santiment/Fix-night-mode-bugs-2d12a82d1361804e8fa6c61d0dc685d6?source=copy_link