-
Notifications
You must be signed in to change notification settings - Fork 985
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
Collectible details page #17520
Collectible details page #17520
Conversation
Jenkins BuildsClick to see older builds (9)
|
60859f6
to
6eeff34
Compare
@@ -4,7 +4,6 @@ | |||
(def container-info | |||
{:padding-horizontal 20 | |||
:padding-top 12 | |||
:flex-grow 1 |
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 is definitely safe? 🤔
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.
Did you check if it looks fine in quo2
and if used in other screens?
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.
No, it doesn't look fine, thanks!
That flex-grow was causing problems on wallet accounts page since it is used on the same page with flat-list
. And when there are not enough items in a flat-list, wallet-overview grows in width and that results in jumps when user switches between "assets" and "collectibles" tabs.
I will return flex-grow
and will put wallet-overview
in an enclosing view of fixed height. It is okay when it grows horizontally, but vertical growth isn't really needed for this component.
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 we shouldn't be using fixed height. Most of the time flex-box
is sufficient
@@ -54,17 +54,6 @@ | |||
:top 0 | |||
:left 0 | |||
:right 0}} | |||
(when logo |
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.
it's okay to delete this? this component is used in the communities overview page? or am I missing something and this code is elsewhere now?
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.
scroll-page
uses page-nav
internally but before it was using it with :type :no-title
and showing title/logo on top of that component. Since page-nav
know how to render title and logo, I got rid of logo in title directly in scroll-page
and added the possibility to configure internal page-nav
instead. Here is how communities overview now configured:
:page-nav-props {:type :community |
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.
Thanks for the explanation! 🙏
:name name | ||
:on-scroll #(reset! scroll-height %) | ||
:navigate-back? true | ||
:background-color (colors/theme-colors colors/white colors/neutral-95) |
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 it possible to add the theme
param here 🙏
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 commented usage of:background-color
in scroll-page
on both - community overview and discover pages and don't see any visual changes.
So I think we can get rid of background-color at all here. Transparent scroll-page is good enough)
In case we will need some coloring later, it probably would be more idiomatic to create a separate component through with-theme
, because now scroll-page
has no access to theme.
:right-side [{:icon-name :i/options | ||
:on-press #(js/alert "pressed")}] | ||
:picture image}} | ||
nil |
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.
what is nil being set on here? it's required or we can make this function/component multi-arity instead? 🤔
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.
Multi-arity doesn't work well with re-frame form-2 components, because they called only once and result is cached. But I passed sticky header component as a prop instead of making it an argument and that works well.
:status :default | ||
:size :default | ||
:title (i18n/label :t/account-title) | ||
:subtitle "Collectibles vault" |
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.
should we put all this info in the temp file? either way is okay for me 👍
:status :default | ||
:size :default | ||
:title (i18n/label :t/network) | ||
:subtitle "Mainnet"}]]] |
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 mainnet should be an i18n label right? it's a bit more permanent
{:description :default | ||
:card? true | ||
:status :default | ||
:size :default |
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.
do we use "size" default on that component? it's a bit older or something?
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.
data-item
component has sizes "small" and "default" by Figma design and as far as I can tell from quo implementation and preview.
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.
Thanks!
@@ -5,6 +5,9 @@ | |||
:padding-top 8 | |||
:padding-bottom 12}) | |||
|
|||
(def accounts-container | |||
{:height 112}) |
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.
should we just use flex instead?
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.
Using flex will affect the height of the component and it will change every time we change assets/collectibles tab (because we are switching between different flatlists and they take different amounts of space depending on children).
That change will result in the whole tabbar jumping when navigating tabs.
Btw, I don't remember discussing any problem with having fixed height, especially on the screens like this, where flat-list at the bottom will eat up all the remaining space. I believe fixed with is more problematic. But maybe I miss something?
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.
Yeah you're right!
@@ -46,7 +46,7 @@ | |||
(defn view | |||
[] | |||
(let [top (safe-area/get-top) | |||
selected-tab (reagent/atom (:id (first tabs-data)))] | |||
selected-tab (reagent/atom (:id (second tabs-data)))] |
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.
intentional?
:content-container-style {:padding-horizontal 8}}] | ||
:collectibles [quo/empty-state |
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.
curious, I guess we should still keep the empty-state right? as it is something we intent to keep when the user has none. Maybe we pass the mock data from higher up so this code can be left in place? 🤔
@@ -246,7 +246,7 @@ | |||
:component wallet-address-watch/view} | |||
|
|||
{:name :wallet-collectibles |
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.
should we change this name too?? to :wallet-collectible ?
@@ -4,7 +4,6 @@ | |||
(def container-info | |||
{:padding-horizontal 20 | |||
:padding-top 12 | |||
:flex-grow 1 |
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.
Did you check if it looks fine in quo2
and if used in other screens?
|
||
[rn/image | ||
{:source image | ||
:style style/preview}] | ||
|
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.
empty lines
{:weight :semi-bold | ||
:size :paragraph-1} | ||
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.
empty line
:size 40 | ||
:icon-left :i/opensea} | ||
(i18n/label :t/opensea)]] | ||
|
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.
empty line
{:id :about | ||
:label (i18n/label :t/about) | ||
:accessibility-label :about-tab}]}] | ||
|
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.
EL, and there is a few more in this file
If component is too long, then would be good to break it up into smaller pieces
6eeff34
to
94dca62
Compare
@J-Son89, @OmarBasem, fixed the review notes, could you please take a look again?) |
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 work @vkjr! 🥳
8f5a751
to
66e124c
Compare
84% of end-end tests have passed
Failed tests (7)Click to expandClass TestOneToOneChatMultipleSharedDevicesNewUi:
Class TestGroupChatMultipleDeviceMergedNewUI:
Class TestCommunityMultipleDeviceMergedTwo:
Passed tests (36)Click to expandClass TestActivityMultipleDevicePR:
Class TestCommunityOneDeviceMerged:
Class TestOneToOneChatMultipleSharedDevicesNewUi:
Class TestCommunityMultipleDeviceMerged:
Class TestOneToOneChatMultipleSharedDevicesNewUiTwo:
Class TestActivityCenterContactRequestMultipleDevicePR:
Class TestCommunityMultipleDeviceMergedTwo:
Class TestActivityMultipleDevicePRTwo:
Class TestGroupChatMultipleDeviceMergedNewUI:
|
fixes #17314, #17298
Summary
Implemented a collectibles list on an accounts page and the collectible details page.
Also few small changes were made:
page-nav
component middle part now can have opacity, to use this with animationscroll-page
now receives more configuration to its internalpage-nav
component and uses it instead of providing own logo/titleReview notes
Pages use mock data and do not have prepared
re-frame
subscriptions. They will be implemented as a next step when connecting to backend.Designs: https://www.figma.com/file/HKncH4wnDwZDAhc4AryK8Y/Wallet-for-Mobile?type=design&node-id=1355-300817&mode=dev
status: ready