-
Notifications
You must be signed in to change notification settings - Fork 6
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
Refactor icons, closes LEA-1776 #844
Conversation
apps/mobile/src/app/(home)/settings/wallet/configure/[wallet]/index.tsx
Outdated
Show resolved
Hide resolved
|
||
import { Theme } from '../../theme-native'; | ||
|
||
type IconSize = 'small' | 'medium' | 'large'; |
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.
Can you introduce a types
file and share the types between web and native?
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.
Good call. Re-used both this and the size map.
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.
Great work here @tigranpetrossian 👏
The only blocker to merge is some type duplication
Did you have any luck adding support for URL icons? We will need that for SIP-10 tokens
0499347
to
1561b6f
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## dev #844 +/- ##
=======================================
Coverage 40.47% 40.47%
=======================================
Files 204 204
Lines 9585 9585
Branches 570 570
=======================================
Hits 3880 3880
Misses 5705 5705
|
@pete-watters 👍 The URL support is for Avatars I believe, this PR is just for the icon system. |
1561b6f
to
4230b69
Compare
4230b69
to
12cdc7b
Compare
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.
Hoping you release and do a fast follow updating the extension. Also, please update and address fixes in the extension with panda-preset
pkg changes.
@fbwoolf Hey Fara, there should be no breaking changes for the extension here. Which |
Install the update and see type errors. I had to revert the update yest. I just said pls do the update in the extension right away. I don't know if there are breaking changes. It should be part of this work to do both updates imo. |
@tigranpetrossian it was actually the ui lib update I had to revert. Sorry, I had that incorrect. |
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.
Fantastic @tigranpetrossian 👏🏼
@fbwoolf Ah I see, that's probably the Badge updates. There was a PR addressing those changes in draft mode against the extension, I updated it few hours ago and will merge shortly. This particular PR doesn't add any breaking changes. |
Great, thx for clarifying. |
This PR improves our icon set, adds some features and addresses the repetitivness in individual icon files, as well as adds missing sizes/platform-specific versions of existing icons.
Color support in mobile
Before
After
HOC vs. repetitive control flow for creating icons
Before
After
New size variant + ability to specify the default size when necessary
P.S.
The idea I had initially was to entirely automate generation of icons from either the SVG folder or the Figma file. I have a working version of this (in fact icon file changes in this file were generated by it), but it's still unstable at places, and needs some work to make updates completely effortless. Planning to add it during one of the following cooldowns.