Skip to content

Commit a4a3d62

Browse files
committed
Remove old quo requires from status_im2 namespace
1 parent 848cac3 commit a4a3d62

File tree

11 files changed

+26
-22
lines changed

11 files changed

+26
-22
lines changed

Makefile

+1
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,7 @@ endef
311311
lint: export TARGET := clojure
312312
lint: ##@test Run code style checks
313313
@sh scripts/lint-re-frame-in-quo-components.sh && \
314+
sh scripts/lint-old-quo-usage.sh && \
314315
clj-kondo --config .clj-kondo/config.edn --cache false --fail-level error --lint src && \
315316
ALL_CLOJURE_FILES=$(call find_all_clojure_files) && \
316317
zprint '{:search-config? true}' -sfc $$ALL_CLOJURE_FILES && \

scripts/lint-old-quo-usage.sh

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/usr/bin/env sh
2+
3+
QUO_USAGES=$(grep -r -E '\[quo\.[^ ]* :as' --include '*.cljs' --include '*.clj' './src/status_im2')
4+
5+
echo -e "\nChecking 'status_im2' namespace for 'quo' namespace usage."
6+
7+
if [ -n "$QUO_USAGES" ]; then
8+
echo -e "\033[0;31mERROR: Usage of the old 'quo' namespace detected in 'status_im2' code. Please update to 'quo2'. \n"
9+
echo -e "$QUO_USAGES \033[0m"
10+
exit 1
11+
fi
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
(ns status-im2.common.qr-code-viewer.style
2-
(:require [quo.design-system.colors :as colors]))
2+
(:require [quo2.foundations.colors :as colors]))
33

44
(def qr-code-padding 16)
55

@@ -9,9 +9,7 @@
99
:width width
1010
:height width
1111
:padding-horizontal 16
12-
:background-color colors/white-persist
13-
:border-color colors/black-transparent
12+
:background-color colors/white
1413
:align-items :center
1514
:justify-content :center
16-
:border-width 1
1715
:border-radius 8})

src/status_im2/common/theme/core.cljs

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
(ns status-im2.common.theme.core
2-
(:require [quo.theme :as quo]
3-
[quo2.theme :as quo2]
2+
(:require [quo2.theme :as quo.theme]
43
[utils.re-frame :as rf]
54
[oops.core :refer [oget]]
65
[react-native.core :as rn]
@@ -31,5 +30,4 @@
3130

3231
(defn set-theme
3332
[value]
34-
(quo/set-theme value)
35-
(quo2/set-theme value))
33+
(quo.theme/set-theme value))

src/status_im2/contexts/chat/messages/content/text/style.cljs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
(ns status-im2.contexts.chat.messages.content.text.style
22
(:require [quo2.foundations.colors :as colors]
3-
[quo.platform :as platform]))
3+
[react-native.platform :as platform]))
44

55
(def block
66
{:border-radius 6

src/status_im2/contexts/quo_preview/community/community_card_view.cljs

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
(ns status-im2.contexts.quo-preview.community.community-card-view
2-
(:require [quo.design-system.colors :as quo.colors]
3-
[quo2.core :as quo]
2+
(:require [quo2.core :as quo]
43
[reagent.core :as reagent]
54
[status-im2.common.resources :as resources]
65
[status-im2.contexts.quo-preview.preview :as preview]
@@ -13,7 +12,7 @@
1312
"Status is a secure messaging app, crypto wallet and web3 browser built with the state of the art technology"
1413
:cover (resources/get-mock-image :community-cover)
1514
:community-icon (resources/get-mock-image :status-logo)
16-
:color (rand-nth quo.colors/chat-colors)
15+
:customization-color :blue
1716
:tokens [{:id 1 :group [{:id 1 :token-icon (resources/get-mock-image :status-logo)}]}]
1817
:tags [{:id 1
1918
:tag-label (i18n/label :t/music)

src/status_im2/contexts/quo_preview/community/data.cljs

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
(ns status-im2.contexts.quo-preview.community.data
2-
(:require [quo.design-system.colors :as quo.colors]
3-
[utils.i18n :as i18n]
2+
(:require [utils.i18n :as i18n]
43
[status-im2.common.resources :as resources]))
54

65
(def thumbnail
@@ -11,8 +10,8 @@
1110
:name "Status"
1211
:description
1312
"Status is a secure messaging app, crypto wallet and web3 browser built with the state of the art technology"
13+
:customization-color :blue
1414
:community-icon thumbnail
15-
:color (rand-nth quo.colors/chat-colors)
1615
:tokens [{:id 1 :group [{:id 1 :token-icon (resources/get-mock-image :status-logo)}]}]
1716
:tags [{:id 1 :tag-label (i18n/label :t/music) :resource (resources/get-image :music)}
1817
{:id 2

src/status_im2/contexts/quo_preview/inputs/profile_input.cljs

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
[reagent.core :as reagent]
44
[status-im2.common.resources :as resources]
55
[status-im2.contexts.quo-preview.preview :as preview]
6-
[quo.react-native :as rn]))
6+
[react-native.core :as rn]))
77

88
(def descriptor
99
[{:key :disabled?

src/status_im2/contexts/quo_preview/onboarding/small_option_card.cljs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
(ns status-im2.contexts.quo-preview.onboarding.small-option-card
22
(:require
3-
[quo.react-native :as rn]
3+
[react-native.core :as rn]
44
[quo2.components.onboarding.small-option-card.view :as quo2]
55
[quo2.foundations.colors :as colors]
66
[reagent.core :as reagent]

src/status_im2/contexts/quo_preview/tags/tag.cljs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
(ns status-im2.contexts.quo-preview.tags.tag
2-
(:require [quo.react-native :as rn]
2+
(:require [react-native.core :as rn]
33
[quo2.foundations.colors :as colors]
44
[quo2.components.tags.tag :as tag]
55
[status-im.ui.components.react :as react]

src/status_im2/contexts/syncing/sheets/enter_password/view.cljs

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
(ns status-im2.contexts.syncing.sheets.enter-password.view
22
(:require [utils.i18n :as i18n]
3-
[quo.core :as quo-old]
43
[quo2.core :as quo]
54
[quo2.foundations.colors :as colors]
65
[react-native.core :as rn]
@@ -22,13 +21,12 @@
2221
(i18n/label :t/enter-your-password)]
2322
[rn/view {:flex-direction :row :align-items :center}
2423
[rn/view {:flex 1}
25-
[quo-old/text-input
24+
[quo/input
2625
{:placeholder (i18n/label :t/enter-your-password)
2726
:auto-focus true
2827
:accessibility-label :password-input
29-
:show-cancel false
3028
:on-change-text #(reset! entered-password %)
31-
:secure-text-entry true}]]]
29+
:type :password}]]]
3230
[rn/view
3331
{:padding-horizontal 18
3432
:margin-top 20}

0 commit comments

Comments
 (0)