Skip to content

Commit 221c501

Browse files
fix: remove qa-only features(unicorn, skull) (#17594)
1 parent 071d8f0 commit 221c501

File tree

6 files changed

+18
-127
lines changed

6 files changed

+18
-127
lines changed

Diff for: src/quo/components/navigation/top_nav/view.cljs

+1-17
Original file line numberDiff line numberDiff line change
@@ -95,25 +95,12 @@
9595
notification-count
9696
activity-center-on-press
9797
scan-on-press
98-
qr-code-on-press
99-
for-qa-only-cellular-network
100-
for-qa-only-no-network
101-
for-qa-only-network-type]
98+
qr-code-on-press]
10299
:as props}]
103100
(let [button-common-props (get-button-common-props {:theme theme
104101
:jump-to? jump-to?
105102
:blur? blur?})]
106103
[rn/view {:style style/right-section}
107-
(when (= for-qa-only-network-type "cellular")
108-
[button/button
109-
(merge (dissoc button-common-props :icon-only?)
110-
for-qa-only-cellular-network)
111-
"🦄"])
112-
(when (= for-qa-only-network-type "none")
113-
[button/button
114-
(merge (dissoc button-common-props :icon-only?)
115-
for-qa-only-no-network)
116-
"💀"])
117104
[button/button
118105
(assoc button-common-props :accessibility-label :open-scanner-button :on-press scan-on-press)
119106
:i/scan]
@@ -160,8 +147,5 @@
160147
:qr-code-on-press callback
161148
:notification-count number
162149
:max-unread-notifications used to specify max number for counter
163-
:for-qa-only-cellular-network used for testing purposed
164-
:for-qa-only-no-network used for testing purposed
165-
:for-qa-only-network-type used for testing purposed
166150
"
167151
(quo.theme/with-theme view-internal))

Diff for: src/status_im/bottom_sheet/sheets.cljs

-3
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,6 @@
2020
(map? view)
2121
(merge view)
2222

23-
(= view :mobile-network)
24-
(merge mobile-network-settings/settings-sheet)
25-
2623
(= view :mobile-network-offline)
2724
(merge mobile-network-settings/offline-sheet)
2825

Diff for: src/status_im/mobile_sync_settings/core.cljs

-9
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,6 @@
2929
cofx
3030
{:db (assoc db :network-status/initialized? true)}
3131
(cond
32-
(and logged-in?
33-
(utils/cellular? (:network/type db))
34-
(not remember-syncing-choice?)
35-
(not= :create-multiaccount (:view-id db)))
36-
37-
[(bottom-sheet/show-bottom-sheet-old
38-
{:view :mobile-network})
39-
(sheet-defaults)]
40-
4132
;; NOTE(rasom): When we log into account on-network-status-change is
4233
;; dispatched, but that doesn't mean there was a status change, thus
4334
;; no reason to restart wallet.

Diff for: src/status_im/ui/screens/mobile_network_settings/sheets.cljs

+5-66
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
(ns status-im.ui.screens.mobile-network-settings.sheets
22
(:require-macros [status-im.utils.views :as views])
3-
(:require
4-
[re-frame.core :as re-frame]
5-
[status-im.ui.components.checkbox.view :as checkbox]
6-
[status-im.ui.components.list.item :as list.item]
7-
[status-im.ui.components.react :as react]
8-
[status-im.ui.screens.mobile-network-settings.sheets-styles :as styles]
9-
[utils.i18n :as i18n]))
3+
(:require [re-frame.core :as re-frame]
4+
[status-im.ui.components.list.item :as list.item]
5+
[status-im.ui.components.react :as react]
6+
[status-im.ui.screens.mobile-network-settings.sheets-styles :as styles]
7+
[utils.i18n :as i18n]))
108

119
(defn title
1210
[label]
@@ -36,65 +34,6 @@
3634
:on-press #(re-frame/dispatch [:mobile-network/navigate-to-settings])}
3735
(i18n/label :t/mobile-network-go-to-settings)]])
3836

