-
Notifications
You must be signed in to change notification settings - Fork 984
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
Implement "Drawer top" component #17196
Conversation
Jenkins BuildsClick to see older builds (32)
|
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.
Nice one @mmilad75
(defn- subtitle | ||
[{:keys [type theme blur? keycard? networks description community-name community-logo]}] | ||
(cond | ||
(= :keypair type) [rn/view {:style style/row} |
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.
Usually in our repo we see line breaks after the conditions to avoid right-aligning too much, otherwise it forces zprint to add line breaks too often (because its configured line length is 105 characters).
Usually when the cond
body extends to a few dozen lines, it's common to add an empty line between sections of the cond
macro. Side note: It's also possible to configure zprint to add line breaks between pairs in the cond macro (https://github.com/kkinnear/zprint/blob/main/doc/reference.md#map-nl-pair-nl-binding-nl).
So my suggestion here would be to style like this for improved readability:
(defn- subtitle
[{:keys [type theme blur? keycard? networks description community-name community-logo]}]
(cond
(= :keypair type)
[rn/view {:style style/row}
[text/text
{:size :paragraph-2
:weight :regular
:style (style/description theme blur?)}
(if keycard?
(i18n/label :t/on-keycard)
(i18n/label :t/on-device))]
(when keycard?
[icons/icon :i/keycard-card
{:color (colors/theme-colors colors/neutral-50 colors/neutral-40 theme)}])]
(= :account type)
[rn/view {:style style/row}
(for [network networks]
^{:key (str network)}
[network-view network])
[text/text
{:size :paragraph-2
:weight :regular
:style (style/description theme blur?)}
description]]
(= :default-keypair type)
[text/text
{:accessibility-label :default-keypair-text
:size :paragraph-2
:weight :regular
:style (style/description theme blur?)}
(str description " ∙ " (i18n/label :t/on-device))]
(= :context-tag type)
[rn/view
{:accessibility-label :context-tag-wrapper
:style {:flex-wrap :wrap}}
[context-tag/view
{:type :community
:community-name community-name
:community-logo community-logo
:size 24}]]
(and (not= :label type) description)
[text/text
{:size :paragraph-1
:weight :regular
:style (style/description theme blur?)}
description]))
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.
Done. Very good point 👍
|
||
(defn network-text-color | ||
[network] | ||
{:color (get colors/networks network)}) |
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.
hmm, I think we should use the custom-color resolving here. Same as we are using for everything else.
Can we add this map to the custom-colors function and then use as we are doing in the rest. That way we abstract these types of colors to that mechanism and then can just adjust that at a later as needs be 👍
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.
i.e imo we should update colors
map in the colors file to
(def colors-map
(merge {:primary {50 primary-50 ;; User can also use primary color as customisation color
60 primary-60}
:beige {50 "#CAAE93"
60 "#AA927C"}
...
customization
networks))
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.
so we can use (custom-colors network 50)
etc 👍
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.
perhaps we make these maps like networks private too using def-
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.
Done
(defn- view-internal | ||
[{:keys [title type theme description blur? community-name community-logo button-icon on-button-press | ||
on-button-long-press | ||
button-disabled? account-avatar-emoji account-avatar-customization-color icon-avatar |
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.
imo it is better to use customization-color
prop here as that's all this is. There won't be separate customization-colors on different components. This is also consistent with our other quo2 components api which is nice to have in the design system components 👍
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.
Done
:profile-picture profile-picture}] | ||
nil)) | ||
|
||
(defn- subtitle |
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.
This component can be broken up into smaller components
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.
Done
ff75953
to
64c3538
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.
nice one @mmilad75 ! :)
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.
Here's the design review, adding follow up required for minor fixes :)
9a9e645
to
0abc639
Compare
85e8bd3
to
2ee7942
Compare
This reverts commit c2a9f51.
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.
Looks good :)
Please look at Mario's comment about the dot alignment
I also fixed his comment |
@mmilad75 why PR has been merged without e2e and manual testing (as it was requested)? |
This also touched the colors mechanism which is used all over the application. Probably would have benefitted from having a quick QA check of the app. We only skip QA for completely new design system components where no code touches any of the code being used in the live application 👍 |
0% of end-end tests have passed
Failed tests (43)Click to expandClass TestCommunityOneDeviceMerged:
Class TestActivityMultipleDevicePR:
Class TestGroupChatMultipleDeviceMergedNewUI:
Class TestActivityCenterContactRequestMultipleDevicePR:
Class TestCommunityMultipleDeviceMerged:
Class TestOneToOneChatMultipleSharedDevicesNewUi:
Class TestCommunityMultipleDeviceMergedTwo:
Class TestActivityMultipleDevicePRTwo:
Class TestOneToOneChatMultipleSharedDevicesNewUiTwo:
|
This reverts commit fcbe6fe.
Francesca approved it as manual-test |
@Francesca-G is approved from design perspective, please, check out the doc for full process: https://github.com/status-im/status-mobile/blob/develop/doc/pipeline_process.md |
fixes #17021
Platforms