-
Notifications
You must be signed in to change notification settings - Fork 987
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
feat: new keycard component #15892
feat: new keycard component #15892
Conversation
Hey @codemaster115, and thank you so much for making your first pull request in status-mobile! ❤️ Please help us make your experience better by filling out this brief questionnaire https://goo.gl/forms/uWqNcVpVz7OIopXg2 |
Jenkins BuildsClick to see older builds (16)
|
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.
thank you for your contribution
[quo2.components.keycard.style :as style] | ||
[quo2.components.tags.tag :as tag] | ||
[quo2.foundations.colors :as colors] | ||
[status-im2.common.resources :as resources] |
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.
quo shouldn't know about status-im, so there are two ways
- move component to common
- move resources outside status-im
@ilmotta @J-Son89 @ulisesmac wdyt?
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.
Yes, I agree. I think we should make another resources file in src/quo2 as well. 👍
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 agree with @J-Son89, sounds good 👍
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.
Up until this point we have been also passing assets/resources as props, so that's also an alternative to avoid coupling status-im2 concerns. But I like @J-Son89's idea too.
@@ -1687,6 +1687,8 @@ | |||
"database-reset-content": "Chats, contacts and settings have been deleted. You can use your account with your Keycard", | |||
"database-reset-warning": "Database will be reset. Chats, contacts and settings will be deleted", | |||
"empty-keycard-required": "Requires an empty Keycard", | |||
"empty-keycard": "Empty Keycard", | |||
"user-keycard": "{{name}} Card", |
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.
Is this actually what the designers envisioned or should it just be the users name? cc @xAlisher
(-> (h/expect (h/query-by-label-text :holder-name)) | ||
(h/is-equal (i18n/label :t/user-keycard {:name :holder-name})))) | ||
|
||
(h/test "Render of keycard component when: Status = Filled, Locked = True" |
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 last test is missing a prop to make it locked and the evaluators in the test do not check for any locked properties.
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.
Thank you so much for this PR!
It looks good to me 👍 😃
[quo2.components.keycard.style :as style] | ||
[quo2.components.tags.tag :as tag] | ||
[quo2.foundations.colors :as colors] | ||
[status-im2.common.resources :as resources] |
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 agree with @J-Son89, sounds good 👍
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 work. LGTM!
(defn preview-keycard | ||
[] | ||
[rn/view | ||
{:style {:background-color (colors/theme-colors colors/white colors/neutral-95) | ||
:flex 1}} | ||
[rn/flat-list | ||
{:style {:flex 1} | ||
:keyboard-should-persist-taps :always | ||
:header [cool-preview] | ||
:key-fn str}]]) |
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 think rn/view
can be removed and apply the background-color
to flat-list
?
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 job, thank you
pls run [2023-05-15T13:25:22.047Z] Formatting required in file src/quo2/foundations/resources.cljs [2023-05-15T13:25:56.626Z] Processed 1105 files, 1 of which requires formatting. |
BTW: This pr does not need QA as it is only new code in the quo2 component library and not touching application code. |
85% of end-end tests have passed
Not executed tests (4)Failed tests (4)Click to expandClass TestGroupChatMultipleDeviceMergedNewUI:
Class TestOneToOneChatMultipleSharedDevicesNewUi:
Class TestCommunityMultipleDeviceMerged:
Passed tests (23)Click to expandClass TestCommunityMultipleDeviceMerged:
Class TestGroupChatMultipleDeviceMergedNewUI:
Class TestCommunityOneDeviceMerged:
Class TestOneToOneChatMultipleSharedDevicesNewUi:
Class TestActivityCenterContactRequestMultipleDevicePR:
|
fixes #15823
Summary
New Keycard component per design
Review notes
New component by given figma design
quo2/components
folder by given structure and best practices.Testing notes
There's a preview screen for the component
status: wip