Skip to content

Commit 179104a

Browse files
committed
test
1 parent c9223cd commit 179104a

5 files changed

Lines changed: 70 additions & 29 deletions

File tree

src/status_im2/contexts/shell/animation.cljs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,14 @@
33
[re-frame.core :as re-frame]
44
[react-native.reanimated :as reanimated]
55
[reagent.core :as reagent]
6-
[status-im.async-storage.core :as async-storage]
7-
[status-im2.contexts.shell.constants :as shell.constants] ;;TODO remove when not used anymore
8-
))
6+
[status-im.async-storage.core :as async-storage] ;;TODO remove when not used anymore
7+
[status-im2.contexts.shell.constants :as shell.constants]))
98

109
;; Atoms
1110
(def selected-stack-id (atom nil))
1211
(def screen-height (atom nil))
1312
(def home-stack-state (atom shell.constants/close-with-animation))
14-
(def pass-through? (atom false)) ;; TODO - Use dynamic pass-through for transparent bottom tabs
13+
(def pass-through? (atom true)) ;; TODO - Use dynamic pass-through for transparent bottom tabs
1514
(def shared-values-atom (atom nil))
1615

1716
;; Reagent atoms used for lazily loading home screen tabs

src/status_im2/contexts/shell/bottom_tabs.cljs

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
(ns status-im2.contexts.shell.bottom-tabs
22
(:require [quo2.components.navigation.bottom-nav-tab :as bottom-nav-tab]
33
[react-native.core :as rn]
4+
[quo2.foundations.colors :as colors]
45
[react-native.reanimated :as reanimated]
56
[status-im2.contexts.shell.animation :as animation]
67
[status-im2.contexts.shell.constants :as shell.constants]
@@ -17,6 +18,24 @@
1718
:on-press #(animation/bottom-tab-on-press stack-id)
1819
:accessibility-label (str (name stack-id) "-tab")}])
1920

21+
(defn tabs [shared-values]
22+
[rn/view {:style (styles/bottom-tabs)}
23+
[bottom-tab :i/communities :communities-stack shared-values]
24+
[bottom-tab :i/messages :chats-stack shared-values]
25+
[bottom-tab :i/wallet :wallet-stack shared-values]
26+
[bottom-tab :i/browser :browser-stack shared-values]])
27+
28+
(defn bottom-tabs-blur-background [shared-values]
29+
[rn/blur-view
30+
{:style {:height 120
31+
:position :absolute
32+
:width "100%"
33+
:bottom 1
34+
:background-color colors/neutral-100-opa-70}
35+
:blur-amount 10
36+
:blur-type :dark
37+
:overlay-color :transparent}])
38+
2039
(defn bottom-tabs
2140
[]
2241
[:f>
@@ -28,8 +47,5 @@
2847
original-style)]
2948
(animation/load-stack @animation/selected-stack-id)
3049
[reanimated/view {:style animated-style}
31-
[rn/view {:style (styles/bottom-tabs)}
32-
[bottom-tab :i/communities :communities-stack shared-values]
33-
[bottom-tab :i/messages :chats-stack shared-values]
34-
[bottom-tab :i/wallet :wallet-stack shared-values]
35-
[bottom-tab :i/browser :browser-stack shared-values]]]))])
50+
[bottom-tabs-blur-background shared-values]
51+
[tabs shared-values]]))])

src/status_im2/contexts/shell/cards/view.cljs

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@
2525
:size :small
2626
:override-theme :dark
2727
:label (i18n/label :t/kicked)}]
28-
(:count :permission) [:<>]) ;; Add components for these cases
28+
(:count :permission) [:<>] ;; Add components for these cases
29+
30+
nil)
2931

3032
shell.constants/community-channel-card
3133
[rn/view
@@ -130,7 +132,9 @@
130132
{:weight :semi-bold
131133
:size :heading-2
132134
:style {:color colors/white-opa-70}}
133-
(string/upper-case (first (:name avatar-params)))]])))
135+
(string/upper-case (first (:name avatar-params)))]])
136+
137+
nil))
134138

135139
(defn subtitle
136140
[type {:keys [content-type data]}]
@@ -259,4 +263,6 @@
259263
[wallet-graph data]
260264

261265
shell.constants/communities-discover ;; Home Card
262-
[communities-discover data]))
266+
[communities-discover data]
267+
268+
nil))

src/status_im2/contexts/shell/style.cljs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@
77
;; Bottom Tabs
88
(defn bottom-tabs-container
99
[pass-through?]
10-
{:background-color (if pass-through? colors/neutral-100-opa-70 colors/neutral-100)
10+
{:background-color (if pass-through? :transparent colors/neutral-100)
1111
:flex 1
1212
:align-items :center
13-
:flex-direction :column
1413
:height (shell.constants/bottom-tabs-container-height)
1514
:position :absolute
1615
:bottom -1
1716
:right 0
1817
:left 0
18+
:overflow :hidden
1919
:accessibility-label :bottom-tabs-container})
2020

2121
(defn bottom-tabs
@@ -26,6 +26,8 @@
2626
:flex 1
2727
:accessibility-label :bottom-tabs})
2828

29+
;; (defn bottom-tabs-blur-overlay
30+
2931
;; Home Stack
3032
(defn home-stack
3133
[]

src/status_im2/contexts/shell/view.cljs

Lines changed: 33 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -71,22 +71,39 @@
7171
(let [data (if (seq switcher-cards) switcher-cards empty-cards)]
7272
[:<>
7373
[rn/flat-list
74-
{:data data
75-
:render-fn render-card
76-
:key-fn :id
77-
:header (jump-to-text)
78-
:num-columns 2
79-
:column-wrapper-style {:margin-horizontal shell-margin
80-
:justify-content :space-between
81-
:margin-bottom 16}
82-
:style {:top 0
83-
:left 0
84-
:right 0
85-
:bottom -1
86-
:position :absolute}}]
74+
{:data data
75+
:render-fn render-card
76+
:key-fn :id
77+
:header (jump-to-text)
78+
:num-columns 2
79+
:column-wrapper-style {:margin-horizontal shell-margin
80+
:justify-content :space-between
81+
:margin-bottom 16}
82+
:style {:top 0
83+
:left 0
84+
:right 0
85+
:bottom -1
86+
:position :absolute}
87+
:content-container-style {:padding-bottom (shell.constants/bottom-tabs-container-height)}}]
8788
(when-not (seq switcher-cards)
8889
[placeholder])]))
8990

91+
(defn top-nav-blur-background []
92+
[rn/view {:style {:height (+ 56 (rn/status-bar-height))
93+
:position :absolute
94+
:width "100%"
95+
:top 0
96+
:overflow :hidden}}
97+
[rn/blur-view
98+
{:style {:height 100
99+
:position :absolute
100+
:width "100%"
101+
:top 0
102+
:background-color colors/neutral-100-opa-70}
103+
:blur-amount 10
104+
:blur-type :dark
105+
:overlay-color :transparent}]])
106+
90107
(defn shell
91108
[]
92109
(let [switcher-cards (rf/sub [:shell/sorted-switcher-cards])
@@ -101,11 +118,12 @@
101118
:bottom -1
102119
:position :absolute
103120
:background-color colors/neutral-100}}
121+
[jump-to-list switcher-cards shell-margin]
122+
[top-nav-blur-background]
104123
[common.home/top-nav
105124
{:type :shell
106125
:style {:margin-top (:top insets)
107-
:z-index 2}}]
108-
[jump-to-list switcher-cards shell-margin]])]))
126+
:z-index 2}}]])]))
109127

110128
(defn shell-stack
111129
[]

0 commit comments

Comments
 (0)