-
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||
---|---|---|---|---|
|
@@ -23,8 +23,8 @@ | |||
(if collapsed? 50 170)) | ||||
|
||||
(defn f-scroll-page-header | ||||
[scroll-height height name page-nav-right-side logo sticky-header top-nav title-colum navigate-back? | ||||
collapsed? overlay-shown?] | ||||
[{:keys [scroll-height height page-nav-right-section-buttons sticky-header | ||||
top-nav title-colum navigate-back? collapsed? page-nav-props overlay-shown?]}] | ||||
(let [input-range [0 10] | ||||
output-range [-208 -45] | ||||
y (reanimated/use-shared-value scroll-height) | ||||
|
@@ -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 commentThe 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 commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for the explanation! 🙏 |
||||
[reanimated/view | ||||
{:style (style/sticky-header-title opacity-animation)} | ||||
[rn/image | ||||
{:source logo | ||||
:style style/sticky-header-image}] | ||||
[quo/text | ||||
{:size :paragraph-1 | ||||
:weight :semi-bold | ||||
:style {:line-height 21}} | ||||
name]]) | ||||
(if top-nav | ||||
[rn/view {:style {:margin-top 0}} | ||||
top-nav] | ||||
|
@@ -74,10 +63,12 @@ | |||
:background (if (= 1 (reanimated/get-shared-value opacity-animation)) | ||||
:blur | ||||
:photo) | ||||
:right-side page-nav-right-side | ||||
:right-side page-nav-right-section-buttons | ||||
:center-opacity (reanimated/get-shared-value opacity-animation) | ||||
:overlay-shown? overlay-shown?} | ||||
navigate-back? (assoc :icon-name :i/close | ||||
:on-press #(rf/dispatch [:navigate-back])))]) | ||||
:on-press #(rf/dispatch [:navigate-back])) | ||||
page-nav-props (merge page-nav-props))]) | ||||
(when title-colum | ||||
title-colum) | ||||
sticky-header]])) | ||||
|
@@ -105,14 +96,21 @@ | |||
(defn scroll-page | ||||
[_ _ _] | ||||
(let [scroll-height (reagent/atom negative-scroll-position-0)] | ||||
(fn [{:keys [name theme cover-image logo page-nav-right-section-buttons on-scroll | ||||
collapsed? | ||||
height top-nav title-colum background-color navigate-back? overlay-shown?]} | ||||
sticky-header | ||||
(fn [{:keys [theme cover-image logo on-scroll | ||||
collapsed? height top-nav title-colum background-color navigate-back? page-nav-props | ||||
overlay-shown? sticky-header]} | ||||
children] | ||||
[:<> | ||||
[:f> f-scroll-page-header @scroll-height height name page-nav-right-section-buttons | ||||
logo sticky-header top-nav title-colum navigate-back? collapsed? overlay-shown?] | ||||
[:f> f-scroll-page-header | ||||
{:scroll-height @scroll-height | ||||
:height height | ||||
:sticky-header sticky-header | ||||
:top-nav top-nav | ||||
:title-colum title-colum | ||||
:navigate-back? navigate-back? | ||||
:collapsed? collapsed? | ||||
:page-nav-props page-nav-props | ||||
:overlay-shown? overlay-shown?}] | ||||
[rn/scroll-view | ||||
{:content-container-style {:flex-grow 1} | ||||
:content-inset-adjustment-behavior :never | ||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
(ns status-im2.contexts.wallet.collectible.style) | ||
|
||
(def container | ||
{:margin-top 100 | ||
:margin-bottom 34}) | ||
|
||
(def preview | ||
{:margin-horizontal 8 | ||
:margin-top 12}) | ||
|
||
(def header | ||
{:margin-horizontal 20 | ||
:margin-top 16 | ||
:margin-bottom 12}) | ||
|
||
(def collection-container | ||
{:flex-direction :row | ||
:margin-top 6}) | ||
|
||
(def buttons-container | ||
{:flex-direction :row | ||
:align-items :stretch | ||
:margin-horizontal 20 | ||
:margin-top 8 | ||
:margin-bottom 20}) | ||
|
||
(def tabs | ||
{:margin-horizontal 20 | ||
:margin-vertical 12}) | ||
|
||
(def send-button | ||
{:flex 1 | ||
:margin-right 6}) | ||
|
||
(def opensea-button | ||
{:flex 1 | ||
:margin-left 6}) | ||
|
||
(def info-container | ||
{:flex-direction :row | ||
:margin-horizontal 20 | ||
:margin-top 8 | ||
:margin-bottom 12}) | ||
|
||
(def account | ||
{:margin-right 6 | ||
:flex 1}) | ||
|
||
(def network | ||
{:margin-left 6 | ||
:flex 1}) | ||
|
||
(def traits-section | ||
{:margin-horizontal 20 | ||
:margin-top 8}) | ||
|
||
(def traits-item | ||
{:margin-horizontal 6 | ||
:flex 1}) | ||
|
||
(def traits-container | ||
{:margin-horizontal 14 | ||
:margin-vertical 12}) |
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 putwallet-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