Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove old quo code from status_im2 namespace #17404

Merged
merged 1 commit into from
Sep 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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 && \
Expand Down
13 changes: 13 additions & 0 deletions scripts/lint-old-quo-usage.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/usr/bin/env sh

jakubgs marked this conversation as resolved.
Show resolved Hide resolved
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
6 changes: 2 additions & 4 deletions src/status_im2/common/qr_code_viewer/style.cljs
Original file line number Diff line number Diff line change
@@ -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]))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🙏


(def qr-code-padding 16)

Expand All @@ -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})
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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]
Expand All @@ -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)
Expand Down
5 changes: 2 additions & 3 deletions src/status_im2/contexts/quo_preview/community/data.cljs
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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?
Expand Down
2 changes: 1 addition & 1 deletion src/status_im2/contexts/quo_preview/tags/tag.cljs
Original file line number Diff line number Diff line change
@@ -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]
Expand Down