From ab1fd43f28f39dfb2690dbf0e924c3752911fab1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ulises=20Manuel=20C=C3=A1rdenas?= <90291778+ulisesmac@users.noreply.github.com> Date: Wed, 18 Jan 2023 12:00:47 -0600 Subject: [PATCH] Add Collectible ui component (#14803) --- resources/images/mock/collectible.png | Bin 0 -> 14231 bytes .../components/profile/collectible/style.cljs | 68 ++++++++++++ .../components/profile/collectible/view.cljs | 97 ++++++++++++++++++ src/status_im2/contexts/quo_preview/main.cljs | 6 +- .../quo_preview/profile/collectible.cljs | 47 +++++++++ 5 files changed, 217 insertions(+), 1 deletion(-) create mode 100644 resources/images/mock/collectible.png create mode 100644 src/quo2/components/profile/collectible/style.cljs create mode 100644 src/quo2/components/profile/collectible/view.cljs create mode 100644 src/status_im2/contexts/quo_preview/profile/collectible.cljs diff --git a/resources/images/mock/collectible.png b/resources/images/mock/collectible.png new file mode 100644 index 0000000000000000000000000000000000000000..c22b21c6b25f3b6c1fe2b63c81a3dc1bc7357fe6 GIT binary patch literal 14231 zcmV;IH)zO-P)005u}1^@s6i_d2*0004QX+uL$X=7sm z04R}lk-JMmaTLctYGDsUB8Q3w2a5)UD2T?g!9_yMAge{MufWIUUL~Y8XlW1{qLyAm z|3R%mYe5hcK}1`7uO;Mmt_n)%x%}?=@co_d;oNh<8q6v=y=xwF`JxsM_}#0~HMjj8 z3xl}mWhAEP>Ov?Kq+|R%O0~p;&+OH?u5I)ulDYzx9^qL<)r!J04Z*FVYVw}2OUc9% z!Y9IBO$HRcHT8I%-%L)|`O9Q25?%zW+0&hF;dl!x87(I~DeTE*OG;xN^Gh7b{K~TA zQ8{DigbCosO`H;&WGUj4oR^)o_f6G&OBBST$Xlh1CXO^2@p?rqN!O(0l;}x$vXsre z|KF#cnwhS5cle?E)i6HC!M+dGiedbo8bx4A_HL=j|fWC+L}-#O3a5;8AvFT9sH zzaQLt-}jm4J@4~8XKMh^q(2S%lY>U@-o0_|+&P>*bjYw}n+_8+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#stQC!8vQvUJzdk8HA3|n{nhWPlnQc9}$avp*;X+>7~7JMQ<_Fa2&EZ1#RJHq&? z_|YibyenCdGjMv^ia>A5^I}D^#1M+;aFT*!)&yi`XL@PUdFZaHJ7@n7hUYu9ud(fy z`_IkS8}Q0el6M)GQ8#dQa1cWd4iBr4ScT*3aC!}fUHks5k>`?`k>RQN&&9Lb#VAzt z@1fsA+@UR)bKS}h%_{1u+-6x2&cIIbT3XU}axZr>`2{%ihhAen;gT7jR58ovA-#Kx zR&Lz7N%@pjz7ZCiQfOrCdCjpCCnnN4P%(W@u_nsD!0`h4u-k$n#9LA@otgxWFubs8k})JTIUZ&7&2zD(vm65_X{;!)MulPT zf&JC?d??LiVrX!{BJNi+C`c=B{M&B_r>8yrmMkE|$kqYUgUo#12AgNMEqtzN0}>6z(^Mo*j=#Fc3Uv=PgawTshg zl8p(ftW>L|RPy$@C+@g7HZ7$@^<7S&fQ}5jWz~c#P*pRvwv=TnjZaLfa2Mol6p?L}d&lo`Mqb z`GQkh8B4(Gna`pO2Kolow%sTLkL9(&8R8i@X?JCyL+e(e8mmiH26V(rOHZ5Iv1ivs zl!!aujL`|QgAiHf1Q9icg@xrk*SGgt-}}B@DO$mfstzV3UplX+D@!z8)%L1dKR!ve zLKu + [tile + {:style style/top-left + :size size + :resource (first images)}] + [tile + {:style style/bottom-right + :size size + :resource (second images)}]]) + +(defn three-tiles + [{:keys [tiles size]}] + (let [[image-1 image-2 image-3 & _] tiles] + [:<> + [tile + {:style style/top-left + :size size + :resource image-1}] + [tile + {:style style/top-right + :size size + :resource image-2}] + [tile + {:style style/bottom-left + :size size + :resource image-3}]])) + +(defn tile-container + [{:keys [images]}] + (let [num-images (count images)] + (case num-images + 1 [tile + {:resource (first images) + :size :xl}] + 2 [two-tiles + {:images images + :size :lg}] + 3 [three-tiles + {:tiles images + :size :md}] + (let [[first-three-images remaining-images] (split-at 3 images)] + [:<> + [three-tiles {:tiles first-three-images :size :md}] + [rn/view {:style style/tile-sub-container} + (case num-images + 4 [tile + {:resource (nth images 3 nil) + :size :md}] + 5 [two-tiles + {:images (take 2 remaining-images) + :size :sm}] + 6 [three-tiles + {:tiles (take 3 remaining-images) + :size :xs}] + 7 [:<> + [three-tiles + {:tiles (take 3 remaining-images) + :size :xs}] + [tile + {:style style/bottom-right + :size :xs + :resource (nth remaining-images 3 nil)}]] + [:<> + [three-tiles + {:tiles (take 3 remaining-images) + :size :xs}] + [remaining-tiles (- (count remaining-images) 3)]])]])))) + +(defn collectible + [{:keys [images]}] + [rn/view {:style style/tile-outer-container} + [rn/view {:style style/tile-inner-container} + [tile-container {:images images}]]]) diff --git a/src/status_im2/contexts/quo_preview/main.cljs b/src/status_im2/contexts/quo_preview/main.cljs index 42fe1368bc..63b1eae795 100644 --- a/src/status_im2/contexts/quo_preview/main.cljs +++ b/src/status_im2/contexts/quo_preview/main.cljs @@ -45,6 +45,7 @@ [status-im2.contexts.quo-preview.notifications.activity-logs :as activity-logs] [status-im2.contexts.quo-preview.notifications.toast :as toast] [status-im2.contexts.quo-preview.posts-and-attachments.messages-skeleton :as messages-skeleton] + [status-im2.contexts.quo-preview.profile.collectible :as collectible] [status-im2.contexts.quo-preview.profile.profile-card :as profile-card] [status-im2.contexts.quo-preview.reactions.react :as react] [status-im2.contexts.quo-preview.record-audio.record-audio :as record-audio] @@ -178,7 +179,10 @@ :component messages-skeleton/preview-messages-skeleton}] :profile [{:name :profile-card :insets {:top false} - :component profile-card/preview-profile-card}] + :component profile-card/preview-profile-card} + {:name :collectible + :insets {:top false} + :component collectible/preview-collectible}] :reactions [{:name :react :insets {:top false} :component react/preview-react}] diff --git a/src/status_im2/contexts/quo_preview/profile/collectible.cljs b/src/status_im2/contexts/quo_preview/profile/collectible.cljs new file mode 100644 index 0000000000..1b9dd4de5d --- /dev/null +++ b/src/status_im2/contexts/quo_preview/profile/collectible.cljs @@ -0,0 +1,47 @@ +(ns status-im2.contexts.quo-preview.profile.collectible + (:require + [quo2.components.profile.collectible.view :as quo] + [react-native.core :as rn] + [reagent.core :as reagent] + [status-im2.contexts.quo-preview.preview :as preview])) + +(defonce test-image (js/require "../resources/images/mock/collectible.png")) +(def test-images (repeat 10 test-image)) + +(def descriptor + [{:label "Number of images" + :key :num-images + :type :select + :options (map (fn [n] + {:key n :value (str n " images")}) + (range 1 (inc (count test-images))))} + {:label "Random order of images" + :key :shuffle-images + :type :boolean}]) + +(defn cool-preview + [] + (let [state (reagent/atom {:num-images 1 :shuffle-images false})] + (fn [] + (let [images-to-show (cond->> test-images + (:shuffle-images @state) + (shuffle) + :always + (take (:num-images @state)))] + [rn/view + {:margin-bottom 50 + :padding 16} + [preview/customizer state descriptor] + [rn/view + {:padding-vertical 100 + :align-items :center} + [quo/collectible {:images images-to-show}]]])))) + +(defn preview-collectible + [] + [rn/view {:style {:flex 1}} + [rn/flat-list + {:flex 1 + :keyboard-should-persist-taps :always + :header [cool-preview] + :key-fn str}]])