Remove old quo code from status_im2 namespace (#17404)

This commit is contained in:
Ajay Sivan 2023-09-28 09:27:31 -07:00 committed by GitHub
parent 8869271054
commit fe404ab005
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 23 additions and 13 deletions

View File

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

View File

@ -0,0 +1,13 @@
#!/usr/bin/env sh
set -euo pipefail
QUO_USAGES=$(grep -r -E '\[quo\.[^ ]* :(?:as|refer)|\[quo\.[^ ]*\]' --include '*.cljs' --include '*.clj' './src/status_im2' --exclude='./src/status_im2/common/theme/core.cljs' || true)
echo -e "\nChecking 'status_im2' namespace for 'quo' namespace usage."
if [ -n "$QUO_USAGES" ]; then
echo -e "\033[0;31mERROR: Usage of the old 'quo' namespace detected in 'status_im2' code. Please update to 'quo2'. \n"
echo -e "$QUO_USAGES \033[0m"
exit 1
fi

View File

@ -1,5 +1,5 @@
(ns status-im2.common.qr-code-viewer.style
(:require [quo.design-system.colors :as colors]))
(:require [quo2.foundations.colors :as colors]))
(def qr-code-padding 16)
@ -9,9 +9,7 @@
:width width
:height width
:padding-horizontal 16
:background-color colors/white-persist
:border-color colors/black-transparent
:background-color colors/white
:align-items :center
:justify-content :center
:border-width 1
:border-radius 8})

View File

@ -1,6 +1,6 @@
(ns status-im2.contexts.chat.messages.content.text.style
(:require [quo2.foundations.colors :as colors]
[quo.platform :as platform]))
[react-native.platform :as platform]))
(def block
{:border-radius 6

View File

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

View File

@ -1,6 +1,5 @@
(ns status-im2.contexts.quo-preview.community.data
(:require [quo.design-system.colors :as quo.colors]
[utils.i18n :as i18n]
(:require [utils.i18n :as i18n]
[status-im2.common.resources :as resources]))
(def thumbnail
@ -11,8 +10,8 @@
:name "Status"
:description
"Status is a secure messaging app, crypto wallet and web3 browser built with the state of the art technology"
:customization-color :blue
:community-icon thumbnail
:color (rand-nth quo.colors/chat-colors)
:tokens [{:id 1 :group [{:id 1 :token-icon (resources/get-mock-image :status-logo)}]}]
:tags [{:id 1 :tag-label (i18n/label :t/music) :resource (resources/get-image :music)}
{:id 2

View File

@ -3,7 +3,7 @@
[reagent.core :as reagent]
[status-im2.common.resources :as resources]
[status-im2.contexts.quo-preview.preview :as preview]
[quo.react-native :as rn]))
[react-native.core :as rn]))
(def descriptor
[{:key :disabled?

View File

@ -1,5 +1,5 @@
(ns status-im2.contexts.quo-preview.tags.tag
(:require [quo.react-native :as rn]
(:require [react-native.core :as rn]
[quo2.foundations.colors :as colors]
[quo2.components.tags.tag :as tag]
[status-im.ui.components.react :as react]