39-
(views/defview checkbox
40-
[]
41-
(views/letsubs [checked? [:mobile-network/remember-choice?]]
42-
[react/view
43-
{:style styles/checkbox-line-container
44-
:accessibility-label "remember-choice"}
45-
[checkbox/checkbox
46-
{:checked? checked?
47-
:style styles/checkbox
48-
:icon-style styles/checkbox-icon
49-
:on-value-change #(re-frame/dispatch [:mobile-network/remember-choice? %])}]
50-
[react/view
51-
{:style styles/checkbox-text-container}
52-
[react/text (i18n/label :t/mobile-network-sheet-remember-choice)]]]))
53-
54-
(defn settings
55-
[]
56-
[react/view
57-
{:style styles/settings-container}
58-
[react/nested-text
59-
{:style styles/settings-text
60-
:on-press #(re-frame/dispatch [:mobile-network/navigate-to-settings])}
61-
(i18n/label :t/mobile-network-sheet-configure)
62-
[{:style styles/settings-link}
63-
(str " " (i18n/label :t/mobile-network-sheet-settings))]]])
64-
65-
(defn hide-sheet-and-dispatch
66-
[event]
67-
(re-frame/dispatch [:bottom-sheet/hide-old])
68-
(re-frame/dispatch event))
69-
70-
(views/defview settings-sheet
71-
[]
72-
[react/view {:flex 1}
73-
[react/view {:align-items :center}
74-
[title :mobile-syncing-sheet-title]
75-
[details :mobile-syncing-sheet-details]]
76-
[list.item/list-item
77-
{:theme :accent
78-
:accessibility-label "mobile-network-continue-syncing"
79-
:title (i18n/label :t/mobile-network-continue-syncing)
80-
:subtitle (i18n/label :t/mobile-network-continue-syncing-details)
81-
:subtitle-max-lines 2
82-
:icon :main-icons/network
83-
:on-press #(hide-sheet-and-dispatch [:mobile-network/continue-syncing])}]
84-
[list.item/list-item
85-
{:theme :negative
86-
:accessibility-label "mobile-network-stop-syncing"
87-
:title (i18n/label :t/mobile-network-stop-syncing)
88-
:subtitle (i18n/label :t/mobile-network-stop-syncing-details)
89-
:icon :main-icons/cancel
90-
:on-press #(hide-sheet-and-dispatch [:mobile-network/stop-syncing])}]
91-
[separator]
92-
[react/view
93-
{:flex 1
94-
:align-self :stretch}
95-
[checkbox]
96-
[settings]]])
97-
9837
(views/defview offline-sheet
9938
[]
10039
[react/view {:flex 1}

Diff for: src/status_im/ui/screens/mobile_network_settings/view.cljs

-3
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,5 @@
5353
:on-press #(hide-sheet-and-dispatch [:mobile-network/restore-defaults])}
5454
(i18n/label :t/restore-defaults)]]]))
5555

56-
(def settings-sheet
57-
{:content sheets/settings-sheet})
58-
5956
(def offline-sheet
6057
{:content sheets/offline-sheet})

Diff for: src/status_im2/common/home/top_nav/view.cljs

+12-29
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,12 @@
11
(ns status-im2.common.home.top-nav.view
22
(:require
33
[quo.core :as quo]
4-
[react-native.core :as rn]
54
[status-im.multiaccounts.core :as multiaccounts]
65
[status-im2.common.home.top-nav.style :as style]
76
[status-im2.constants :as constants]
87
[utils.debounce :refer [dispatch-and-chill]]
98
[utils.re-frame :as rf]))
109

11-
(defn connectivity-sheet
12-
[]
13-
(let [peers-count (rf/sub [:peers-count])
14-
network-type (rf/sub [:network/type])]
15-
[rn/view
16-
[quo/text {:accessibility-label :peers-network-type-text} (str "NETWORK TYPE: " network-type)]
17-
[quo/text {:accessibility-label :peers-count-text} (str "PEERS COUNT: " peers-count)]]))
18-
1910
(defn view
2011
"[top-nav props]
2112
props
@@ -30,7 +21,6 @@
3021
avatar {:online? online?
3122
:full-name (multiaccounts/displayed-name account)
3223
:profile-picture (multiaccounts/displayed-photo account)}
33-
network-type (rf/sub [:network/type])
3424
unread-count (rf/sub [:activity-center/unread-count])
3525
indicator (rf/sub [:activity-center/unread-indicator])
3626
notification-type (case indicator
@@ -41,22 +31,15 @@
4131
; https://github.com/status-im/status-mobile/issues/17102
4232
nil)]
4333
[quo/top-nav
44-
{:avatar-on-press #(rf/dispatch [:navigate-to :my-profile])
45-
:scan-on-press #(js/alert "to be implemented")
46-
:activity-center-on-press #(rf/dispatch [:activity-center/open])
47-
:qr-code-on-press #(dispatch-and-chill [:open-modal :share-shell] 1000)
48-
:container-style (merge style/top-nav-container container-style)
49-
:blur? blur?
50-
:jump-to? jump-to?
51-
:customization-color customization-color
52-
:avatar-props avatar
53-
:max-unread-notifications constants/activity-center-max-unread-count
54-
:notification-count unread-count
55-
:notification notification-type
56-
:for-qa-only-cellular-network {:accessibility-label :on-cellular-network
57-
:on-press #(rf/dispatch [:show-bottom-sheet
58-
{:content connectivity-sheet}])}
59-
:for-qa-only-no-network {:accessibility-label :no-network-connection
60-
:on-press #(rf/dispatch [:show-bottom-sheet
61-
{:content connectivity-sheet}])}
62-
:for-qa-only-network-type network-type}]))
34+
{:avatar-on-press #(rf/dispatch [:navigate-to :my-profile])
35+
:scan-on-press #(js/alert "to be implemented")
36+
:activity-center-on-press #(rf/dispatch [:activity-center/open])
37+
:qr-code-on-press #(dispatch-and-chill [:open-modal :share-shell] 1000)
38+
:container-style (merge style/top-nav-container container-style)
39+
:blur? blur?
40+
:jump-to? jump-to?
41+
:customization-color customization-color
42+
:avatar-props avatar
43+
:max-unread-notifications constants/activity-center-max-unread-count
44+
:notification-count unread-count
45+
:notification notification-type}]))

0 commit comments

Comments
 (0)