From 4a9ca80bc21a15b1b09d2660fe5b12133dcba2ea Mon Sep 17 00:00:00 2001 From: Alexander Date: Tue, 2 Jan 2024 10:23:38 +0100 Subject: [PATCH 01/28] Share screen design review (#18148) * Share screen design review * Small update * Update * Style fix --- src/status_im/contexts/shell/share/events.cljs | 9 +++++---- src/status_im/contexts/shell/share/style.cljs | 4 ++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/status_im/contexts/shell/share/events.cljs b/src/status_im/contexts/shell/share/events.cljs index 6e46b67ed4b..cce601a810f 100644 --- a/src/status_im/contexts/shell/share/events.cljs +++ b/src/status_im/contexts/shell/share/events.cljs @@ -9,7 +9,8 @@ (rf/merge cofx {:copy-to-clipboard text-to-copy} (toasts/upsert - {:id :successful-copy-toast-message - :type :positive - :override-theme :dark - :text post-copy-message}))) + {:icon :i/correct + :id :successful-copy-toast-message + :type :positive + :theme :dark + :text post-copy-message}))) diff --git a/src/status_im/contexts/shell/share/style.cljs b/src/status_im/contexts/shell/share/style.cljs index a1ee2876a3b..8b4f2699425 100644 --- a/src/status_im/contexts/shell/share/style.cljs +++ b/src/status_im/contexts/shell/share/style.cljs @@ -85,10 +85,10 @@ (def emoji-hash-content {:color colors/white :align-self :flex-start - :padding-top 4 + :padding-top 2 :padding-bottom 12 :padding-left 12 - :font-size 13}) + :font-size 12}) (def tabs-container {:padding-horizontal screen-padding From 1ce76a4af63ce1992dd215092040b9f58d5cd709 Mon Sep 17 00:00:00 2001 From: Omar Basem Date: Tue, 2 Jan 2024 13:45:21 +0400 Subject: [PATCH 02/28] Wallet: network preferences text description (#18319) Wallet: network preferences text description --- .../sheets/network_preferences/view.cljs | 6 +++-- .../contexts/wallet/edit_account/view.cljs | 24 ++++++++++--------- translations/en.json | 3 ++- 3 files changed, 19 insertions(+), 14 deletions(-) diff --git a/src/status_im/contexts/wallet/common/sheets/network_preferences/view.cljs b/src/status_im/contexts/wallet/common/sheets/network_preferences/view.cljs index 4cc47f72e2e..064aa1afe31 100644 --- a/src/status_im/contexts/wallet/common/sheets/network_preferences/view.cljs +++ b/src/status_im/contexts/wallet/common/sheets/network_preferences/view.cljs @@ -28,7 +28,7 @@ :on-change on-change}}) (defn- view-internal - [{:keys [selected-networks]}] + [{:keys [selected-networks watch-only?]}] (let [state (reagent/atom :default) {:keys [color address network-preferences-names]} (rf/sub [:wallet/current-viewing-account]) @@ -63,7 +63,9 @@ :blur-radius 25}]) [quo/drawer-top {:title (i18n/label :t/network-preferences) - :description (i18n/label :t/network-preferences-desc) + :description (if watch-only? + (i18n/label :t/network-preferences-desc-1) + (i18n/label :t/network-preferences-desc-2)) :blur? blur?}] [quo/data-item {:status :default diff --git a/src/status_im/contexts/wallet/edit_account/view.cljs b/src/status_im/contexts/wallet/edit_account/view.cljs index 397506eb44f..10d0e1e6fa9 100644 --- a/src/status_im/contexts/wallet/edit_account/view.cljs +++ b/src/status_im/contexts/wallet/edit_account/view.cljs @@ -49,11 +49,12 @@ :updated-key :name :new-value @edited-account-name}))] (fn [] - (let [{:keys [name emoji address color] :as account} (rf/sub [:wallet/current-viewing-account]) - network-details (rf/sub [:wallet/network-preference-details]) - account-name (or @edited-account-name name) - button-disabled? (or (nil? @edited-account-name) - (= name @edited-account-name))] + (let [{:keys [name emoji address color watch-only?] + :as account} (rf/sub [:wallet/current-viewing-account]) + network-details (rf/sub [:wallet/network-preference-details]) + account-name (or @edited-account-name name) + button-disabled? (or (nil? @edited-account-name) + (= name @edited-account-name))] [create-or-edit-account/view {:page-nav-right-side [{:icon-name :i/delete :on-press #(js/alert "Delete account: to be implemented")}] @@ -90,10 +91,11 @@ {:content (fn [] [network-preferences/view - {:on-save (fn [chain-ids] - (rf/dispatch [:hide-bottom-sheet]) - (save-account - {:account account - :updated-key :prod-preferred-chain-ids - :new-value chain-ids}))}])}])) + {:on-save (fn [chain-ids] + (rf/dispatch [:hide-bottom-sheet]) + (save-account + {:account account + :updated-key :prod-preferred-chain-ids + :new-value chain-ids})) + :watch-only? watch-only?}])}])) :container-style style/data-item}]])))) diff --git a/translations/en.json b/translations/en.json index a0e77acd496..2bca9c76186 100644 --- a/translations/en.json +++ b/translations/en.json @@ -2378,7 +2378,8 @@ "account-info": "Account info", "account-name-input-placeholder": "Account name", "network-preferences": "Network preferences", - "network-preferences-desc": "Select which networks to receive funds on", + "network-preferences-desc-1": "Select which networks this address is happy to receive funds on", + "network-preferences-desc-2": "Select which networks to receive funds on", "layer-2": "Layer 2", "manage-tokens": "Manage tokens", "edit-derivation-path": "Edit derivation path", From f016a9c33c9a882ea0c1e466330b60b7709d712b Mon Sep 17 00:00:00 2001 From: Jamie Caprani Date: Wed, 3 Jan 2024 10:25:49 +0000 Subject: [PATCH 03/28] chore: clean up contexts folder to only include larger feature sets (#18286) --- src/legacy/status_im/contact/block.cljs | 2 +- .../status_im/mobile_sync_settings/core.cljs | 2 +- .../emoji_picker/constants.cljs | 2 +- .../emoji_picker/data.cljs | 4 +- .../emoji_picker/events.cljs | 2 +- .../emoji_picker/style.cljs | 4 +- .../emoji_picker/utils.cljs | 6 +- .../emoji_picker/utils_test.cljs | 4 +- .../emoji_picker/view.cljs | 10 +- src/status_im/common/home/actions/view.cljs | 2 +- src/status_im/common/signals/events.cljs | 2 +- .../drawers/nickname_drawer/style.cljs | 2 +- .../drawers/nickname_drawer/view.cljs | 4 +- .../contexts/{ => chat}/contacts/events.cljs | 2 +- src/status_im/contexts/chat/events.cljs | 2 +- .../home}/add_new_contact/effects.cljs | 2 +- .../home}/add_new_contact/events.cljs | 6 +- .../home}/add_new_contact/events_test.cljs | 4 +- .../scan/scan_profile_qr_page.cljs | 2 +- .../home}/add_new_contact/style.cljs | 2 +- .../home}/add_new_contact/views.cljs | 4 +- .../chat/messages/transport/events.cljs | 2 +- .../animated_header_list.cljs | 2 +- .../quo}/avatars/account_avatar.cljs | 4 +- .../quo}/avatars/channel_avatar.cljs | 4 +- .../quo}/avatars/collection_avatar.cljs | 4 +- .../quo}/avatars/group_avatar.cljs | 4 +- .../quo}/avatars/icon_avatar.cljs | 4 +- .../quo}/avatars/user_avatar.cljs | 4 +- .../quo}/avatars/wallet_user_avatar.cljs | 4 +- .../quo}/banners/banner.cljs | 4 +- .../quo}/browser/browser_input.cljs | 4 +- .../quo}/buttons/button.cljs | 4 +- .../quo}/buttons/composer_button.cljs | 4 +- .../quo}/buttons/dynamic_button.cljs | 4 +- .../quo}/buttons/predictive_keyboard.cljs | 4 +- .../quo}/buttons/slide_button.cljs | 4 +- .../quo}/buttons/wallet_button.cljs | 4 +- .../quo}/buttons/wallet_ctas.cljs | 4 +- .../quo}/calendar/calendar.cljs | 4 +- .../quo}/calendar/calendar_day.cljs | 4 +- .../quo}/calendar/calendar_year.cljs | 4 +- .../quo}/code/snippet.cljs | 4 +- .../quo}/code/snippet_preview.cljs | 4 +- .../quo}/colors/color.cljs | 4 +- .../quo}/colors/color_picker.cljs | 4 +- .../{quo_preview => preview/quo}/common.cljs | 2 +- .../quo}/community/channel_actions.cljs | 4 +- .../quo}/community/community_card_view.cljs | 4 +- .../community_membership_list_view.cljs | 6 +- .../quo}/community/community_stat.cljs | 4 +- .../quo}/community/data.cljs | 2 +- .../quo}/community/discover_card.cljs | 4 +- .../quo}/community/token_gating.cljs | 4 +- .../quo}/component_preview/events.cljs | 2 +- .../quo}/component_preview/view.cljs | 2 +- .../quo}/counter/counter.cljs | 4 +- .../quo}/counter/step.cljs | 4 +- .../quo}/dividers/date.cljs | 4 +- .../quo}/dividers/divider_label.cljs | 4 +- .../quo}/dividers/divider_line.cljs | 4 +- .../quo}/dividers/new_messages.cljs | 4 +- .../quo}/dividers/strength_divider.cljs | 4 +- .../quo}/drawers/action_drawers.cljs | 4 +- .../quo}/drawers/bottom_actions.cljs | 4 +- .../quo}/drawers/documentation_drawers.cljs | 4 +- .../quo}/drawers/drawer_buttons.cljs | 4 +- .../quo}/drawers/drawer_top.cljs | 4 +- .../quo}/drawers/permission_drawers.cljs | 2 +- .../quo}/dropdowns/dropdown.cljs | 4 +- .../quo}/dropdowns/dropdown_input.cljs | 4 +- .../quo}/dropdowns/network_dropdown.cljs | 4 +- .../quo}/empty_state/empty_state.cljs | 4 +- .../quo}/foundations/shadows.cljs | 4 +- .../quo}/gradient/gradient_cover.cljs | 4 +- .../quo}/graph/interactive_graph.cljs | 4 +- .../quo}/graph/wallet_graph.cljs | 4 +- .../quo}/info/info_message.cljs | 4 +- .../quo}/info/information_box.cljs | 4 +- .../quo}/inputs/address_input.cljs | 4 +- .../quo}/inputs/input.cljs | 4 +- .../quo}/inputs/locked_input.cljs | 4 +- .../quo}/inputs/profile_input.cljs | 4 +- .../quo}/inputs/recovery_phrase_input.cljs | 4 +- .../quo}/inputs/search_input.cljs | 4 +- .../quo}/inputs/title_input.cljs | 4 +- .../contexts/preview/quo/ios/drawer_bar.cljs | 9 + .../quo}/keycard/keycard.cljs | 4 +- .../quo}/links/link_preview.cljs | 4 +- .../quo}/links/url_preview.cljs | 4 +- .../quo}/links/url_preview_list.cljs | 4 +- .../quo}/list_items/account.cljs | 4 +- .../quo}/list_items/account_list_card.cljs | 4 +- .../quo}/list_items/address.cljs | 4 +- .../quo}/list_items/channel.cljs | 4 +- .../quo}/list_items/community_list.cljs | 6 +- .../quo}/list_items/dapp.cljs | 4 +- .../quo}/list_items/preview_lists.cljs | 4 +- .../quo}/list_items/saved_address.cljs | 4 +- .../list_items/saved_contact_address.cljs | 4 +- .../quo}/list_items/token_network.cljs | 4 +- .../quo}/list_items/token_value.cljs | 4 +- .../quo}/list_items/user_list.cljs | 4 +- .../quo}/loaders/skeleton_list.cljs | 4 +- .../{quo_preview => preview/quo}/main.cljs | 318 +++++++++--------- .../quo}/markdown/list.cljs | 4 +- .../quo}/markdown/text.cljs | 4 +- .../quo}/messages/author.cljs | 4 +- .../quo}/messages/gap.cljs | 4 +- .../quo}/messages/system_message.cljs | 4 +- .../quo}/navigation/bottom_nav_tab.cljs | 4 +- .../navigation/floating_shell_button.cljs | 4 +- .../quo}/navigation/page_nav.cljs | 4 +- .../quo}/navigation/top_nav.cljs | 4 +- .../quo}/notifications/activity_logs.cljs | 6 +- .../notifications/activity_logs_photos.cljs | 4 +- .../quo}/notifications/notification.cljs | 6 +- .../quo}/notifications/toast.cljs | 4 +- .../quo}/numbered_keyboard/keyboard_key.cljs | 4 +- .../numbered_keyboard/numbered_keyboard.cljs | 4 +- .../quo}/onboarding/small_option_card.cljs | 4 +- .../quo}/password/tips.cljs | 4 +- .../{quo_preview => preview/quo}/preview.clj | 2 +- .../{quo_preview => preview/quo}/preview.cljs | 8 +- .../quo}/profile/collectible.cljs | 4 +- .../quo}/profile/link_card.cljs | 4 +- .../quo}/profile/profile_card.cljs | 4 +- .../quo}/profile/select_profile.cljs | 4 +- .../quo}/profile/showcase_nav.cljs | 4 +- .../quo}/record_audio/record_audio.cljs | 4 +- .../quo}/selectors/disclaimer.cljs | 4 +- .../quo}/selectors/filter.cljs | 4 +- .../quo}/selectors/react.cljs | 4 +- .../quo}/selectors/react_selector.cljs | 4 +- .../quo}/selectors/reactions_selector.cljs | 4 +- .../quo}/selectors/selectors.cljs | 4 +- .../quo}/settings/accounts.cljs | 4 +- .../quo}/settings/category.cljs | 4 +- .../quo}/settings/data_item.cljs | 4 +- .../quo}/settings/privacy_option.cljs | 4 +- .../quo}/settings/reorder_item.cljs | 4 +- .../quo}/settings/section_label.cljs | 4 +- .../quo}/settings/settings_item.cljs | 4 +- .../quo}/share/qr_code.cljs | 4 +- .../quo}/share/share_qr_code.cljs | 4 +- .../{quo_preview => preview/quo}/style.cljs | 2 +- .../quo}/switcher/group_messaging_card.cljs | 4 +- .../quo}/switcher/switcher_cards.cljs | 4 +- .../quo}/tabs/account_selector.cljs | 4 +- .../quo}/tabs/segmented_tab.cljs | 4 +- .../quo}/tabs/tabs.cljs | 4 +- .../quo}/tags/context_tags.cljs | 4 +- .../quo}/tags/network_tags.cljs | 4 +- .../quo}/tags/number_tag.cljs | 4 +- .../quo}/tags/permission_tag.cljs | 4 +- .../quo}/tags/status_tags.cljs | 4 +- .../quo}/tags/summary_tag.cljs | 4 +- .../quo}/tags/tag.cljs | 4 +- .../quo}/tags/tags.cljs | 4 +- .../quo}/tags/tiny_tag.cljs | 4 +- .../quo}/tags/token_tag.cljs | 4 +- .../quo}/text_combinations/channel_name.cljs | 4 +- .../quo}/text_combinations/page_top.cljs | 4 +- .../quo}/text_combinations/preview.cljs | 4 +- .../text_combinations/standard_title.cljs | 4 +- .../quo}/text_combinations/username.cljs | 4 +- .../quo}/wallet/account_card.cljs | 4 +- .../quo}/wallet/account_origin.cljs | 4 +- .../quo}/wallet/account_overview.cljs | 4 +- .../quo}/wallet/account_permissions.cljs | 4 +- .../quo}/wallet/confirmation_progress.cljs | 4 +- .../quo}/wallet/keypair.cljs | 4 +- .../quo}/wallet/network_amount.cljs | 4 +- .../quo}/wallet/network_bridge.cljs | 4 +- .../quo}/wallet/network_link.cljs | 4 +- .../quo}/wallet/network_routing.cljs | 4 +- .../quo}/wallet/progress_bar.cljs | 4 +- .../quo}/wallet/required_tokens.cljs | 4 +- .../quo}/wallet/summary_info.cljs | 4 +- .../quo}/wallet/token_input.cljs | 4 +- .../quo}/wallet/transaction_progress.cljs | 4 +- .../quo}/wallet/transaction_summary.cljs | 4 +- .../quo}/wallet/wallet_activity.cljs | 4 +- .../quo}/wallet/wallet_overview.cljs | 4 +- .../common/floating_button_page/style.cljs | 2 +- .../common/floating_button_page/view.cljs | 5 +- .../status_im}/main.cljs | 9 +- .../status_im}/style.cljs | 2 +- .../contexts/profile/create/events.cljs | 2 +- .../contexts/profile/login/events.cljs | 4 +- .../push_notifications/effects.cljs | 2 +- .../push_notifications/events.cljs | 4 +- .../push_notifications/local/effects.cljs | 2 +- .../push_notifications/local/events.cljs | 4 +- .../contexts/profile/recover/events.cljs | 2 +- .../contexts/quo_preview/ios/drawer_bar.cljs | 9 - .../confirm_address/view.cljs | 2 +- .../contexts/wallet/create_account/view.cljs | 2 +- src/status_im/core.cljs | 2 +- src/status_im/events.cljs | 4 +- src/status_im/navigation/screens.cljs | 12 +- 201 files changed, 555 insertions(+), 549 deletions(-) rename src/status_im/{contexts => common}/emoji_picker/constants.cljs (93%) rename src/status_im/{contexts => common}/emoji_picker/data.cljs (96%) rename src/status_im/{contexts => common}/emoji_picker/events.cljs (81%) rename src/status_im/{contexts => common}/emoji_picker/style.cljs (92%) rename src/status_im/{contexts => common}/emoji_picker/utils.cljs (81%) rename src/status_im/{contexts => common}/emoji_picker/utils_test.cljs (94%) rename src/status_im/{contexts => common}/emoji_picker/view.cljs (96%) rename src/status_im/contexts/{ => chat}/contacts/drawers/nickname_drawer/style.cljs (92%) rename src/status_im/contexts/{ => chat}/contacts/drawers/nickname_drawer/view.cljs (95%) rename src/status_im/contexts/{ => chat}/contacts/events.cljs (99%) rename src/status_im/contexts/{ => chat/home}/add_new_contact/effects.cljs (92%) rename src/status_im/contexts/{ => chat/home}/add_new_contact/events.cljs (97%) rename src/status_im/contexts/{ => chat/home}/add_new_contact/events_test.cljs (98%) rename src/status_im/contexts/{ => chat/home}/add_new_contact/scan/scan_profile_qr_page.cljs (88%) rename src/status_im/contexts/{ => chat/home}/add_new_contact/style.cljs (97%) rename src/status_im/contexts/{ => chat/home}/add_new_contact/views.cljs (97%) rename src/status_im/contexts/{quo_preview => preview/quo}/animated_header_list/animated_header_list.cljs (97%) rename src/status_im/contexts/{quo_preview => preview/quo}/avatars/account_avatar.cljs (92%) rename src/status_im/contexts/{quo_preview => preview/quo}/avatars/channel_avatar.cljs (90%) rename src/status_im/contexts/{quo_preview => preview/quo}/avatars/collection_avatar.cljs (85%) rename src/status_im/contexts/{quo_preview => preview/quo}/avatars/group_avatar.cljs (89%) rename src/status_im/contexts/{quo_preview => preview/quo}/avatars/icon_avatar.cljs (86%) rename src/status_im/contexts/{quo_preview => preview/quo}/avatars/user_avatar.cljs (92%) rename src/status_im/contexts/{quo_preview => preview/quo}/avatars/wallet_user_avatar.cljs (85%) rename src/status_im/contexts/{quo_preview => preview/quo}/banners/banner.cljs (83%) rename src/status_im/contexts/{quo_preview => preview/quo}/browser/browser_input.cljs (87%) rename src/status_im/contexts/{quo_preview => preview/quo}/buttons/button.cljs (96%) rename src/status_im/contexts/{quo_preview => preview/quo}/buttons/composer_button.cljs (85%) rename src/status_im/contexts/{quo_preview => preview/quo}/buttons/dynamic_button.cljs (89%) rename src/status_im/contexts/{quo_preview => preview/quo}/buttons/predictive_keyboard.cljs (89%) rename src/status_im/contexts/{quo_preview => preview/quo}/buttons/slide_button.cljs (94%) rename src/status_im/contexts/{quo_preview => preview/quo}/buttons/wallet_button.cljs (82%) rename src/status_im/contexts/{quo_preview => preview/quo}/buttons/wallet_ctas.cljs (74%) rename src/status_im/contexts/{quo_preview => preview/quo}/calendar/calendar.cljs (88%) rename src/status_im/contexts/{quo_preview => preview/quo}/calendar/calendar_day.cljs (82%) rename src/status_im/contexts/{quo_preview => preview/quo}/calendar/calendar_year.cljs (77%) rename src/status_im/contexts/{quo_preview => preview/quo}/code/snippet.cljs (96%) rename src/status_im/contexts/{quo_preview => preview/quo}/code/snippet_preview.cljs (89%) rename src/status_im/contexts/{quo_preview => preview/quo}/colors/color.cljs (88%) rename src/status_im/contexts/{quo_preview => preview/quo}/colors/color_picker.cljs (90%) rename src/status_im/contexts/{quo_preview => preview/quo}/common.cljs (95%) rename src/status_im/contexts/{quo_preview => preview/quo}/community/channel_actions.cljs (89%) rename src/status_im/contexts/{quo_preview => preview/quo}/community/community_card_view.cljs (92%) rename src/status_im/contexts/{quo_preview => preview/quo}/community/community_membership_list_view.cljs (85%) rename src/status_im/contexts/{quo_preview => preview/quo}/community/community_stat.cljs (79%) rename src/status_im/contexts/{quo_preview => preview/quo}/community/data.cljs (94%) rename src/status_im/contexts/{quo_preview => preview/quo}/community/discover_card.cljs (79%) rename src/status_im/contexts/{quo_preview => preview/quo}/community/token_gating.cljs (94%) rename src/status_im/contexts/{quo_preview => preview/quo}/component_preview/events.cljs (94%) rename src/status_im/contexts/{quo_preview => preview/quo}/component_preview/view.cljs (86%) rename src/status_im/contexts/{quo_preview => preview/quo}/counter/counter.cljs (83%) rename src/status_im/contexts/{quo_preview => preview/quo}/counter/step.cljs (87%) rename src/status_im/contexts/{quo_preview => preview/quo}/dividers/date.cljs (73%) rename src/status_im/contexts/{quo_preview => preview/quo}/dividers/divider_label.cljs (92%) rename src/status_im/contexts/{quo_preview => preview/quo}/dividers/divider_line.cljs (78%) rename src/status_im/contexts/{quo_preview => preview/quo}/dividers/new_messages.cljs (77%) rename src/status_im/contexts/{quo_preview => preview/quo}/dividers/strength_divider.cljs (85%) rename src/status_im/contexts/{quo_preview => preview/quo}/drawers/action_drawers.cljs (95%) rename src/status_im/contexts/{quo_preview => preview/quo}/drawers/bottom_actions.cljs (95%) rename src/status_im/contexts/{quo_preview => preview/quo}/drawers/documentation_drawers.cljs (98%) rename src/status_im/contexts/{quo_preview => preview/quo}/drawers/drawer_buttons.cljs (92%) rename src/status_im/contexts/{quo_preview => preview/quo}/drawers/drawer_top.cljs (95%) rename src/status_im/contexts/{quo_preview => preview/quo}/drawers/permission_drawers.cljs (97%) rename src/status_im/contexts/{quo_preview => preview/quo}/dropdowns/dropdown.cljs (96%) rename src/status_im/contexts/{quo_preview => preview/quo}/dropdowns/dropdown_input.cljs (92%) rename src/status_im/contexts/{quo_preview => preview/quo}/dropdowns/network_dropdown.cljs (90%) rename src/status_im/contexts/{quo_preview => preview/quo}/empty_state/empty_state.cljs (93%) rename src/status_im/contexts/{quo_preview => preview/quo}/foundations/shadows.cljs (94%) rename src/status_im/contexts/{quo_preview => preview/quo}/gradient/gradient_cover.cljs (96%) rename src/status_im/contexts/{quo_preview => preview/quo}/graph/interactive_graph.cljs (97%) rename src/status_im/contexts/{quo_preview => preview/quo}/graph/wallet_graph.cljs (95%) rename src/status_im/contexts/{quo_preview => preview/quo}/info/info_message.cljs (86%) rename src/status_im/contexts/{quo_preview => preview/quo}/info/information_box.cljs (91%) rename src/status_im/contexts/{quo_preview => preview/quo}/inputs/address_input.cljs (91%) rename src/status_im/contexts/{quo_preview => preview/quo}/inputs/input.cljs (95%) rename src/status_im/contexts/{quo_preview => preview/quo}/inputs/locked_input.cljs (86%) rename src/status_im/contexts/{quo_preview => preview/quo}/inputs/profile_input.cljs (92%) rename src/status_im/contexts/{quo_preview => preview/quo}/inputs/recovery_phrase_input.cljs (93%) rename src/status_im/contexts/{quo_preview => preview/quo}/inputs/search_input.cljs (94%) rename src/status_im/contexts/{quo_preview => preview/quo}/inputs/title_input.cljs (87%) create mode 100644 src/status_im/contexts/preview/quo/ios/drawer_bar.cljs rename src/status_im/contexts/{quo_preview => preview/quo}/keycard/keycard.cljs (77%) rename src/status_im/contexts/{quo_preview => preview/quo}/links/link_preview.cljs (95%) rename src/status_im/contexts/{quo_preview => preview/quo}/links/url_preview.cljs (90%) rename src/status_im/contexts/{quo_preview => preview/quo}/links/url_preview_list.cljs (91%) rename src/status_im/contexts/{quo_preview => preview/quo}/list_items/account.cljs (95%) rename src/status_im/contexts/{quo_preview => preview/quo}/list_items/account_list_card.cljs (92%) rename src/status_im/contexts/{quo_preview => preview/quo}/list_items/address.cljs (88%) rename src/status_im/contexts/{quo_preview => preview/quo}/list_items/channel.cljs (91%) rename src/status_im/contexts/{quo_preview => preview/quo}/list_items/community_list.cljs (95%) rename src/status_im/contexts/{quo_preview => preview/quo}/list_items/dapp.cljs (92%) rename src/status_im/contexts/{quo_preview => preview/quo}/list_items/preview_lists.cljs (97%) rename src/status_im/contexts/{quo_preview => preview/quo}/list_items/saved_address.cljs (91%) rename src/status_im/contexts/{quo_preview => preview/quo}/list_items/saved_contact_address.cljs (94%) rename src/status_im/contexts/{quo_preview => preview/quo}/list_items/token_network.cljs (92%) rename src/status_im/contexts/{quo_preview => preview/quo}/list_items/token_value.cljs (91%) rename src/status_im/contexts/{quo_preview => preview/quo}/list_items/user_list.cljs (93%) rename src/status_im/contexts/{quo_preview => preview/quo}/loaders/skeleton_list.cljs (85%) rename src/status_im/contexts/{quo_preview => preview/quo}/main.cljs (66%) rename src/status_im/contexts/{quo_preview => preview/quo}/markdown/list.cljs (91%) rename src/status_im/contexts/{quo_preview => preview/quo}/markdown/text.cljs (87%) rename src/status_im/contexts/{quo_preview => preview/quo}/messages/author.cljs (89%) rename src/status_im/contexts/{quo_preview => preview/quo}/messages/gap.cljs (88%) rename src/status_im/contexts/{quo_preview => preview/quo}/messages/system_message.cljs (92%) rename src/status_im/contexts/{quo_preview => preview/quo}/navigation/bottom_nav_tab.cljs (94%) rename src/status_im/contexts/{quo_preview => preview/quo}/navigation/floating_shell_button.cljs (92%) rename src/status_im/contexts/{quo_preview => preview/quo}/navigation/page_nav.cljs (98%) rename src/status_im/contexts/{quo_preview => preview/quo}/navigation/top_nav.cljs (95%) rename src/status_im/contexts/{quo_preview => preview/quo}/notifications/activity_logs.cljs (97%) rename src/status_im/contexts/{quo_preview => preview/quo}/notifications/activity_logs_photos.cljs (89%) rename src/status_im/contexts/{quo_preview => preview/quo}/notifications/notification.cljs (94%) rename src/status_im/contexts/{quo_preview => preview/quo}/notifications/toast.cljs (96%) rename src/status_im/contexts/{quo_preview => preview/quo}/numbered_keyboard/keyboard_key.cljs (88%) rename src/status_im/contexts/{quo_preview => preview/quo}/numbered_keyboard/numbered_keyboard.cljs (88%) rename src/status_im/contexts/{quo_preview => preview/quo}/onboarding/small_option_card.cljs (91%) rename src/status_im/contexts/{quo_preview => preview/quo}/password/tips.cljs (87%) rename src/status_im/contexts/{quo_preview => preview/quo}/preview.clj (83%) rename src/status_im/contexts/{quo_preview => preview/quo}/preview.cljs (98%) rename src/status_im/contexts/{quo_preview => preview/quo}/profile/collectible.cljs (88%) rename src/status_im/contexts/{quo_preview => preview/quo}/profile/link_card.cljs (97%) rename src/status_im/contexts/{quo_preview => preview/quo}/profile/profile_card.cljs (93%) rename src/status_im/contexts/{quo_preview => preview/quo}/profile/select_profile.cljs (88%) rename src/status_im/contexts/{quo_preview => preview/quo}/profile/showcase_nav.cljs (91%) rename src/status_im/contexts/{quo_preview => preview/quo}/record_audio/record_audio.cljs (96%) rename src/status_im/contexts/{quo_preview => preview/quo}/selectors/disclaimer.cljs (89%) rename src/status_im/contexts/{quo_preview => preview/quo}/selectors/filter.cljs (81%) rename src/status_im/contexts/{quo_preview => preview/quo}/selectors/react.cljs (96%) rename src/status_im/contexts/{quo_preview => preview/quo}/selectors/react_selector.cljs (93%) rename src/status_im/contexts/{quo_preview => preview/quo}/selectors/reactions_selector.cljs (84%) rename src/status_im/contexts/{quo_preview => preview/quo}/selectors/selectors.cljs (91%) rename src/status_im/contexts/{quo_preview => preview/quo}/settings/accounts.cljs (88%) rename src/status_im/contexts/{quo_preview => preview/quo}/settings/category.cljs (92%) rename src/status_im/contexts/{quo_preview => preview/quo}/settings/data_item.cljs (95%) rename src/status_im/contexts/{quo_preview => preview/quo}/settings/privacy_option.cljs (96%) rename src/status_im/contexts/{quo_preview => preview/quo}/settings/reorder_item.cljs (95%) rename src/status_im/contexts/{quo_preview => preview/quo}/settings/section_label.cljs (89%) rename src/status_im/contexts/{quo_preview => preview/quo}/settings/settings_item.cljs (97%) rename src/status_im/contexts/{quo_preview => preview/quo}/share/qr_code.cljs (97%) rename src/status_im/contexts/{quo_preview => preview/quo}/share/share_qr_code.cljs (98%) rename src/status_im/contexts/{quo_preview => preview/quo}/style.cljs (99%) rename src/status_im/contexts/{quo_preview => preview/quo}/switcher/group_messaging_card.cljs (96%) rename src/status_im/contexts/{quo_preview => preview/quo}/switcher/switcher_cards.cljs (97%) rename src/status_im/contexts/{quo_preview => preview/quo}/tabs/account_selector.cljs (93%) rename src/status_im/contexts/{quo_preview => preview/quo}/tabs/segmented_tab.cljs (92%) rename src/status_im/contexts/{quo_preview => preview/quo}/tabs/tabs.cljs (93%) rename src/status_im/contexts/{quo_preview => preview/quo}/tags/context_tags.cljs (98%) rename src/status_im/contexts/{quo_preview => preview/quo}/tags/network_tags.cljs (92%) rename src/status_im/contexts/{quo_preview => preview/quo}/tags/number_tag.cljs (90%) rename src/status_im/contexts/{quo_preview => preview/quo}/tags/permission_tag.cljs (99%) rename src/status_im/contexts/{quo_preview => preview/quo}/tags/status_tags.cljs (94%) rename src/status_im/contexts/{quo_preview => preview/quo}/tags/summary_tag.cljs (94%) rename src/status_im/contexts/{quo_preview => preview/quo}/tags/tag.cljs (93%) rename src/status_im/contexts/{quo_preview => preview/quo}/tags/tags.cljs (95%) rename src/status_im/contexts/{quo_preview => preview/quo}/tags/tiny_tag.cljs (84%) rename src/status_im/contexts/{quo_preview => preview/quo}/tags/token_tag.cljs (93%) rename src/status_im/contexts/{quo_preview => preview/quo}/text_combinations/channel_name.cljs (84%) rename src/status_im/contexts/{quo_preview => preview/quo}/text_combinations/page_top.cljs (97%) rename src/status_im/contexts/{quo_preview => preview/quo}/text_combinations/preview.cljs (90%) rename src/status_im/contexts/{quo_preview => preview/quo}/text_combinations/standard_title.cljs (94%) rename src/status_im/contexts/{quo_preview => preview/quo}/text_combinations/username.cljs (92%) rename src/status_im/contexts/{quo_preview => preview/quo}/wallet/account_card.cljs (95%) rename src/status_im/contexts/{quo_preview => preview/quo}/wallet/account_origin.cljs (89%) rename src/status_im/contexts/{quo_preview => preview/quo}/wallet/account_overview.cljs (94%) rename src/status_im/contexts/{quo_preview => preview/quo}/wallet/account_permissions.cljs (95%) rename src/status_im/contexts/{quo_preview => preview/quo}/wallet/confirmation_progress.cljs (94%) rename src/status_im/contexts/{quo_preview => preview/quo}/wallet/keypair.cljs (97%) rename src/status_im/contexts/{quo_preview => preview/quo}/wallet/network_amount.cljs (82%) rename src/status_im/contexts/{quo_preview => preview/quo}/wallet/network_bridge.cljs (89%) rename src/status_im/contexts/{quo_preview => preview/quo}/wallet/network_link.cljs (89%) rename src/status_im/contexts/{quo_preview => preview/quo}/wallet/network_routing.cljs (97%) rename src/status_im/contexts/{quo_preview => preview/quo}/wallet/progress_bar.cljs (89%) rename src/status_im/contexts/{quo_preview => preview/quo}/wallet/required_tokens.cljs (90%) rename src/status_im/contexts/{quo_preview => preview/quo}/wallet/summary_info.cljs (94%) rename src/status_im/contexts/{quo_preview => preview/quo}/wallet/token_input.cljs (91%) rename src/status_im/contexts/{quo_preview => preview/quo}/wallet/transaction_progress.cljs (97%) rename src/status_im/contexts/{quo_preview => preview/quo}/wallet/transaction_summary.cljs (97%) rename src/status_im/contexts/{quo_preview => preview/quo}/wallet/wallet_activity.cljs (98%) rename src/status_im/contexts/{quo_preview => preview/quo}/wallet/wallet_overview.cljs (94%) rename src/status_im/contexts/{status_im_preview => preview/status_im}/common/floating_button_page/style.cljs (88%) rename src/status_im/contexts/{status_im_preview => preview/status_im}/common/floating_button_page/view.cljs (94%) rename src/status_im/contexts/{status_im_preview => preview/status_im}/main.cljs (85%) rename src/status_im/contexts/{status_im_preview => preview/status_im}/style.cljs (82%) rename src/status_im/contexts/{ => profile}/push_notifications/effects.cljs (96%) rename src/status_im/contexts/{ => profile}/push_notifications/events.cljs (95%) rename src/status_im/contexts/{ => profile}/push_notifications/local/effects.cljs (92%) rename src/status_im/contexts/{ => profile}/push_notifications/local/events.cljs (90%) delete mode 100644 src/status_im/contexts/quo_preview/ios/drawer_bar.cljs diff --git a/src/legacy/status_im/contact/block.cljs b/src/legacy/status_im/contact/block.cljs index 0498c772240..613ff26467d 100644 --- a/src/legacy/status_im/contact/block.cljs +++ b/src/legacy/status_im/contact/block.cljs @@ -4,8 +4,8 @@ [legacy.status-im.data-store.chats :as chats-store] [legacy.status-im.utils.deprecated-types :as types] [re-frame.core :as re-frame] + [status-im.contexts.chat.contacts.events :as contacts-store] [status-im.contexts.chat.messages.list.events :as message-list] - [status-im.contexts.contacts.events :as contacts-store] [status-im.contexts.shell.activity-center.events :as activity-center] [status-im.navigation.events :as navigation] [utils.re-frame :as rf])) diff --git a/src/legacy/status_im/mobile_sync_settings/core.cljs b/src/legacy/status_im/mobile_sync_settings/core.cljs index 0d634726ffd..0fd21df4a16 100644 --- a/src/legacy/status_im/mobile_sync_settings/core.cljs +++ b/src/legacy/status_im/mobile_sync_settings/core.cljs @@ -6,7 +6,7 @@ [legacy.status-im.multiaccounts.update.core :as multiaccounts.update] [legacy.status-im.utils.mobile-sync :as utils] [legacy.status-im.wallet.core :as wallet] - [status-im.contexts.add-new-contact.events :as add-new-contact] + [status-im.contexts.chat.home.add-new-contact.events :as add-new-contact] [status-im.navigation.events :as navigation] [taoensso.timbre :as log] [utils.re-frame :as rf])) diff --git a/src/status_im/contexts/emoji_picker/constants.cljs b/src/status_im/common/emoji_picker/constants.cljs similarity index 93% rename from src/status_im/contexts/emoji_picker/constants.cljs rename to src/status_im/common/emoji_picker/constants.cljs index 3c15514468a..28c3c6d0e37 100644 --- a/src/status_im/contexts/emoji_picker/constants.cljs +++ b/src/status_im/common/emoji_picker/constants.cljs @@ -1,4 +1,4 @@ -(ns status-im.contexts.emoji-picker.constants +(ns status-im.common.emoji-picker.constants (:require [react-native.core :as rn])) diff --git a/src/status_im/contexts/emoji_picker/data.cljs b/src/status_im/common/emoji_picker/data.cljs similarity index 96% rename from src/status_im/contexts/emoji_picker/data.cljs rename to src/status_im/common/emoji_picker/data.cljs index e1d56b70231..324cbd351ac 100644 --- a/src/status_im/contexts/emoji_picker/data.cljs +++ b/src/status_im/common/emoji_picker/data.cljs @@ -1,6 +1,6 @@ -(ns status-im.contexts.emoji-picker.data +(ns status-im.common.emoji-picker.data (:require - [status-im.contexts.emoji-picker.constants :as constants] + [status-im.common.emoji-picker.constants :as constants] [utils.transforms :as transforms])) ;; Emoji data is pulled from the `emojibase` (https://emojibase.dev). diff --git a/src/status_im/contexts/emoji_picker/events.cljs b/src/status_im/common/emoji_picker/events.cljs similarity index 81% rename from src/status_im/contexts/emoji_picker/events.cljs rename to src/status_im/common/emoji_picker/events.cljs index 0c6c845297f..e02729185c1 100644 --- a/src/status_im/contexts/emoji_picker/events.cljs +++ b/src/status_im/common/emoji_picker/events.cljs @@ -1,4 +1,4 @@ -(ns status-im.contexts.emoji-picker.events +(ns status-im.common.emoji-picker.events (:require [utils.re-frame :as rf])) diff --git a/src/status_im/contexts/emoji_picker/style.cljs b/src/status_im/common/emoji_picker/style.cljs similarity index 92% rename from src/status_im/contexts/emoji_picker/style.cljs rename to src/status_im/common/emoji_picker/style.cljs index 78760b1c27b..eb19bc9ddd9 100644 --- a/src/status_im/contexts/emoji_picker/style.cljs +++ b/src/status_im/common/emoji_picker/style.cljs @@ -1,8 +1,8 @@ -(ns status-im.contexts.emoji-picker.style +(ns status-im.common.emoji-picker.style (:require [quo.foundations.colors :as colors] [react-native.safe-area :as safe-area] - [status-im.contexts.emoji-picker.constants :as constants])) + [status-im.common.emoji-picker.constants :as constants])) (def flex-spacer {:flex 1}) diff --git a/src/status_im/contexts/emoji_picker/utils.cljs b/src/status_im/common/emoji_picker/utils.cljs similarity index 81% rename from src/status_im/contexts/emoji_picker/utils.cljs rename to src/status_im/common/emoji_picker/utils.cljs index d8da0397e26..fbf4ebefac7 100644 --- a/src/status_im/contexts/emoji_picker/utils.cljs +++ b/src/status_im/common/emoji_picker/utils.cljs @@ -1,8 +1,8 @@ -(ns status-im.contexts.emoji-picker.utils +(ns status-im.common.emoji-picker.utils (:require [clojure.string :as string] - [status-im.contexts.emoji-picker.constants :as constants] - [status-im.contexts.emoji-picker.data :refer [emoji-data]])) + [status-im.common.emoji-picker.constants :as constants] + [status-im.common.emoji-picker.data :refer [emoji-data]])) (defn search-emoji [search-query] diff --git a/src/status_im/contexts/emoji_picker/utils_test.cljs b/src/status_im/common/emoji_picker/utils_test.cljs similarity index 94% rename from src/status_im/contexts/emoji_picker/utils_test.cljs rename to src/status_im/common/emoji_picker/utils_test.cljs index 62546e8a399..d129a38e564 100644 --- a/src/status_im/contexts/emoji_picker/utils_test.cljs +++ b/src/status_im/common/emoji_picker/utils_test.cljs @@ -1,7 +1,7 @@ -(ns status-im.contexts.emoji-picker.utils-test +(ns status-im.common.emoji-picker.utils-test (:require [cljs.test :refer [deftest is testing]] - [status-im.contexts.emoji-picker.utils :as utils])) + [status-im.common.emoji-picker.utils :as utils])) (deftest emoji-search-test (testing "search for emojis with name" diff --git a/src/status_im/contexts/emoji_picker/view.cljs b/src/status_im/common/emoji_picker/view.cljs similarity index 96% rename from src/status_im/contexts/emoji_picker/view.cljs rename to src/status_im/common/emoji_picker/view.cljs index 675a92478f0..f2260459961 100644 --- a/src/status_im/contexts/emoji_picker/view.cljs +++ b/src/status_im/common/emoji_picker/view.cljs @@ -1,4 +1,4 @@ -(ns status-im.contexts.emoji-picker.view +(ns status-im.common.emoji-picker.view (:require [clojure.string :as string] [oops.core :as oops] @@ -10,10 +10,10 @@ [react-native.gesture :as gesture] [react-native.platform :as platform] [reagent.core :as reagent] - [status-im.contexts.emoji-picker.constants :as constants] - [status-im.contexts.emoji-picker.data :as emoji-picker.data] - [status-im.contexts.emoji-picker.style :as style] - [status-im.contexts.emoji-picker.utils :as emoji-picker.utils] + [status-im.common.emoji-picker.constants :as constants] + [status-im.common.emoji-picker.data :as emoji-picker.data] + [status-im.common.emoji-picker.style :as style] + [status-im.common.emoji-picker.utils :as emoji-picker.utils] [utils.debounce :as debounce] [utils.i18n :as i18n] [utils.re-frame :as rf])) diff --git a/src/status_im/common/home/actions/view.cljs b/src/status_im/common/home/actions/view.cljs index ea9ae4e316a..dea4ecd6481 100644 --- a/src/status_im/common/home/actions/view.cljs +++ b/src/status_im/common/home/actions/view.cljs @@ -8,8 +8,8 @@ [status-im.config :as config] [status-im.constants :as constants] [status-im.contexts.chat.actions.view :as chat-actions] + [status-im.contexts.chat.contacts.drawers.nickname-drawer.view :as nickname-drawer] [status-im.contexts.communities.actions.chat.view :as communities-chat-actions] - [status-im.contexts.contacts.drawers.nickname-drawer.view :as nickname-drawer] [utils.i18n :as i18n] [utils.re-frame :as rf])) diff --git a/src/status_im/common/signals/events.cljs b/src/status_im/common/signals/events.cljs index dc5b57c5170..18599b2b4f8 100644 --- a/src/status_im/common/signals/events.cljs +++ b/src/status_im/common/signals/events.cljs @@ -9,7 +9,7 @@ [status-im.contexts.chat.messages.transport.events :as messages.transport] [status-im.contexts.communities.discover.events] [status-im.contexts.profile.login.events :as profile.login] - [status-im.contexts.push-notifications.local.events :as local-notifications] + [status-im.contexts.profile.push-notifications.local.events :as local-notifications] [taoensso.timbre :as log] [utils.re-frame :as rf] [utils.transforms :as transforms])) diff --git a/src/status_im/contexts/contacts/drawers/nickname_drawer/style.cljs b/src/status_im/contexts/chat/contacts/drawers/nickname_drawer/style.cljs similarity index 92% rename from src/status_im/contexts/contacts/drawers/nickname_drawer/style.cljs rename to src/status_im/contexts/chat/contacts/drawers/nickname_drawer/style.cljs index 65bc1378ffe..508a381c0db 100644 --- a/src/status_im/contexts/contacts/drawers/nickname_drawer/style.cljs +++ b/src/status_im/contexts/chat/contacts/drawers/nickname_drawer/style.cljs @@ -1,4 +1,4 @@ -(ns status-im.contexts.contacts.drawers.nickname-drawer.style +(ns status-im.contexts.chat.contacts.drawers.nickname-drawer.style (:require [quo.foundations.colors :as colors] [react-native.platform :as platform])) diff --git a/src/status_im/contexts/contacts/drawers/nickname_drawer/view.cljs b/src/status_im/contexts/chat/contacts/drawers/nickname_drawer/view.cljs similarity index 95% rename from src/status_im/contexts/contacts/drawers/nickname_drawer/view.cljs rename to src/status_im/contexts/chat/contacts/drawers/nickname_drawer/view.cljs index 7257bcf9ed7..d5082cf4e08 100644 --- a/src/status_im/contexts/contacts/drawers/nickname_drawer/view.cljs +++ b/src/status_im/contexts/chat/contacts/drawers/nickname_drawer/view.cljs @@ -1,4 +1,4 @@ -(ns status-im.contexts.contacts.drawers.nickname-drawer.view +(ns status-im.contexts.chat.contacts.drawers.nickname-drawer.view (:require [clojure.string :as string] [quo.core :as quo] @@ -7,7 +7,7 @@ [react-native.safe-area :as safe-area] [reagent.core :as reagent] [status-im.constants :as constants] - [status-im.contexts.contacts.drawers.nickname-drawer.style :as style] + [status-im.contexts.chat.contacts.drawers.nickname-drawer.style :as style] [utils.i18n :as i18n] [utils.re-frame :as rf])) diff --git a/src/status_im/contexts/contacts/events.cljs b/src/status_im/contexts/chat/contacts/events.cljs similarity index 99% rename from src/status_im/contexts/contacts/events.cljs rename to src/status_im/contexts/chat/contacts/events.cljs index 48850656965..b830abee671 100644 --- a/src/status_im/contexts/contacts/events.cljs +++ b/src/status_im/contexts/chat/contacts/events.cljs @@ -1,4 +1,4 @@ -(ns status-im.contexts.contacts.events +(ns status-im.contexts.chat.contacts.events (:require [oops.core :as oops] [status-im.constants :as constants] diff --git a/src/status_im/contexts/chat/events.cljs b/src/status_im/contexts/chat/events.cljs index 6935a311989..b66ea731a84 100644 --- a/src/status_im/contexts/chat/events.cljs +++ b/src/status_im/contexts/chat/events.cljs @@ -8,13 +8,13 @@ [status-im.common.muting.helpers :refer [format-mute-till]] [status-im.constants :as constants] [status-im.contexts.chat.composer.link-preview.events :as link-preview] + [status-im.contexts.chat.contacts.events :as contacts-store] status-im.contexts.chat.effects status-im.contexts.chat.lightbox.events status-im.contexts.chat.messages.content.reactions.events [status-im.contexts.chat.messages.delete-message-for-me.events :as delete-for-me] [status-im.contexts.chat.messages.delete-message.events :as delete-message] [status-im.contexts.chat.messages.list.state :as chat.state] - [status-im.contexts.contacts.events :as contacts-store] [status-im.navigation.events :as navigation] [taoensso.timbre :as log] [utils.datetime :as datetime] diff --git a/src/status_im/contexts/add_new_contact/effects.cljs b/src/status_im/contexts/chat/home/add_new_contact/effects.cljs similarity index 92% rename from src/status_im/contexts/add_new_contact/effects.cljs rename to src/status_im/contexts/chat/home/add_new_contact/effects.cljs index 4ba9c716b67..081059129df 100644 --- a/src/status_im/contexts/add_new_contact/effects.cljs +++ b/src/status_im/contexts/chat/home/add_new_contact/effects.cljs @@ -1,4 +1,4 @@ -(ns status-im.contexts.add-new-contact.effects +(ns status-im.contexts.chat.home.add-new-contact.effects (:require [legacy.status-im.ethereum.ens :as ens] [native-module.core :as native-module] diff --git a/src/status_im/contexts/add_new_contact/events.cljs b/src/status_im/contexts/chat/home/add_new_contact/events.cljs similarity index 97% rename from src/status_im/contexts/add_new_contact/events.cljs rename to src/status_im/contexts/chat/home/add_new_contact/events.cljs index 4016dc1ff55..f035661b502 100644 --- a/src/status_im/contexts/add_new_contact/events.cljs +++ b/src/status_im/contexts/chat/home/add_new_contact/events.cljs @@ -1,9 +1,9 @@ -(ns status-im.contexts.add-new-contact.events +(ns status-im.contexts.chat.home.add-new-contact.events (:require [clojure.string :as string] [status-im.common.validators :as validators] - status-im.contexts.add-new-contact.effects - [status-im.contexts.contacts.events :as data-store.contacts] + [status-im.contexts.chat.contacts.events :as data-store.contacts] + status-im.contexts.chat.home.add-new-contact.effects [status-im.navigation.events :as navigation] [utils.ens.stateofus :as stateofus] [utils.ethereum.chain :as chain] diff --git a/src/status_im/contexts/add_new_contact/events_test.cljs b/src/status_im/contexts/chat/home/add_new_contact/events_test.cljs similarity index 98% rename from src/status_im/contexts/add_new_contact/events_test.cljs rename to src/status_im/contexts/chat/home/add_new_contact/events_test.cljs index a2b1e88107c..256e7ba1cc0 100644 --- a/src/status_im/contexts/add_new_contact/events_test.cljs +++ b/src/status_im/contexts/chat/home/add_new_contact/events_test.cljs @@ -1,8 +1,8 @@ -(ns status-im.contexts.add-new-contact.events-test +(ns status-im.contexts.chat.home.add-new-contact.events-test (:require [cljs.test :refer-macros [deftest are]] matcher-combinators.test - [status-im.contexts.add-new-contact.events :as events])) + [status-im.contexts.chat.home.add-new-contact.events :as events])) (def user-ukey "0x04ca27ed9c7c4099d230c6d8853ad0cfaf084a019c543e9e433d3c04fac6de9147cf572b10e247cfe52f396b5aa10456b56dd1cf1d8a681e2b93993d44594b2e85") diff --git a/src/status_im/contexts/add_new_contact/scan/scan_profile_qr_page.cljs b/src/status_im/contexts/chat/home/add_new_contact/scan/scan_profile_qr_page.cljs similarity index 88% rename from src/status_im/contexts/add_new_contact/scan/scan_profile_qr_page.cljs rename to src/status_im/contexts/chat/home/add_new_contact/scan/scan_profile_qr_page.cljs index f91a8101c5f..8241f8c0e11 100644 --- a/src/status_im/contexts/add_new_contact/scan/scan_profile_qr_page.cljs +++ b/src/status_im/contexts/chat/home/add_new_contact/scan/scan_profile_qr_page.cljs @@ -1,4 +1,4 @@ -(ns status-im.contexts.add-new-contact.scan.scan-profile-qr-page +(ns status-im.contexts.chat.home.add-new-contact.scan.scan-profile-qr-page (:require [react-native.core :as rn] [react-native.hooks :as hooks] [status-im.common.scan-qr-code.view :as scan-qr-code] diff --git a/src/status_im/contexts/add_new_contact/style.cljs b/src/status_im/contexts/chat/home/add_new_contact/style.cljs similarity index 97% rename from src/status_im/contexts/add_new_contact/style.cljs rename to src/status_im/contexts/chat/home/add_new_contact/style.cljs index 471490c3fd7..19a9e21fe7e 100644 --- a/src/status_im/contexts/add_new_contact/style.cljs +++ b/src/status_im/contexts/chat/home/add_new_contact/style.cljs @@ -1,4 +1,4 @@ -(ns status-im.contexts.add-new-contact.style +(ns status-im.contexts.chat.home.add-new-contact.style (:require [quo.foundations.colors :as colors] [react-native.safe-area :as safe-area])) diff --git a/src/status_im/contexts/add_new_contact/views.cljs b/src/status_im/contexts/chat/home/add_new_contact/views.cljs similarity index 97% rename from src/status_im/contexts/add_new_contact/views.cljs rename to src/status_im/contexts/chat/home/add_new_contact/views.cljs index d0bb606397f..9e23b2c3115 100644 --- a/src/status_im/contexts/add_new_contact/views.cljs +++ b/src/status_im/contexts/chat/home/add_new_contact/views.cljs @@ -1,10 +1,10 @@ -(ns status-im.contexts.add-new-contact.views +(ns status-im.contexts.chat.home.add-new-contact.views (:require [clojure.string :as string] [quo.core :as quo] [react-native.clipboard :as clipboard] [react-native.core :as rn] [reagent.core :as reagent] - [status-im.contexts.add-new-contact.style :as style] + [status-im.contexts.chat.home.add-new-contact.style :as style] [utils.address :as address] [utils.debounce :as debounce] [utils.i18n :as i18n] diff --git a/src/status_im/contexts/chat/messages/transport/events.cljs b/src/status_im/contexts/chat/messages/transport/events.cljs index 3af57328090..679f837797a 100644 --- a/src/status_im/contexts/chat/messages/transport/events.cljs +++ b/src/status_im/contexts/chat/messages/transport/events.cljs @@ -14,11 +14,11 @@ [legacy.status-im.visibility-status-updates.core :as models.visibility-status-updates] [legacy.status-im.wallet.core :as wallet] [status-im.constants :as constants] + [status-im.contexts.chat.contacts.events :as models.contact] [status-im.contexts.chat.events :as chat.events] [status-im.contexts.chat.messages.content.reactions.events :as reactions] [status-im.contexts.chat.messages.pin.events :as messages.pin] [status-im.contexts.communities.events :as communities] - [status-im.contexts.contacts.events :as models.contact] [status-im.contexts.shell.activity-center.events :as activity-center] [taoensso.timbre :as log] [utils.re-frame :as rf])) diff --git a/src/status_im/contexts/quo_preview/animated_header_list/animated_header_list.cljs b/src/status_im/contexts/preview/quo/animated_header_list/animated_header_list.cljs similarity index 97% rename from src/status_im/contexts/quo_preview/animated_header_list/animated_header_list.cljs rename to src/status_im/contexts/preview/quo/animated_header_list/animated_header_list.cljs index 0666cf0f78b..60de2e8ba6f 100644 --- a/src/status_im/contexts/quo_preview/animated_header_list/animated_header_list.cljs +++ b/src/status_im/contexts/preview/quo/animated_header_list/animated_header_list.cljs @@ -1,4 +1,4 @@ -(ns status-im.contexts.quo-preview.animated-header-list.animated-header-list +(ns status-im.contexts.preview.quo.animated-header-list.animated-header-list (:require [quo.core :as quo] [quo.foundations.colors :as colors] diff --git a/src/status_im/contexts/quo_preview/avatars/account_avatar.cljs b/src/status_im/contexts/preview/quo/avatars/account_avatar.cljs similarity index 92% rename from src/status_im/contexts/quo_preview/avatars/account_avatar.cljs rename to src/status_im/contexts/preview/quo/avatars/account_avatar.cljs index fd50f6048d8..05aec13a41a 100644 --- a/src/status_im/contexts/quo_preview/avatars/account_avatar.cljs +++ b/src/status_im/contexts/preview/quo/avatars/account_avatar.cljs @@ -1,8 +1,8 @@ -(ns status-im.contexts.quo-preview.avatars.account-avatar +(ns status-im.contexts.preview.quo.avatars.account-avatar (:require [quo.core :as quo] [reagent.core :as reagent] - [status-im.contexts.quo-preview.preview :as preview] + [status-im.contexts.preview.quo.preview :as preview] [utils.re-frame :as rf])) (def descriptor diff --git a/src/status_im/contexts/quo_preview/avatars/channel_avatar.cljs b/src/status_im/contexts/preview/quo/avatars/channel_avatar.cljs similarity index 90% rename from src/status_im/contexts/quo_preview/avatars/channel_avatar.cljs rename to src/status_im/contexts/preview/quo/avatars/channel_avatar.cljs index 31be304c0f3..11575854092 100644 --- a/src/status_im/contexts/quo_preview/avatars/channel_avatar.cljs +++ b/src/status_im/contexts/preview/quo/avatars/channel_avatar.cljs @@ -1,8 +1,8 @@ -(ns status-im.contexts.quo-preview.avatars.channel-avatar +(ns status-im.contexts.preview.quo.avatars.channel-avatar (:require [quo.core :as quo] [reagent.core :as reagent] - [status-im.contexts.quo-preview.preview :as preview])) + [status-im.contexts.preview.quo.preview :as preview])) (def descriptor [{:key :size diff --git a/src/status_im/contexts/quo_preview/avatars/collection_avatar.cljs b/src/status_im/contexts/preview/quo/avatars/collection_avatar.cljs similarity index 85% rename from src/status_im/contexts/quo_preview/avatars/collection_avatar.cljs rename to src/status_im/contexts/preview/quo/avatars/collection_avatar.cljs index b382219b59a..870e499b2bd 100644 --- a/src/status_im/contexts/quo_preview/avatars/collection_avatar.cljs +++ b/src/status_im/contexts/preview/quo/avatars/collection_avatar.cljs @@ -1,10 +1,10 @@ -(ns status-im.contexts.quo-preview.avatars.collection-avatar +(ns status-im.contexts.preview.quo.avatars.collection-avatar (:require [quo.core :as quo] [reagent.core :as reagent] [status-im.common.resources :as resources] - [status-im.contexts.quo-preview.preview :as preview])) + [status-im.contexts.preview.quo.preview :as preview])) (def descriptor [{:key :image diff --git a/src/status_im/contexts/quo_preview/avatars/group_avatar.cljs b/src/status_im/contexts/preview/quo/avatars/group_avatar.cljs similarity index 89% rename from src/status_im/contexts/quo_preview/avatars/group_avatar.cljs rename to src/status_im/contexts/preview/quo/avatars/group_avatar.cljs index a2ebbc972b5..24c7a0d9c28 100644 --- a/src/status_im/contexts/quo_preview/avatars/group_avatar.cljs +++ b/src/status_im/contexts/preview/quo/avatars/group_avatar.cljs @@ -1,9 +1,9 @@ -(ns status-im.contexts.quo-preview.avatars.group-avatar +(ns status-im.contexts.preview.quo.avatars.group-avatar (:require [quo.core :as quo] [reagent.core :as reagent] [status-im.common.resources :as resources] - [status-im.contexts.quo-preview.preview :as preview])) + [status-im.contexts.preview.quo.preview :as preview])) (def descriptor [{:key :size diff --git a/src/status_im/contexts/quo_preview/avatars/icon_avatar.cljs b/src/status_im/contexts/preview/quo/avatars/icon_avatar.cljs similarity index 86% rename from src/status_im/contexts/quo_preview/avatars/icon_avatar.cljs rename to src/status_im/contexts/preview/quo/avatars/icon_avatar.cljs index 0ac66d1b6a6..2ad869816e7 100644 --- a/src/status_im/contexts/quo_preview/avatars/icon_avatar.cljs +++ b/src/status_im/contexts/preview/quo/avatars/icon_avatar.cljs @@ -1,8 +1,8 @@ -(ns status-im.contexts.quo-preview.avatars.icon-avatar +(ns status-im.contexts.preview.quo.avatars.icon-avatar (:require [quo.core :as quo] [reagent.core :as reagent] - [status-im.contexts.quo-preview.preview :as preview])) + [status-im.contexts.preview.quo.preview :as preview])) (def descriptor [{:key :size diff --git a/src/status_im/contexts/quo_preview/avatars/user_avatar.cljs b/src/status_im/contexts/preview/quo/avatars/user_avatar.cljs similarity index 92% rename from src/status_im/contexts/quo_preview/avatars/user_avatar.cljs rename to src/status_im/contexts/preview/quo/avatars/user_avatar.cljs index 0a39b170fa2..dde1ef84d5b 100644 --- a/src/status_im/contexts/quo_preview/avatars/user_avatar.cljs +++ b/src/status_im/contexts/preview/quo/avatars/user_avatar.cljs @@ -1,9 +1,9 @@ -(ns status-im.contexts.quo-preview.avatars.user-avatar +(ns status-im.contexts.preview.quo.avatars.user-avatar (:require [quo.core :as quo] [reagent.core :as reagent] [status-im.common.resources :as resources] - [status-im.contexts.quo-preview.preview :as preview])) + [status-im.contexts.preview.quo.preview :as preview])) (def descriptor [{:key :size diff --git a/src/status_im/contexts/quo_preview/avatars/wallet_user_avatar.cljs b/src/status_im/contexts/preview/quo/avatars/wallet_user_avatar.cljs similarity index 85% rename from src/status_im/contexts/quo_preview/avatars/wallet_user_avatar.cljs rename to src/status_im/contexts/preview/quo/avatars/wallet_user_avatar.cljs index ea898a980c4..be3fdfc5cd0 100644 --- a/src/status_im/contexts/quo_preview/avatars/wallet_user_avatar.cljs +++ b/src/status_im/contexts/preview/quo/avatars/wallet_user_avatar.cljs @@ -1,8 +1,8 @@ -(ns status-im.contexts.quo-preview.avatars.wallet-user-avatar +(ns status-im.contexts.preview.quo.avatars.wallet-user-avatar (:require [quo.core :as quo] [reagent.core :as reagent] - [status-im.contexts.quo-preview.preview :as preview])) + [status-im.contexts.preview.quo.preview :as preview])) (def descriptor [{:key :full-name diff --git a/src/status_im/contexts/quo_preview/banners/banner.cljs b/src/status_im/contexts/preview/quo/banners/banner.cljs similarity index 83% rename from src/status_im/contexts/quo_preview/banners/banner.cljs rename to src/status_im/contexts/preview/quo/banners/banner.cljs index 0281d2d9876..c55f0ea2c81 100644 --- a/src/status_im/contexts/quo_preview/banners/banner.cljs +++ b/src/status_im/contexts/preview/quo/banners/banner.cljs @@ -1,8 +1,8 @@ -(ns status-im.contexts.quo-preview.banners.banner +(ns status-im.contexts.preview.quo.banners.banner (:require [quo.core :as quo] [reagent.core :as reagent] - [status-im.contexts.quo-preview.preview :as preview])) + [status-im.contexts.preview.quo.preview :as preview])) (def descriptor [{:key :latest-pin-text diff --git a/src/status_im/contexts/quo_preview/browser/browser_input.cljs b/src/status_im/contexts/preview/quo/browser/browser_input.cljs similarity index 87% rename from src/status_im/contexts/quo_preview/browser/browser_input.cljs rename to src/status_im/contexts/preview/quo/browser/browser_input.cljs index 8aa154913ef..08b522f6352 100644 --- a/src/status_im/contexts/quo_preview/browser/browser_input.cljs +++ b/src/status_im/contexts/preview/quo/browser/browser_input.cljs @@ -1,8 +1,8 @@ -(ns status-im.contexts.quo-preview.browser.browser-input +(ns status-im.contexts.preview.quo.browser.browser-input (:require [quo.core :as quo] [reagent.core :as reagent] - [status-im.contexts.quo-preview.preview :as preview])) + [status-im.contexts.preview.quo.preview :as preview])) (def descriptor [{:key :favicon? :type :boolean} diff --git a/src/status_im/contexts/quo_preview/buttons/button.cljs b/src/status_im/contexts/preview/quo/buttons/button.cljs similarity index 96% rename from src/status_im/contexts/quo_preview/buttons/button.cljs rename to src/status_im/contexts/preview/quo/buttons/button.cljs index cccf708b386..df91d93fd18 100644 --- a/src/status_im/contexts/quo_preview/buttons/button.cljs +++ b/src/status_im/contexts/preview/quo/buttons/button.cljs @@ -1,10 +1,10 @@ -(ns status-im.contexts.quo-preview.buttons.button +(ns status-im.contexts.preview.quo.buttons.button (:require [quo.core :as quo] [react-native.core :as rn] [reagent.core :as reagent] [status-im.common.resources :as resources] - [status-im.contexts.quo-preview.preview :as preview])) + [status-im.contexts.preview.quo.preview :as preview])) (def descriptor [{:key :type diff --git a/src/status_im/contexts/quo_preview/buttons/composer_button.cljs b/src/status_im/contexts/preview/quo/buttons/composer_button.cljs similarity index 85% rename from src/status_im/contexts/quo_preview/buttons/composer_button.cljs rename to src/status_im/contexts/preview/quo/buttons/composer_button.cljs index 0b7858b926e..62ccc8e9a51 100644 --- a/src/status_im/contexts/quo_preview/buttons/composer_button.cljs +++ b/src/status_im/contexts/preview/quo/buttons/composer_button.cljs @@ -1,8 +1,8 @@ -(ns status-im.contexts.quo-preview.buttons.composer-button +(ns status-im.contexts.preview.quo.buttons.composer-button (:require [quo.core :as quo] [reagent.core :as reagent] - [status-im.contexts.quo-preview.preview :as preview])) + [status-im.contexts.preview.quo.preview :as preview])) (def descriptor [{:key :blur? diff --git a/src/status_im/contexts/quo_preview/buttons/dynamic_button.cljs b/src/status_im/contexts/preview/quo/buttons/dynamic_button.cljs similarity index 89% rename from src/status_im/contexts/quo_preview/buttons/dynamic_button.cljs rename to src/status_im/contexts/preview/quo/buttons/dynamic_button.cljs index 03241d46ab9..1816df77edb 100644 --- a/src/status_im/contexts/quo_preview/buttons/dynamic_button.cljs +++ b/src/status_im/contexts/preview/quo/buttons/dynamic_button.cljs @@ -1,8 +1,8 @@ -(ns status-im.contexts.quo-preview.buttons.dynamic-button +(ns status-im.contexts.preview.quo.buttons.dynamic-button (:require [quo.core :as quo] [reagent.core :as reagent] - [status-im.contexts.quo-preview.preview :as preview] + [status-im.contexts.preview.quo.preview :as preview] [utils.i18n :as i18n])) (def descriptor diff --git a/src/status_im/contexts/quo_preview/buttons/predictive_keyboard.cljs b/src/status_im/contexts/preview/quo/buttons/predictive_keyboard.cljs similarity index 89% rename from src/status_im/contexts/quo_preview/buttons/predictive_keyboard.cljs rename to src/status_im/contexts/preview/quo/buttons/predictive_keyboard.cljs index 284f50c42d2..43bca5cf88c 100644 --- a/src/status_im/contexts/quo_preview/buttons/predictive_keyboard.cljs +++ b/src/status_im/contexts/preview/quo/buttons/predictive_keyboard.cljs @@ -1,9 +1,9 @@ -(ns status-im.contexts.quo-preview.buttons.predictive-keyboard +(ns status-im.contexts.preview.quo.buttons.predictive-keyboard (:require [quo.core :as quo] [quo.foundations.colors :as colors] [reagent.core :as reagent] - [status-im.contexts.quo-preview.preview :as preview])) + [status-im.contexts.preview.quo.preview :as preview])) (def descriptor [{:key :type diff --git a/src/status_im/contexts/quo_preview/buttons/slide_button.cljs b/src/status_im/contexts/preview/quo/buttons/slide_button.cljs similarity index 94% rename from src/status_im/contexts/quo_preview/buttons/slide_button.cljs rename to src/status_im/contexts/preview/quo/buttons/slide_button.cljs index 43c15d5aebf..e8feb0c3e8d 100644 --- a/src/status_im/contexts/quo_preview/buttons/slide_button.cljs +++ b/src/status_im/contexts/preview/quo/buttons/slide_button.cljs @@ -1,9 +1,9 @@ -(ns status-im.contexts.quo-preview.buttons.slide-button +(ns status-im.contexts.preview.quo.buttons.slide-button (:require [quo.core :as quo] [react-native.core :as rn] [reagent.core :as reagent] - [status-im.contexts.quo-preview.preview :as preview])) + [status-im.contexts.preview.quo.preview :as preview])) (def descriptor [{:key :size diff --git a/src/status_im/contexts/quo_preview/buttons/wallet_button.cljs b/src/status_im/contexts/preview/quo/buttons/wallet_button.cljs similarity index 82% rename from src/status_im/contexts/quo_preview/buttons/wallet_button.cljs rename to src/status_im/contexts/preview/quo/buttons/wallet_button.cljs index 32a96728c95..77827fec5a7 100644 --- a/src/status_im/contexts/quo_preview/buttons/wallet_button.cljs +++ b/src/status_im/contexts/preview/quo/buttons/wallet_button.cljs @@ -1,8 +1,8 @@ -(ns status-im.contexts.quo-preview.buttons.wallet-button +(ns status-im.contexts.preview.quo.buttons.wallet-button (:require [quo.core :as quo] [reagent.core :as reagent] - [status-im.contexts.quo-preview.preview :as preview])) + [status-im.contexts.preview.quo.preview :as preview])) (def descriptor [{:key :disabled? :type :boolean}]) diff --git a/src/status_im/contexts/quo_preview/buttons/wallet_ctas.cljs b/src/status_im/contexts/preview/quo/buttons/wallet_ctas.cljs similarity index 74% rename from src/status_im/contexts/quo_preview/buttons/wallet_ctas.cljs rename to src/status_im/contexts/preview/quo/buttons/wallet_ctas.cljs index 9bb306434ed..5e66ef3e5f3 100644 --- a/src/status_im/contexts/quo_preview/buttons/wallet_ctas.cljs +++ b/src/status_im/contexts/preview/quo/buttons/wallet_ctas.cljs @@ -1,7 +1,7 @@ -(ns status-im.contexts.quo-preview.buttons.wallet-ctas +(ns status-im.contexts.preview.quo.buttons.wallet-ctas (:require [quo.core :as quo] - [status-im.contexts.quo-preview.preview :as preview])) + [status-im.contexts.preview.quo.preview :as preview])) (defn view [] diff --git a/src/status_im/contexts/quo_preview/calendar/calendar.cljs b/src/status_im/contexts/preview/quo/calendar/calendar.cljs similarity index 88% rename from src/status_im/contexts/quo_preview/calendar/calendar.cljs rename to src/status_im/contexts/preview/quo/calendar/calendar.cljs index 8e072a14abb..9a2e910a333 100644 --- a/src/status_im/contexts/quo_preview/calendar/calendar.cljs +++ b/src/status_im/contexts/preview/quo/calendar/calendar.cljs @@ -1,8 +1,8 @@ -(ns status-im.contexts.quo-preview.calendar.calendar +(ns status-im.contexts.preview.quo.calendar.calendar (:require [quo.core :as quo] [reagent.core :as reagent] - [status-im.contexts.quo-preview.preview :as preview] + [status-im.contexts.preview.quo.preview :as preview] [utils.datetime :as datetime])) (def descriptor diff --git a/src/status_im/contexts/quo_preview/calendar/calendar_day.cljs b/src/status_im/contexts/preview/quo/calendar/calendar_day.cljs similarity index 82% rename from src/status_im/contexts/quo_preview/calendar/calendar_day.cljs rename to src/status_im/contexts/preview/quo/calendar/calendar_day.cljs index ae56f8ee58a..f7bca5de7cd 100644 --- a/src/status_im/contexts/quo_preview/calendar/calendar_day.cljs +++ b/src/status_im/contexts/preview/quo/calendar/calendar_day.cljs @@ -1,8 +1,8 @@ -(ns status-im.contexts.quo-preview.calendar.calendar-day +(ns status-im.contexts.preview.quo.calendar.calendar-day (:require [quo.core :as quo] [reagent.core :as reagent] - [status-im.contexts.quo-preview.preview :as preview])) + [status-im.contexts.preview.quo.preview :as preview])) (def descriptor [(preview/customization-color-option) diff --git a/src/status_im/contexts/quo_preview/calendar/calendar_year.cljs b/src/status_im/contexts/preview/quo/calendar/calendar_year.cljs similarity index 77% rename from src/status_im/contexts/quo_preview/calendar/calendar_year.cljs rename to src/status_im/contexts/preview/quo/calendar/calendar_year.cljs index 375d6b8f0e0..3d44124e491 100644 --- a/src/status_im/contexts/quo_preview/calendar/calendar_year.cljs +++ b/src/status_im/contexts/preview/quo/calendar/calendar_year.cljs @@ -1,8 +1,8 @@ -(ns status-im.contexts.quo-preview.calendar.calendar-year +(ns status-im.contexts.preview.quo.calendar.calendar-year (:require [quo.core :as quo] [reagent.core :as reagent] - [status-im.contexts.quo-preview.preview :as preview])) + [status-im.contexts.preview.quo.preview :as preview])) (def descriptor [{:key :selected? :type :boolean} diff --git a/src/status_im/contexts/quo_preview/code/snippet.cljs b/src/status_im/contexts/preview/quo/code/snippet.cljs similarity index 96% rename from src/status_im/contexts/quo_preview/code/snippet.cljs rename to src/status_im/contexts/preview/quo/code/snippet.cljs index 0f342f90823..8279f37f1ab 100644 --- a/src/status_im/contexts/quo_preview/code/snippet.cljs +++ b/src/status_im/contexts/preview/quo/code/snippet.cljs @@ -1,8 +1,8 @@ -(ns status-im.contexts.quo-preview.code.snippet +(ns status-im.contexts.preview.quo.code.snippet (:require [quo.core :as quo] [reagent.core :as reagent] - [status-im.contexts.quo-preview.preview :as preview])) + [status-im.contexts.preview.quo.preview :as preview])) (def go-example "func (s *Server) listenAndServe() { diff --git a/src/status_im/contexts/quo_preview/code/snippet_preview.cljs b/src/status_im/contexts/preview/quo/code/snippet_preview.cljs similarity index 89% rename from src/status_im/contexts/quo_preview/code/snippet_preview.cljs rename to src/status_im/contexts/preview/quo/code/snippet_preview.cljs index c0b66916e75..14c14a9b082 100644 --- a/src/status_im/contexts/quo_preview/code/snippet_preview.cljs +++ b/src/status_im/contexts/preview/quo/code/snippet_preview.cljs @@ -1,8 +1,8 @@ -(ns status-im.contexts.quo-preview.code.snippet-preview +(ns status-im.contexts.preview.quo.code.snippet-preview (:require [quo.core :as quo] [reagent.core :as reagent] - [status-im.contexts.quo-preview.preview :as preview])) + [status-im.contexts.preview.quo.preview :as preview])) (def go-example "for(let ind") diff --git a/src/status_im/contexts/quo_preview/colors/color.cljs b/src/status_im/contexts/preview/quo/colors/color.cljs similarity index 88% rename from src/status_im/contexts/quo_preview/colors/color.cljs rename to src/status_im/contexts/preview/quo/colors/color.cljs index add13c0bc4a..2900865206b 100644 --- a/src/status_im/contexts/quo_preview/colors/color.cljs +++ b/src/status_im/contexts/preview/quo/colors/color.cljs @@ -1,8 +1,8 @@ -(ns status-im.contexts.quo-preview.colors.color +(ns status-im.contexts.preview.quo.colors.color (:require [quo.core :as quo] [reagent.core :as reagent] - [status-im.contexts.quo-preview.preview :as preview])) + [status-im.contexts.preview.quo.preview :as preview])) (def descriptor [(preview/customization-color-option {:feng-shui? true}) diff --git a/src/status_im/contexts/quo_preview/colors/color_picker.cljs b/src/status_im/contexts/preview/quo/colors/color_picker.cljs similarity index 90% rename from src/status_im/contexts/quo_preview/colors/color_picker.cljs rename to src/status_im/contexts/preview/quo/colors/color_picker.cljs index 5dfa55da0cf..0d0f4718111 100644 --- a/src/status_im/contexts/quo_preview/colors/color_picker.cljs +++ b/src/status_im/contexts/preview/quo/colors/color_picker.cljs @@ -1,9 +1,9 @@ -(ns status-im.contexts.quo-preview.colors.color-picker +(ns status-im.contexts.preview.quo.colors.color-picker (:require [quo.core :as quo] [react-native.core :as rn] [reagent.core :as reagent] - [status-im.contexts.quo-preview.preview :as preview])) + [status-im.contexts.preview.quo.preview :as preview])) (def descriptor [{:key :blur? diff --git a/src/status_im/contexts/quo_preview/common.cljs b/src/status_im/contexts/preview/quo/common.cljs similarity index 95% rename from src/status_im/contexts/quo_preview/common.cljs rename to src/status_im/contexts/preview/quo/common.cljs index 2fb3c7dcfbc..71581b9420a 100644 --- a/src/status_im/contexts/quo_preview/common.cljs +++ b/src/status_im/contexts/preview/quo/common.cljs @@ -1,4 +1,4 @@ -(ns status-im.contexts.quo-preview.common +(ns status-im.contexts.preview.quo.common (:require [quo.core :as quo] [quo.theme :as quo.theme] diff --git a/src/status_im/contexts/quo_preview/community/channel_actions.cljs b/src/status_im/contexts/preview/quo/community/channel_actions.cljs similarity index 89% rename from src/status_im/contexts/quo_preview/community/channel_actions.cljs rename to src/status_im/contexts/preview/quo/community/channel_actions.cljs index 4a53fa14d1e..f5f7369b74b 100644 --- a/src/status_im/contexts/quo_preview/community/channel_actions.cljs +++ b/src/status_im/contexts/preview/quo/community/channel_actions.cljs @@ -1,8 +1,8 @@ -(ns status-im.contexts.quo-preview.community.channel-actions +(ns status-im.contexts.preview.quo.community.channel-actions (:require [quo.core :as quo] [react-native.core :as rn] - [status-im.contexts.quo-preview.preview :as preview])) + [status-im.contexts.preview.quo.preview :as preview])) (defn view [] diff --git a/src/status_im/contexts/quo_preview/community/community_card_view.cljs b/src/status_im/contexts/preview/quo/community/community_card_view.cljs similarity index 92% rename from src/status_im/contexts/quo_preview/community/community_card_view.cljs rename to src/status_im/contexts/preview/quo/community/community_card_view.cljs index 8f8e5fa1567..b3675bd930d 100644 --- a/src/status_im/contexts/quo_preview/community/community_card_view.cljs +++ b/src/status_im/contexts/preview/quo/community/community_card_view.cljs @@ -1,9 +1,9 @@ -(ns status-im.contexts.quo-preview.community.community-card-view +(ns status-im.contexts.preview.quo.community.community-card-view (:require [quo.core :as quo] [reagent.core :as reagent] [status-im.common.resources :as resources] - [status-im.contexts.quo-preview.preview :as preview] + [status-im.contexts.preview.quo.preview :as preview] [utils.i18n :as i18n])) (def community-data diff --git a/src/status_im/contexts/quo_preview/community/community_membership_list_view.cljs b/src/status_im/contexts/preview/quo/community/community_membership_list_view.cljs similarity index 85% rename from src/status_im/contexts/quo_preview/community/community_membership_list_view.cljs rename to src/status_im/contexts/preview/quo/community/community_membership_list_view.cljs index 3fea7054048..a3c2579b4e8 100644 --- a/src/status_im/contexts/quo_preview/community/community_membership_list_view.cljs +++ b/src/status_im/contexts/preview/quo/community/community_membership_list_view.cljs @@ -1,9 +1,9 @@ -(ns status-im.contexts.quo-preview.community.community-membership-list-view +(ns status-im.contexts.preview.quo.community.community-membership-list-view (:require [quo.core :as quo] [reagent.core :as reagent] - [status-im.contexts.quo-preview.community.data :as data] - [status-im.contexts.quo-preview.preview :as preview])) + [status-im.contexts.preview.quo.community.data :as data] + [status-im.contexts.preview.quo.preview :as preview])) (def descriptor [{:key :notifications diff --git a/src/status_im/contexts/quo_preview/community/community_stat.cljs b/src/status_im/contexts/preview/quo/community/community_stat.cljs similarity index 79% rename from src/status_im/contexts/quo_preview/community/community_stat.cljs rename to src/status_im/contexts/preview/quo/community/community_stat.cljs index f786ad09234..212a9d8c4e7 100644 --- a/src/status_im/contexts/quo_preview/community/community_stat.cljs +++ b/src/status_im/contexts/preview/quo/community/community_stat.cljs @@ -1,8 +1,8 @@ -(ns status-im.contexts.quo-preview.community.community-stat +(ns status-im.contexts.preview.quo.community.community-stat (:require [quo.core :as quo] [reagent.core :as reagent] - [status-im.contexts.quo-preview.preview :as preview])) + [status-im.contexts.preview.quo.preview :as preview])) (def descriptor [{:key :value diff --git a/src/status_im/contexts/quo_preview/community/data.cljs b/src/status_im/contexts/preview/quo/community/data.cljs similarity index 94% rename from src/status_im/contexts/quo_preview/community/data.cljs rename to src/status_im/contexts/preview/quo/community/data.cljs index fed67dc1e93..1d859db6207 100644 --- a/src/status_im/contexts/quo_preview/community/data.cljs +++ b/src/status_im/contexts/preview/quo/community/data.cljs @@ -1,4 +1,4 @@ -(ns status-im.contexts.quo-preview.community.data +(ns status-im.contexts.preview.quo.community.data (:require [status-im.common.resources :as resources] [utils.i18n :as i18n])) diff --git a/src/status_im/contexts/quo_preview/community/discover_card.cljs b/src/status_im/contexts/preview/quo/community/discover_card.cljs similarity index 79% rename from src/status_im/contexts/quo_preview/community/discover_card.cljs rename to src/status_im/contexts/preview/quo/community/discover_card.cljs index 91b34f7fa54..c70b6bc2873 100644 --- a/src/status_im/contexts/quo_preview/community/discover_card.cljs +++ b/src/status_im/contexts/preview/quo/community/discover_card.cljs @@ -1,8 +1,8 @@ -(ns status-im.contexts.quo-preview.community.discover-card +(ns status-im.contexts.preview.quo.community.discover-card (:require [quo.core :as quo] [reagent.core :as reagent] - [status-im.contexts.quo-preview.preview :as preview])) + [status-im.contexts.preview.quo.preview :as preview])) (def descriptor [{:key :title :type :text} diff --git a/src/status_im/contexts/quo_preview/community/token_gating.cljs b/src/status_im/contexts/preview/quo/community/token_gating.cljs similarity index 94% rename from src/status_im/contexts/quo_preview/community/token_gating.cljs rename to src/status_im/contexts/preview/quo/community/token_gating.cljs index 657a6f43a13..156279b207a 100644 --- a/src/status_im/contexts/quo_preview/community/token_gating.cljs +++ b/src/status_im/contexts/preview/quo/community/token_gating.cljs @@ -1,8 +1,8 @@ -(ns status-im.contexts.quo-preview.community.token-gating +(ns status-im.contexts.preview.quo.community.token-gating (:require [quo.core :as quo] [reagent.core :as reagent] - [status-im.contexts.quo-preview.preview :as preview])) + [status-im.contexts.preview.quo.preview :as preview])) (def descriptor [{:label "Tokens sufficient?" diff --git a/src/status_im/contexts/quo_preview/component_preview/events.cljs b/src/status_im/contexts/preview/quo/component_preview/events.cljs similarity index 94% rename from src/status_im/contexts/quo_preview/component_preview/events.cljs rename to src/status_im/contexts/preview/quo/component_preview/events.cljs index 53ff0d03d44..64c78adfdf0 100644 --- a/src/status_im/contexts/quo_preview/component_preview/events.cljs +++ b/src/status_im/contexts/preview/quo/component_preview/events.cljs @@ -1,4 +1,4 @@ -(ns status-im.contexts.quo-preview.component-preview.events +(ns status-im.contexts.preview.quo.component-preview.events (:require [quo.core :as quo] [re-frame.core :as re-frame])) diff --git a/src/status_im/contexts/quo_preview/component_preview/view.cljs b/src/status_im/contexts/preview/quo/component_preview/view.cljs similarity index 86% rename from src/status_im/contexts/quo_preview/component_preview/view.cljs rename to src/status_im/contexts/preview/quo/component_preview/view.cljs index 2a05cd2af3d..17d164fe4fc 100644 --- a/src/status_im/contexts/quo_preview/component_preview/view.cljs +++ b/src/status_im/contexts/preview/quo/component_preview/view.cljs @@ -1,4 +1,4 @@ -(ns status-im.contexts.quo-preview.component-preview.view +(ns status-im.contexts.preview.quo.component-preview.view (:require [react-native.core :as rn] [utils.re-frame :as rf])) diff --git a/src/status_im/contexts/quo_preview/counter/counter.cljs b/src/status_im/contexts/preview/quo/counter/counter.cljs similarity index 83% rename from src/status_im/contexts/quo_preview/counter/counter.cljs rename to src/status_im/contexts/preview/quo/counter/counter.cljs index 33f929604d5..c721654841a 100644 --- a/src/status_im/contexts/quo_preview/counter/counter.cljs +++ b/src/status_im/contexts/preview/quo/counter/counter.cljs @@ -1,8 +1,8 @@ -(ns status-im.contexts.quo-preview.counter.counter +(ns status-im.contexts.preview.quo.counter.counter (:require [quo.core :as quo] [reagent.core :as reagent] - [status-im.contexts.quo-preview.preview :as preview])) + [status-im.contexts.preview.quo.preview :as preview])) (def descriptor [{:key :type diff --git a/src/status_im/contexts/quo_preview/counter/step.cljs b/src/status_im/contexts/preview/quo/counter/step.cljs similarity index 87% rename from src/status_im/contexts/quo_preview/counter/step.cljs rename to src/status_im/contexts/preview/quo/counter/step.cljs index f989c90fc6f..183ab3724f0 100644 --- a/src/status_im/contexts/quo_preview/counter/step.cljs +++ b/src/status_im/contexts/preview/quo/counter/step.cljs @@ -1,8 +1,8 @@ -(ns status-im.contexts.quo-preview.counter.step +(ns status-im.contexts.preview.quo.counter.step (:require [quo.core :as quo] [reagent.core :as reagent] - [status-im.contexts.quo-preview.preview :as preview])) + [status-im.contexts.preview.quo.preview :as preview])) (def descriptor [{:key :type diff --git a/src/status_im/contexts/quo_preview/dividers/date.cljs b/src/status_im/contexts/preview/quo/dividers/date.cljs similarity index 73% rename from src/status_im/contexts/quo_preview/dividers/date.cljs rename to src/status_im/contexts/preview/quo/dividers/date.cljs index 9be89d3e987..4d330d958a8 100644 --- a/src/status_im/contexts/quo_preview/dividers/date.cljs +++ b/src/status_im/contexts/preview/quo/dividers/date.cljs @@ -1,8 +1,8 @@ -(ns status-im.contexts.quo-preview.dividers.date +(ns status-im.contexts.preview.quo.dividers.date (:require [quo.core :as quo] [reagent.core :as reagent] - [status-im.contexts.quo-preview.preview :as preview])) + [status-im.contexts.preview.quo.preview :as preview])) (def descriptor [{:key :label :type :text}]) diff --git a/src/status_im/contexts/quo_preview/dividers/divider_label.cljs b/src/status_im/contexts/preview/quo/dividers/divider_label.cljs similarity index 92% rename from src/status_im/contexts/quo_preview/dividers/divider_label.cljs rename to src/status_im/contexts/preview/quo/dividers/divider_label.cljs index 73846a4f735..e080f367bba 100644 --- a/src/status_im/contexts/quo_preview/dividers/divider_label.cljs +++ b/src/status_im/contexts/preview/quo/dividers/divider_label.cljs @@ -1,8 +1,8 @@ -(ns status-im.contexts.quo-preview.dividers.divider-label +(ns status-im.contexts.preview.quo.dividers.divider-label (:require [quo.core :as quo] [reagent.core :as reagent] - [status-im.contexts.quo-preview.preview :as preview])) + [status-im.contexts.preview.quo.preview :as preview])) (def descriptor [{:key :label diff --git a/src/status_im/contexts/quo_preview/dividers/divider_line.cljs b/src/status_im/contexts/preview/quo/dividers/divider_line.cljs similarity index 78% rename from src/status_im/contexts/quo_preview/dividers/divider_line.cljs rename to src/status_im/contexts/preview/quo/dividers/divider_line.cljs index 45a5104188b..17aeb306cdb 100644 --- a/src/status_im/contexts/quo_preview/dividers/divider_line.cljs +++ b/src/status_im/contexts/preview/quo/dividers/divider_line.cljs @@ -1,8 +1,8 @@ -(ns status-im.contexts.quo-preview.dividers.divider-line +(ns status-im.contexts.preview.quo.dividers.divider-line (:require [quo.core :as quo] [reagent.core :as reagent] - [status-im.contexts.quo-preview.preview :as preview])) + [status-im.contexts.preview.quo.preview :as preview])) (def descriptor [{:key :blur? diff --git a/src/status_im/contexts/quo_preview/dividers/new_messages.cljs b/src/status_im/contexts/preview/quo/dividers/new_messages.cljs similarity index 77% rename from src/status_im/contexts/quo_preview/dividers/new_messages.cljs rename to src/status_im/contexts/preview/quo/dividers/new_messages.cljs index 78501228d64..9348c06eda8 100644 --- a/src/status_im/contexts/quo_preview/dividers/new_messages.cljs +++ b/src/status_im/contexts/preview/quo/dividers/new_messages.cljs @@ -1,8 +1,8 @@ -(ns status-im.contexts.quo-preview.dividers.new-messages +(ns status-im.contexts.preview.quo.dividers.new-messages (:require [quo.core :as quo] [reagent.core :as reagent] - [status-im.contexts.quo-preview.preview :as preview])) + [status-im.contexts.preview.quo.preview :as preview])) (def descriptor [{:key :label diff --git a/src/status_im/contexts/quo_preview/dividers/strength_divider.cljs b/src/status_im/contexts/preview/quo/dividers/strength_divider.cljs similarity index 85% rename from src/status_im/contexts/quo_preview/dividers/strength_divider.cljs rename to src/status_im/contexts/preview/quo/dividers/strength_divider.cljs index 85a50a96efc..a9542b36a08 100644 --- a/src/status_im/contexts/quo_preview/dividers/strength_divider.cljs +++ b/src/status_im/contexts/preview/quo/dividers/strength_divider.cljs @@ -1,8 +1,8 @@ -(ns status-im.contexts.quo-preview.dividers.strength-divider +(ns status-im.contexts.preview.quo.dividers.strength-divider (:require [quo.core :as quo] [reagent.core :as reagent] - [status-im.contexts.quo-preview.preview :as preview])) + [status-im.contexts.preview.quo.preview :as preview])) (def descriptor [{:key :type diff --git a/src/status_im/contexts/quo_preview/drawers/action_drawers.cljs b/src/status_im/contexts/preview/quo/drawers/action_drawers.cljs similarity index 95% rename from src/status_im/contexts/quo_preview/drawers/action_drawers.cljs rename to src/status_im/contexts/preview/quo/drawers/action_drawers.cljs index 5dcc82210a8..58eaab431db 100644 --- a/src/status_im/contexts/quo_preview/drawers/action_drawers.cljs +++ b/src/status_im/contexts/preview/quo/drawers/action_drawers.cljs @@ -1,9 +1,9 @@ -(ns status-im.contexts.quo-preview.drawers.action-drawers +(ns status-im.contexts.preview.quo.drawers.action-drawers (:require [quo.core :as quo] [react-native.core :as rn] [reagent.core :as reagent] - [status-im.contexts.quo-preview.preview :as preview] + [status-im.contexts.preview.quo.preview :as preview] [utils.re-frame :as rf])) (def descriptor diff --git a/src/status_im/contexts/quo_preview/drawers/bottom_actions.cljs b/src/status_im/contexts/preview/quo/drawers/bottom_actions.cljs similarity index 95% rename from src/status_im/contexts/quo_preview/drawers/bottom_actions.cljs rename to src/status_im/contexts/preview/quo/drawers/bottom_actions.cljs index 8bea6617af7..a0f9ca2c414 100644 --- a/src/status_im/contexts/quo_preview/drawers/bottom_actions.cljs +++ b/src/status_im/contexts/preview/quo/drawers/bottom_actions.cljs @@ -1,8 +1,8 @@ -(ns status-im.contexts.quo-preview.drawers.bottom-actions +(ns status-im.contexts.preview.quo.drawers.bottom-actions (:require [quo.core :as quo] [reagent.core :as reagent] - [status-im.contexts.quo-preview.preview :as preview])) + [status-im.contexts.preview.quo.preview :as preview])) (def button-two "Cancel") (def button-one "Request to join") diff --git a/src/status_im/contexts/quo_preview/drawers/documentation_drawers.cljs b/src/status_im/contexts/preview/quo/drawers/documentation_drawers.cljs similarity index 98% rename from src/status_im/contexts/quo_preview/drawers/documentation_drawers.cljs rename to src/status_im/contexts/preview/quo/drawers/documentation_drawers.cljs index 7d55224370b..ee4a12a85c1 100644 --- a/src/status_im/contexts/quo_preview/drawers/documentation_drawers.cljs +++ b/src/status_im/contexts/preview/quo/drawers/documentation_drawers.cljs @@ -1,10 +1,10 @@ -(ns status-im.contexts.quo-preview.drawers.documentation-drawers +(ns status-im.contexts.preview.quo.drawers.documentation-drawers (:require [quo.core :as quo] [quo.foundations.colors :as colors] [react-native.core :as rn] [reagent.core :as reagent] - [status-im.contexts.quo-preview.preview :as preview] + [status-im.contexts.preview.quo.preview :as preview] [utils.re-frame :as rf])) (def descriptor diff --git a/src/status_im/contexts/quo_preview/drawers/drawer_buttons.cljs b/src/status_im/contexts/preview/quo/drawers/drawer_buttons.cljs similarity index 92% rename from src/status_im/contexts/quo_preview/drawers/drawer_buttons.cljs rename to src/status_im/contexts/preview/quo/drawers/drawer_buttons.cljs index 0574f9e3221..a9441fcdae5 100644 --- a/src/status_im/contexts/quo_preview/drawers/drawer_buttons.cljs +++ b/src/status_im/contexts/preview/quo/drawers/drawer_buttons.cljs @@ -1,9 +1,9 @@ -(ns status-im.contexts.quo-preview.drawers.drawer-buttons +(ns status-im.contexts.preview.quo.drawers.drawer-buttons (:require [quo.core :as quo] [quo.foundations.colors :as colors] [reagent.core :as reagent] - [status-im.contexts.quo-preview.preview :as preview])) + [status-im.contexts.preview.quo.preview :as preview])) (def descriptor [{:key :top-heading diff --git a/src/status_im/contexts/quo_preview/drawers/drawer_top.cljs b/src/status_im/contexts/preview/quo/drawers/drawer_top.cljs similarity index 95% rename from src/status_im/contexts/quo_preview/drawers/drawer_top.cljs rename to src/status_im/contexts/preview/quo/drawers/drawer_top.cljs index 3427f80de4a..ee53bc8722d 100644 --- a/src/status_im/contexts/quo_preview/drawers/drawer_top.cljs +++ b/src/status_im/contexts/preview/quo/drawers/drawer_top.cljs @@ -1,11 +1,11 @@ -(ns status-im.contexts.quo-preview.drawers.drawer-top +(ns status-im.contexts.preview.quo.drawers.drawer-top (:require [quo.core :as quo] [react-native.core :as rn] [reagent.core :as reagent] [status-im.common.resources :as resources] + [status-im.contexts.preview.quo.preview :as preview] [status-im.contexts.profile.utils :as profile.utils] - [status-im.contexts.quo-preview.preview :as preview] [utils.re-frame :as rf])) (def descriptor diff --git a/src/status_im/contexts/quo_preview/drawers/permission_drawers.cljs b/src/status_im/contexts/preview/quo/drawers/permission_drawers.cljs similarity index 97% rename from src/status_im/contexts/quo_preview/drawers/permission_drawers.cljs rename to src/status_im/contexts/preview/quo/drawers/permission_drawers.cljs index d1d3b7ba4fa..377bc5847e3 100644 --- a/src/status_im/contexts/quo_preview/drawers/permission_drawers.cljs +++ b/src/status_im/contexts/preview/quo/drawers/permission_drawers.cljs @@ -1,4 +1,4 @@ -(ns status-im.contexts.quo-preview.drawers.permission-drawers +(ns status-im.contexts.preview.quo.drawers.permission-drawers (:require [quo.core :as quo] [quo.foundations.colors :as colors] diff --git a/src/status_im/contexts/quo_preview/dropdowns/dropdown.cljs b/src/status_im/contexts/preview/quo/dropdowns/dropdown.cljs similarity index 96% rename from src/status_im/contexts/quo_preview/dropdowns/dropdown.cljs rename to src/status_im/contexts/preview/quo/dropdowns/dropdown.cljs index f4c4b7ed8d2..a77ddbf3f7b 100644 --- a/src/status_im/contexts/quo_preview/dropdowns/dropdown.cljs +++ b/src/status_im/contexts/preview/quo/dropdowns/dropdown.cljs @@ -1,10 +1,10 @@ -(ns status-im.contexts.quo-preview.dropdowns.dropdown +(ns status-im.contexts.preview.quo.dropdowns.dropdown (:require [quo.core :as quo] [react-native.core :as rn] [reagent.core :as reagent] [status-im.common.resources :as resources] - [status-im.contexts.quo-preview.preview :as preview])) + [status-im.contexts.preview.quo.preview :as preview])) (def descriptor [{:key :type diff --git a/src/status_im/contexts/quo_preview/dropdowns/dropdown_input.cljs b/src/status_im/contexts/preview/quo/dropdowns/dropdown_input.cljs similarity index 92% rename from src/status_im/contexts/quo_preview/dropdowns/dropdown_input.cljs rename to src/status_im/contexts/preview/quo/dropdowns/dropdown_input.cljs index 80514d70570..cb6eb38ce33 100644 --- a/src/status_im/contexts/quo_preview/dropdowns/dropdown_input.cljs +++ b/src/status_im/contexts/preview/quo/dropdowns/dropdown_input.cljs @@ -1,8 +1,8 @@ -(ns status-im.contexts.quo-preview.dropdowns.dropdown-input +(ns status-im.contexts.preview.quo.dropdowns.dropdown-input (:require [quo.core :as quo] [reagent.core :as reagent] - [status-im.contexts.quo-preview.preview :as preview])) + [status-im.contexts.preview.quo.preview :as preview])) (def descriptor [{:key :state diff --git a/src/status_im/contexts/quo_preview/dropdowns/network_dropdown.cljs b/src/status_im/contexts/preview/quo/dropdowns/network_dropdown.cljs similarity index 90% rename from src/status_im/contexts/quo_preview/dropdowns/network_dropdown.cljs rename to src/status_im/contexts/preview/quo/dropdowns/network_dropdown.cljs index d1cb705bef9..7cb98dadf88 100644 --- a/src/status_im/contexts/quo_preview/dropdowns/network_dropdown.cljs +++ b/src/status_im/contexts/preview/quo/dropdowns/network_dropdown.cljs @@ -1,10 +1,10 @@ -(ns status-im.contexts.quo-preview.dropdowns.network-dropdown +(ns status-im.contexts.preview.quo.dropdowns.network-dropdown (:require [quo.core :as quo] [quo.foundations.resources :as quo.resources] [react-native.core :as rn] [reagent.core :as reagent] - [status-im.contexts.quo-preview.preview :as preview])) + [status-im.contexts.preview.quo.preview :as preview])) (def descriptor [{:key :state diff --git a/src/status_im/contexts/quo_preview/empty_state/empty_state.cljs b/src/status_im/contexts/preview/quo/empty_state/empty_state.cljs similarity index 93% rename from src/status_im/contexts/quo_preview/empty_state/empty_state.cljs rename to src/status_im/contexts/preview/quo/empty_state/empty_state.cljs index 683890e49b1..03a75f7729f 100644 --- a/src/status_im/contexts/quo_preview/empty_state/empty_state.cljs +++ b/src/status_im/contexts/preview/quo/empty_state/empty_state.cljs @@ -1,10 +1,10 @@ -(ns status-im.contexts.quo-preview.empty-state.empty-state +(ns status-im.contexts.preview.quo.empty-state.empty-state (:require [quo.core :as quo] [quo.theme] [reagent.core :as reagent] [status-im.common.resources :as resources] - [status-im.contexts.quo-preview.preview :as preview])) + [status-im.contexts.preview.quo.preview :as preview])) (def descriptor [{:key :title diff --git a/src/status_im/contexts/quo_preview/foundations/shadows.cljs b/src/status_im/contexts/preview/quo/foundations/shadows.cljs similarity index 94% rename from src/status_im/contexts/quo_preview/foundations/shadows.cljs rename to src/status_im/contexts/preview/quo/foundations/shadows.cljs index 786f52004d1..b2c9a3b9bf3 100644 --- a/src/status_im/contexts/quo_preview/foundations/shadows.cljs +++ b/src/status_im/contexts/preview/quo/foundations/shadows.cljs @@ -1,4 +1,4 @@ -(ns status-im.contexts.quo-preview.foundations.shadows +(ns status-im.contexts.preview.quo.foundations.shadows (:require [quo.core :as quo] [quo.foundations.colors :as colors] @@ -6,7 +6,7 @@ [quo.theme :as quo.theme] [react-native.core :as rn] [reagent.core :as reagent] - [status-im.contexts.quo-preview.preview :as preview])) + [status-im.contexts.preview.quo.preview :as preview])) (defn demo-box [shadow? description shadow-style] diff --git a/src/status_im/contexts/quo_preview/gradient/gradient_cover.cljs b/src/status_im/contexts/preview/quo/gradient/gradient_cover.cljs similarity index 96% rename from src/status_im/contexts/quo_preview/gradient/gradient_cover.cljs rename to src/status_im/contexts/preview/quo/gradient/gradient_cover.cljs index df687709351..f0a7d5267c1 100644 --- a/src/status_im/contexts/quo_preview/gradient/gradient_cover.cljs +++ b/src/status_im/contexts/preview/quo/gradient/gradient_cover.cljs @@ -1,4 +1,4 @@ -(ns status-im.contexts.quo-preview.gradient.gradient-cover +(ns status-im.contexts.preview.quo.gradient.gradient-cover (:require [quo.core :as quo] [quo.theme :as quo.theme] @@ -6,7 +6,7 @@ [react-native.core :as rn] [reagent.core :as reagent] [status-im.common.resources :as resources] - [status-im.contexts.quo-preview.preview :as preview] + [status-im.contexts.preview.quo.preview :as preview] [utils.re-frame :as rf])) (defn render-action-sheet diff --git a/src/status_im/contexts/quo_preview/graph/interactive_graph.cljs b/src/status_im/contexts/preview/quo/graph/interactive_graph.cljs similarity index 97% rename from src/status_im/contexts/quo_preview/graph/interactive_graph.cljs rename to src/status_im/contexts/preview/quo/graph/interactive_graph.cljs index d6065aefb42..c06bc35051e 100644 --- a/src/status_im/contexts/quo_preview/graph/interactive_graph.cljs +++ b/src/status_im/contexts/preview/quo/graph/interactive_graph.cljs @@ -1,4 +1,4 @@ -(ns status-im.contexts.quo-preview.graph.interactive-graph +(ns status-im.contexts.preview.quo.graph.interactive-graph (:require [goog.string :as gstring] [quo.components.graph.utils :as utils] @@ -6,7 +6,7 @@ [quo.foundations.colors :as colors] [react-native.core :as rn] [reagent.core :as reagent] - [status-im.contexts.quo-preview.preview :as preview])) + [status-im.contexts.preview.quo.preview :as preview])) (def weekly-data [{:value 123 diff --git a/src/status_im/contexts/quo_preview/graph/wallet_graph.cljs b/src/status_im/contexts/preview/quo/graph/wallet_graph.cljs similarity index 95% rename from src/status_im/contexts/quo_preview/graph/wallet_graph.cljs rename to src/status_im/contexts/preview/quo/graph/wallet_graph.cljs index 7639ee655ae..f35b3ed209e 100644 --- a/src/status_im/contexts/quo_preview/graph/wallet_graph.cljs +++ b/src/status_im/contexts/preview/quo/graph/wallet_graph.cljs @@ -1,8 +1,8 @@ -(ns status-im.contexts.quo-preview.graph.wallet-graph +(ns status-im.contexts.preview.quo.graph.wallet-graph (:require [quo.core :as quo] [reagent.core :as reagent] - [status-im.contexts.quo-preview.preview :as preview])) + [status-im.contexts.preview.quo.preview :as preview])) (defn generate-crypto-token-prices [num-elements volatility] diff --git a/src/status_im/contexts/quo_preview/info/info_message.cljs b/src/status_im/contexts/preview/quo/info/info_message.cljs similarity index 86% rename from src/status_im/contexts/quo_preview/info/info_message.cljs rename to src/status_im/contexts/preview/quo/info/info_message.cljs index d2509c14011..de0cf5e5faf 100644 --- a/src/status_im/contexts/quo_preview/info/info_message.cljs +++ b/src/status_im/contexts/preview/quo/info/info_message.cljs @@ -1,8 +1,8 @@ -(ns status-im.contexts.quo-preview.info.info-message +(ns status-im.contexts.preview.quo.info.info-message (:require [quo.core :as quo] [reagent.core :as reagent] - [status-im.contexts.quo-preview.preview :as preview])) + [status-im.contexts.preview.quo.preview :as preview])) (def descriptor [{:key :type diff --git a/src/status_im/contexts/quo_preview/info/information_box.cljs b/src/status_im/contexts/preview/quo/info/information_box.cljs similarity index 91% rename from src/status_im/contexts/quo_preview/info/information_box.cljs rename to src/status_im/contexts/preview/quo/info/information_box.cljs index 8afc39ed2b2..6b0ee78003c 100644 --- a/src/status_im/contexts/quo_preview/info/information_box.cljs +++ b/src/status_im/contexts/preview/quo/info/information_box.cljs @@ -1,8 +1,8 @@ -(ns status-im.contexts.quo-preview.info.information-box +(ns status-im.contexts.preview.quo.info.information-box (:require [quo.core :as quo] [reagent.core :as reagent] - [status-im.contexts.quo-preview.preview :as preview])) + [status-im.contexts.preview.quo.preview :as preview])) (def descriptor [{:key :type diff --git a/src/status_im/contexts/quo_preview/inputs/address_input.cljs b/src/status_im/contexts/preview/quo/inputs/address_input.cljs similarity index 91% rename from src/status_im/contexts/quo_preview/inputs/address_input.cljs rename to src/status_im/contexts/preview/quo/inputs/address_input.cljs index 2919e981f4f..8423b8ccb93 100644 --- a/src/status_im/contexts/quo_preview/inputs/address_input.cljs +++ b/src/status_im/contexts/preview/quo/inputs/address_input.cljs @@ -1,9 +1,9 @@ -(ns status-im.contexts.quo-preview.inputs.address-input +(ns status-im.contexts.preview.quo.inputs.address-input (:require [quo.core :as quo] [reagent.core :as reagent] [status-im.constants :as constants] - [status-im.contexts.quo-preview.preview :as preview])) + [status-im.contexts.preview.quo.preview :as preview])) (def descriptor [{:label "Scanned value:" diff --git a/src/status_im/contexts/quo_preview/inputs/input.cljs b/src/status_im/contexts/preview/quo/inputs/input.cljs similarity index 95% rename from src/status_im/contexts/quo_preview/inputs/input.cljs rename to src/status_im/contexts/preview/quo/inputs/input.cljs index a1b0415e7ff..6aab51f96ea 100644 --- a/src/status_im/contexts/quo_preview/inputs/input.cljs +++ b/src/status_im/contexts/preview/quo/inputs/input.cljs @@ -1,9 +1,9 @@ -(ns status-im.contexts.quo-preview.inputs.input +(ns status-im.contexts.preview.quo.inputs.input (:require [clojure.string :as string] [quo.core :as quo] [reagent.core :as reagent] - [status-im.contexts.quo-preview.preview :as preview])) + [status-im.contexts.preview.quo.preview :as preview])) (def descriptor [{:key :type diff --git a/src/status_im/contexts/quo_preview/inputs/locked_input.cljs b/src/status_im/contexts/preview/quo/inputs/locked_input.cljs similarity index 86% rename from src/status_im/contexts/quo_preview/inputs/locked_input.cljs rename to src/status_im/contexts/preview/quo/inputs/locked_input.cljs index a136607416f..f1e423adbc4 100644 --- a/src/status_im/contexts/quo_preview/inputs/locked_input.cljs +++ b/src/status_im/contexts/preview/quo/inputs/locked_input.cljs @@ -1,8 +1,8 @@ -(ns status-im.contexts.quo-preview.inputs.locked-input +(ns status-im.contexts.preview.quo.inputs.locked-input (:require [quo.core :as quo] [reagent.core :as reagent] - [status-im.contexts.quo-preview.preview :as preview])) + [status-im.contexts.preview.quo.preview :as preview])) (def descriptor [{:key :icon :type :boolean} diff --git a/src/status_im/contexts/quo_preview/inputs/profile_input.cljs b/src/status_im/contexts/preview/quo/inputs/profile_input.cljs similarity index 92% rename from src/status_im/contexts/quo_preview/inputs/profile_input.cljs rename to src/status_im/contexts/preview/quo/inputs/profile_input.cljs index 0131882f3b9..95ea9a50748 100644 --- a/src/status_im/contexts/quo_preview/inputs/profile_input.cljs +++ b/src/status_im/contexts/preview/quo/inputs/profile_input.cljs @@ -1,10 +1,10 @@ -(ns status-im.contexts.quo-preview.inputs.profile-input +(ns status-im.contexts.preview.quo.inputs.profile-input (:require [quo.core :as quo] [react-native.core :as rn] [reagent.core :as reagent] [status-im.common.resources :as resources] - [status-im.contexts.quo-preview.preview :as preview])) + [status-im.contexts.preview.quo.preview :as preview])) (def descriptor [{:key :disabled? diff --git a/src/status_im/contexts/quo_preview/inputs/recovery_phrase_input.cljs b/src/status_im/contexts/preview/quo/inputs/recovery_phrase_input.cljs similarity index 93% rename from src/status_im/contexts/quo_preview/inputs/recovery_phrase_input.cljs rename to src/status_im/contexts/preview/quo/inputs/recovery_phrase_input.cljs index 6ca5d0ab5a0..74ca32bf64e 100644 --- a/src/status_im/contexts/quo_preview/inputs/recovery_phrase_input.cljs +++ b/src/status_im/contexts/preview/quo/inputs/recovery_phrase_input.cljs @@ -1,9 +1,9 @@ -(ns status-im.contexts.quo-preview.inputs.recovery-phrase-input +(ns status-im.contexts.preview.quo.inputs.recovery-phrase-input (:require [quo.core :as quo] [react-native.core :as rn] [reagent.core :as reagent] - [status-im.contexts.quo-preview.preview :as preview])) + [status-im.contexts.preview.quo.preview :as preview])) (def descriptor [{:key :text diff --git a/src/status_im/contexts/quo_preview/inputs/search_input.cljs b/src/status_im/contexts/preview/quo/inputs/search_input.cljs similarity index 94% rename from src/status_im/contexts/quo_preview/inputs/search_input.cljs rename to src/status_im/contexts/preview/quo/inputs/search_input.cljs index c8455aec7ec..1cefb59a6aa 100644 --- a/src/status_im/contexts/quo_preview/inputs/search_input.cljs +++ b/src/status_im/contexts/preview/quo/inputs/search_input.cljs @@ -1,9 +1,9 @@ -(ns status-im.contexts.quo-preview.inputs.search-input +(ns status-im.contexts.preview.quo.inputs.search-input (:require [quo.core :as quo] [reagent.core :as reagent] [status-im.common.resources :as resources] - [status-im.contexts.quo-preview.preview :as preview])) + [status-im.contexts.preview.quo.preview :as preview])) (def descriptor [{:key :value diff --git a/src/status_im/contexts/quo_preview/inputs/title_input.cljs b/src/status_im/contexts/preview/quo/inputs/title_input.cljs similarity index 87% rename from src/status_im/contexts/quo_preview/inputs/title_input.cljs rename to src/status_im/contexts/preview/quo/inputs/title_input.cljs index fe18822eaf7..573603346ce 100644 --- a/src/status_im/contexts/quo_preview/inputs/title_input.cljs +++ b/src/status_im/contexts/preview/quo/inputs/title_input.cljs @@ -1,8 +1,8 @@ -(ns status-im.contexts.quo-preview.inputs.title-input +(ns status-im.contexts.preview.quo.inputs.title-input (:require [quo.core :as quo] [reagent.core :as reagent] - [status-im.contexts.quo-preview.preview :as preview])) + [status-im.contexts.preview.quo.preview :as preview])) (def descriptor [{:key :disabled? diff --git a/src/status_im/contexts/preview/quo/ios/drawer_bar.cljs b/src/status_im/contexts/preview/quo/ios/drawer_bar.cljs new file mode 100644 index 00000000000..80ffbb0370a --- /dev/null +++ b/src/status_im/contexts/preview/quo/ios/drawer_bar.cljs @@ -0,0 +1,9 @@ +(ns status-im.contexts.preview.quo.ios.drawer-bar + (:require + [quo.core :as quo] + [status-im.contexts.preview.quo.preview :as preview])) + +(defn view + [] + [preview/preview-container {} + [quo/drawer-bar]]) diff --git a/src/status_im/contexts/quo_preview/keycard/keycard.cljs b/src/status_im/contexts/preview/quo/keycard/keycard.cljs similarity index 77% rename from src/status_im/contexts/quo_preview/keycard/keycard.cljs rename to src/status_im/contexts/preview/quo/keycard/keycard.cljs index 6f064c413e0..717b2355347 100644 --- a/src/status_im/contexts/quo_preview/keycard/keycard.cljs +++ b/src/status_im/contexts/preview/quo/keycard/keycard.cljs @@ -1,8 +1,8 @@ -(ns status-im.contexts.quo-preview.keycard.keycard +(ns status-im.contexts.preview.quo.keycard.keycard (:require [quo.core :as quo] [reagent.core :as reagent] - [status-im.contexts.quo-preview.preview :as preview])) + [status-im.contexts.preview.quo.preview :as preview])) (def descriptor [{:key :holder-name :type :text} diff --git a/src/status_im/contexts/quo_preview/links/link_preview.cljs b/src/status_im/contexts/preview/quo/links/link_preview.cljs similarity index 95% rename from src/status_im/contexts/quo_preview/links/link_preview.cljs rename to src/status_im/contexts/preview/quo/links/link_preview.cljs index 3c93130bdd2..df20d6960ce 100644 --- a/src/status_im/contexts/quo_preview/links/link_preview.cljs +++ b/src/status_im/contexts/preview/quo/links/link_preview.cljs @@ -1,9 +1,9 @@ -(ns status-im.contexts.quo-preview.links.link-preview +(ns status-im.contexts.preview.quo.links.link-preview (:require [quo.core :as quo] [reagent.core :as reagent] [status-im.common.resources :as resources] - [status-im.contexts.quo-preview.preview :as preview])) + [status-im.contexts.preview.quo.preview :as preview])) (def descriptor [{:type :text :key :title} diff --git a/src/status_im/contexts/quo_preview/links/url_preview.cljs b/src/status_im/contexts/preview/quo/links/url_preview.cljs similarity index 90% rename from src/status_im/contexts/quo_preview/links/url_preview.cljs rename to src/status_im/contexts/preview/quo/links/url_preview.cljs index 1d8143cb719..e75808ff452 100644 --- a/src/status_im/contexts/quo_preview/links/url_preview.cljs +++ b/src/status_im/contexts/preview/quo/links/url_preview.cljs @@ -1,9 +1,9 @@ -(ns status-im.contexts.quo-preview.links.url-preview +(ns status-im.contexts.preview.quo.links.url-preview (:require [quo.core :as quo] [reagent.core :as reagent] [status-im.common.resources :as resources] - [status-im.contexts.quo-preview.preview :as preview])) + [status-im.contexts.preview.quo.preview :as preview])) (def descriptor [{:type :text :key :title} diff --git a/src/status_im/contexts/quo_preview/links/url_preview_list.cljs b/src/status_im/contexts/preview/quo/links/url_preview_list.cljs similarity index 91% rename from src/status_im/contexts/quo_preview/links/url_preview_list.cljs rename to src/status_im/contexts/preview/quo/links/url_preview_list.cljs index c70aabd74cc..b3c0160a6a6 100644 --- a/src/status_im/contexts/quo_preview/links/url_preview_list.cljs +++ b/src/status_im/contexts/preview/quo/links/url_preview_list.cljs @@ -1,10 +1,10 @@ -(ns status-im.contexts.quo-preview.links.url-preview-list +(ns status-im.contexts.preview.quo.links.url-preview-list (:require [quo.core :as quo] [react-native.core :as rn] [reagent.core :as reagent] [status-im.common.resources :as resources] - [status-im.contexts.quo-preview.preview :as preview])) + [status-im.contexts.preview.quo.preview :as preview])) (def descriptor [{:type :number :key :previews-length}]) diff --git a/src/status_im/contexts/quo_preview/list_items/account.cljs b/src/status_im/contexts/preview/quo/list_items/account.cljs similarity index 95% rename from src/status_im/contexts/quo_preview/list_items/account.cljs rename to src/status_im/contexts/preview/quo/list_items/account.cljs index 0652b7a4c16..ef2b99be99e 100644 --- a/src/status_im/contexts/quo_preview/list_items/account.cljs +++ b/src/status_im/contexts/preview/quo/list_items/account.cljs @@ -1,8 +1,8 @@ -(ns status-im.contexts.quo-preview.list-items.account +(ns status-im.contexts.preview.quo.list-items.account (:require [quo.core :as quo] [reagent.core :as reagent] - [status-im.contexts.quo-preview.preview :as preview])) + [status-im.contexts.preview.quo.preview :as preview])) (def descriptor [{:key :type diff --git a/src/status_im/contexts/quo_preview/list_items/account_list_card.cljs b/src/status_im/contexts/preview/quo/list_items/account_list_card.cljs similarity index 92% rename from src/status_im/contexts/quo_preview/list_items/account_list_card.cljs rename to src/status_im/contexts/preview/quo/list_items/account_list_card.cljs index ee28ae0f167..2cc06374d3a 100644 --- a/src/status_im/contexts/quo_preview/list_items/account_list_card.cljs +++ b/src/status_im/contexts/preview/quo/list_items/account_list_card.cljs @@ -1,8 +1,8 @@ -(ns status-im.contexts.quo-preview.list-items.account-list-card +(ns status-im.contexts.preview.quo.list-items.account-list-card (:require [quo.core :as quo] [reagent.core :as reagent] - [status-im.contexts.quo-preview.preview :as preview])) + [status-im.contexts.preview.quo.preview :as preview])) (def descriptor [{:key :action diff --git a/src/status_im/contexts/quo_preview/list_items/address.cljs b/src/status_im/contexts/preview/quo/list_items/address.cljs similarity index 88% rename from src/status_im/contexts/quo_preview/list_items/address.cljs rename to src/status_im/contexts/preview/quo/list_items/address.cljs index a09aacd0fd2..fc92d2a35e3 100644 --- a/src/status_im/contexts/quo_preview/list_items/address.cljs +++ b/src/status_im/contexts/preview/quo/list_items/address.cljs @@ -1,8 +1,8 @@ -(ns status-im.contexts.quo-preview.list-items.address +(ns status-im.contexts.preview.quo.list-items.address (:require [quo.core :as quo] [reagent.core :as reagent] - [status-im.contexts.quo-preview.preview :as preview])) + [status-im.contexts.preview.quo.preview :as preview])) (def descriptor [{:key :active-state? :type :boolean} diff --git a/src/status_im/contexts/quo_preview/list_items/channel.cljs b/src/status_im/contexts/preview/quo/list_items/channel.cljs similarity index 91% rename from src/status_im/contexts/quo_preview/list_items/channel.cljs rename to src/status_im/contexts/preview/quo/list_items/channel.cljs index 115af5c9be6..d7a7e9ab033 100644 --- a/src/status_im/contexts/quo_preview/list_items/channel.cljs +++ b/src/status_im/contexts/preview/quo/list_items/channel.cljs @@ -1,8 +1,8 @@ -(ns status-im.contexts.quo-preview.list-items.channel +(ns status-im.contexts.preview.quo.list-items.channel (:require [quo.core :as quo] [reagent.core :as reagent] - [status-im.contexts.quo-preview.preview :as preview])) + [status-im.contexts.preview.quo.preview :as preview])) (def descriptor [{:key :name diff --git a/src/status_im/contexts/quo_preview/list_items/community_list.cljs b/src/status_im/contexts/preview/quo/list_items/community_list.cljs similarity index 95% rename from src/status_im/contexts/quo_preview/list_items/community_list.cljs rename to src/status_im/contexts/preview/quo/list_items/community_list.cljs index fac0ad5d669..326e346a19d 100644 --- a/src/status_im/contexts/quo_preview/list_items/community_list.cljs +++ b/src/status_im/contexts/preview/quo/list_items/community_list.cljs @@ -1,11 +1,11 @@ -(ns status-im.contexts.quo-preview.list-items.community-list +(ns status-im.contexts.preview.quo.list-items.community-list (:require [quo.core :as quo] [quo.theme :as quo.theme] [reagent.core :as reagent] [status-im.common.resources :as resources] - [status-im.contexts.quo-preview.community.data :as data] - [status-im.contexts.quo-preview.preview :as preview])) + [status-im.contexts.preview.quo.community.data :as data] + [status-im.contexts.preview.quo.preview :as preview])) (def descriptor-type {:type :select diff --git a/src/status_im/contexts/quo_preview/list_items/dapp.cljs b/src/status_im/contexts/preview/quo/list_items/dapp.cljs similarity index 92% rename from src/status_im/contexts/quo_preview/list_items/dapp.cljs rename to src/status_im/contexts/preview/quo/list_items/dapp.cljs index 61fc2dc931f..dde1d9aa515 100644 --- a/src/status_im/contexts/quo_preview/list_items/dapp.cljs +++ b/src/status_im/contexts/preview/quo/list_items/dapp.cljs @@ -1,10 +1,10 @@ -(ns status-im.contexts.quo-preview.list-items.dapp +(ns status-im.contexts.preview.quo.list-items.dapp (:require [quo.core :as quo] [quo.foundations.resources :as resources] [react-native.core :as rn] [reagent.core :as reagent] - [status-im.contexts.quo-preview.preview :as preview])) + [status-im.contexts.preview.quo.preview :as preview])) (def descriptor [{:key :state diff --git a/src/status_im/contexts/quo_preview/list_items/preview_lists.cljs b/src/status_im/contexts/preview/quo/list_items/preview_lists.cljs similarity index 97% rename from src/status_im/contexts/quo_preview/list_items/preview_lists.cljs rename to src/status_im/contexts/preview/quo/list_items/preview_lists.cljs index 3edfbabc5d1..f556cc36a23 100644 --- a/src/status_im/contexts/quo_preview/list_items/preview_lists.cljs +++ b/src/status_im/contexts/preview/quo/list_items/preview_lists.cljs @@ -1,10 +1,10 @@ -(ns status-im.contexts.quo-preview.list-items.preview-lists +(ns status-im.contexts.preview.quo.list-items.preview-lists (:require [quo.core :as quo] [quo.foundations.resources :as quo.resources] [reagent.core :as reagent] [status-im.common.resources :as resources] - [status-im.contexts.quo-preview.preview :as preview])) + [status-im.contexts.preview.quo.preview :as preview])) (def descriptor [{:key :type diff --git a/src/status_im/contexts/quo_preview/list_items/saved_address.cljs b/src/status_im/contexts/preview/quo/list_items/saved_address.cljs similarity index 91% rename from src/status_im/contexts/quo_preview/list_items/saved_address.cljs rename to src/status_im/contexts/preview/quo/list_items/saved_address.cljs index 388fa22dd0b..defccacf0d8 100644 --- a/src/status_im/contexts/quo_preview/list_items/saved_address.cljs +++ b/src/status_im/contexts/preview/quo/list_items/saved_address.cljs @@ -1,8 +1,8 @@ -(ns status-im.contexts.quo-preview.list-items.saved-address +(ns status-im.contexts.preview.quo.list-items.saved-address (:require [quo.core :as quo] [reagent.core :as reagent] - [status-im.contexts.quo-preview.preview :as preview])) + [status-im.contexts.preview.quo.preview :as preview])) (def descriptor [(preview/customization-color-option {:key :account-color}) diff --git a/src/status_im/contexts/quo_preview/list_items/saved_contact_address.cljs b/src/status_im/contexts/preview/quo/list_items/saved_contact_address.cljs similarity index 94% rename from src/status_im/contexts/quo_preview/list_items/saved_contact_address.cljs rename to src/status_im/contexts/preview/quo/list_items/saved_contact_address.cljs index 210f54047f6..521cbf32de1 100644 --- a/src/status_im/contexts/quo_preview/list_items/saved_contact_address.cljs +++ b/src/status_im/contexts/preview/quo/list_items/saved_contact_address.cljs @@ -1,9 +1,9 @@ -(ns status-im.contexts.quo-preview.list-items.saved-contact-address +(ns status-im.contexts.preview.quo.list-items.saved-contact-address (:require [quo.core :as quo] [reagent.core :as reagent] [status-im.common.resources :as resources] - [status-im.contexts.quo-preview.preview :as preview])) + [status-im.contexts.preview.quo.preview :as preview])) (def descriptor [{:key :accounts-number :type :number} diff --git a/src/status_im/contexts/quo_preview/list_items/token_network.cljs b/src/status_im/contexts/preview/quo/list_items/token_network.cljs similarity index 92% rename from src/status_im/contexts/quo_preview/list_items/token_network.cljs rename to src/status_im/contexts/preview/quo/list_items/token_network.cljs index 6b5a054fab6..431c570dd73 100644 --- a/src/status_im/contexts/quo_preview/list_items/token_network.cljs +++ b/src/status_im/contexts/preview/quo/list_items/token_network.cljs @@ -1,9 +1,9 @@ -(ns status-im.contexts.quo-preview.list-items.token-network +(ns status-im.contexts.preview.quo.list-items.token-network (:require [quo.core :as quo] [quo.foundations.resources :as quo.resources] [reagent.core :as reagent] - [status-im.contexts.quo-preview.preview :as preview])) + [status-im.contexts.preview.quo.preview :as preview])) (def networks-list [{:source (quo.resources/get-network :ethereum)} diff --git a/src/status_im/contexts/quo_preview/list_items/token_value.cljs b/src/status_im/contexts/preview/quo/list_items/token_value.cljs similarity index 91% rename from src/status_im/contexts/quo_preview/list_items/token_value.cljs rename to src/status_im/contexts/preview/quo/list_items/token_value.cljs index 63bdb4e6218..91da0903b54 100644 --- a/src/status_im/contexts/quo_preview/list_items/token_value.cljs +++ b/src/status_im/contexts/preview/quo/list_items/token_value.cljs @@ -1,8 +1,8 @@ -(ns status-im.contexts.quo-preview.list-items.token-value +(ns status-im.contexts.preview.quo.list-items.token-value (:require [quo.core :as quo] [reagent.core :as reagent] - [status-im.contexts.quo-preview.preview :as preview])) + [status-im.contexts.preview.quo.preview :as preview])) (def descriptor [{:key :token diff --git a/src/status_im/contexts/quo_preview/list_items/user_list.cljs b/src/status_im/contexts/preview/quo/list_items/user_list.cljs similarity index 93% rename from src/status_im/contexts/quo_preview/list_items/user_list.cljs rename to src/status_im/contexts/preview/quo/list_items/user_list.cljs index 0de8719b3ed..80a5a010a7a 100644 --- a/src/status_im/contexts/quo_preview/list_items/user_list.cljs +++ b/src/status_im/contexts/preview/quo/list_items/user_list.cljs @@ -1,9 +1,9 @@ -(ns status-im.contexts.quo-preview.list-items.user-list +(ns status-im.contexts.preview.quo.list-items.user-list (:require [quo.core :as quo] [reagent.core :as reagent] [status-im.common.resources :as resources] - [status-im.contexts.quo-preview.preview :as preview] + [status-im.contexts.preview.quo.preview :as preview] [utils.address :as address])) (def descriptor diff --git a/src/status_im/contexts/quo_preview/loaders/skeleton_list.cljs b/src/status_im/contexts/preview/quo/loaders/skeleton_list.cljs similarity index 85% rename from src/status_im/contexts/quo_preview/loaders/skeleton_list.cljs rename to src/status_im/contexts/preview/quo/loaders/skeleton_list.cljs index eca35a13c05..535571f01c4 100644 --- a/src/status_im/contexts/quo_preview/loaders/skeleton_list.cljs +++ b/src/status_im/contexts/preview/quo/loaders/skeleton_list.cljs @@ -1,8 +1,8 @@ -(ns status-im.contexts.quo-preview.loaders.skeleton-list +(ns status-im.contexts.preview.quo.loaders.skeleton-list (:require [quo.core :as quo] [reagent.core :as reagent] - [status-im.contexts.quo-preview.preview :as preview])) + [status-im.contexts.preview.quo.preview :as preview])) (def descriptor [{:key :content diff --git a/src/status_im/contexts/quo_preview/main.cljs b/src/status_im/contexts/preview/quo/main.cljs similarity index 66% rename from src/status_im/contexts/quo_preview/main.cljs rename to src/status_im/contexts/preview/quo/main.cljs index 5a988cf929e..743fef1d7f8 100644 --- a/src/status_im/contexts/quo_preview/main.cljs +++ b/src/status_im/contexts/preview/quo/main.cljs @@ -1,192 +1,196 @@ -(ns status-im.contexts.quo-preview.main +(ns status-im.contexts.preview.quo.main (:refer-clojure :exclude [filter]) (:require [quo.core :as quo] [react-native.core :as rn] [reagent.core :as reagent] - [status-im.contexts.quo-preview.animated-header-list.animated-header-list + [status-im.contexts.preview.quo.animated-header-list.animated-header-list :as animated-header-list] - [status-im.contexts.quo-preview.avatars.account-avatar :as account-avatar] - [status-im.contexts.quo-preview.avatars.channel-avatar :as channel-avatar] - [status-im.contexts.quo-preview.avatars.collection-avatar :as collection-avatar] - [status-im.contexts.quo-preview.avatars.group-avatar :as group-avatar] - [status-im.contexts.quo-preview.avatars.icon-avatar :as icon-avatar] - [status-im.contexts.quo-preview.avatars.user-avatar :as user-avatar] - [status-im.contexts.quo-preview.avatars.wallet-user-avatar :as + [status-im.contexts.preview.quo.avatars.account-avatar :as account-avatar] + [status-im.contexts.preview.quo.avatars.channel-avatar :as channel-avatar] + [status-im.contexts.preview.quo.avatars.collection-avatar :as collection-avatar] + [status-im.contexts.preview.quo.avatars.group-avatar :as group-avatar] + [status-im.contexts.preview.quo.avatars.icon-avatar :as icon-avatar] + [status-im.contexts.preview.quo.avatars.user-avatar :as user-avatar] + [status-im.contexts.preview.quo.avatars.wallet-user-avatar :as wallet-user-avatar] - [status-im.contexts.quo-preview.banners.banner :as banner] - [status-im.contexts.quo-preview.browser.browser-input :as browser-input] - [status-im.contexts.quo-preview.buttons.button :as button] - [status-im.contexts.quo-preview.buttons.composer-button :as + [status-im.contexts.preview.quo.banners.banner :as banner] + [status-im.contexts.preview.quo.browser.browser-input :as browser-input] + [status-im.contexts.preview.quo.buttons.button :as button] + [status-im.contexts.preview.quo.buttons.composer-button :as composer-button] - [status-im.contexts.quo-preview.buttons.dynamic-button :as dynamic-button] - [status-im.contexts.quo-preview.buttons.predictive-keyboard :as + [status-im.contexts.preview.quo.buttons.dynamic-button :as dynamic-button] + [status-im.contexts.preview.quo.buttons.predictive-keyboard :as predictive-keyboard] - [status-im.contexts.quo-preview.buttons.slide-button :as slide-button] - [status-im.contexts.quo-preview.buttons.wallet-button :as wallet-button] - [status-im.contexts.quo-preview.buttons.wallet-ctas :as wallet-ctas] - [status-im.contexts.quo-preview.calendar.calendar :as calendar] - [status-im.contexts.quo-preview.calendar.calendar-day :as calendar-day] - [status-im.contexts.quo-preview.calendar.calendar-year :as calendar-year] - [status-im.contexts.quo-preview.code.snippet :as code-snippet] - [status-im.contexts.quo-preview.code.snippet-preview :as code-snippet-preview] - [status-im.contexts.quo-preview.colors.color :as color] - [status-im.contexts.quo-preview.colors.color-picker :as color-picker] - [status-im.contexts.quo-preview.common :as common] - [status-im.contexts.quo-preview.community.channel-actions :as + [status-im.contexts.preview.quo.buttons.slide-button :as slide-button] + [status-im.contexts.preview.quo.buttons.wallet-button :as wallet-button] + [status-im.contexts.preview.quo.buttons.wallet-ctas :as wallet-ctas] + [status-im.contexts.preview.quo.calendar.calendar :as calendar] + [status-im.contexts.preview.quo.calendar.calendar-day :as calendar-day] + [status-im.contexts.preview.quo.calendar.calendar-year :as calendar-year] + [status-im.contexts.preview.quo.code.snippet :as code-snippet] + [status-im.contexts.preview.quo.code.snippet-preview :as code-snippet-preview] + [status-im.contexts.preview.quo.colors.color :as color] + [status-im.contexts.preview.quo.colors.color-picker :as color-picker] + [status-im.contexts.preview.quo.common :as common] + [status-im.contexts.preview.quo.community.channel-actions :as channel-actions] - [status-im.contexts.quo-preview.community.community-card-view :as + [status-im.contexts.preview.quo.community.community-card-view :as community-card] - [status-im.contexts.quo-preview.community.community-membership-list-view + [status-im.contexts.preview.quo.community.community-membership-list-view :as community-membership-list-view] - [status-im.contexts.quo-preview.community.community-stat :as community-stat] - [status-im.contexts.quo-preview.community.discover-card :as discover-card] - [status-im.contexts.quo-preview.community.token-gating :as token-gating] - [status-im.contexts.quo-preview.counter.counter :as counter] - [status-im.contexts.quo-preview.counter.step :as step] - [status-im.contexts.quo-preview.dividers.date :as divider-date] - [status-im.contexts.quo-preview.dividers.divider-label :as divider-label] - [status-im.contexts.quo-preview.dividers.divider-line :as divider-line] - [status-im.contexts.quo-preview.dividers.new-messages :as new-messages] - [status-im.contexts.quo-preview.dividers.strength-divider :as + [status-im.contexts.preview.quo.community.community-stat :as community-stat] + [status-im.contexts.preview.quo.community.discover-card :as discover-card] + [status-im.contexts.preview.quo.community.token-gating :as token-gating] + [status-im.contexts.preview.quo.counter.counter :as counter] + [status-im.contexts.preview.quo.counter.step :as step] + [status-im.contexts.preview.quo.dividers.date :as divider-date] + [status-im.contexts.preview.quo.dividers.divider-label :as divider-label] + [status-im.contexts.preview.quo.dividers.divider-line :as divider-line] + [status-im.contexts.preview.quo.dividers.new-messages :as new-messages] + [status-im.contexts.preview.quo.dividers.strength-divider :as strength-divider] - [status-im.contexts.quo-preview.drawers.action-drawers :as action-drawers] - [status-im.contexts.quo-preview.drawers.bottom-actions :as bottom-actions] - [status-im.contexts.quo-preview.drawers.documentation-drawers :as documentation-drawers] - [status-im.contexts.quo-preview.drawers.drawer-buttons :as drawer-buttons] - [status-im.contexts.quo-preview.drawers.drawer-top :as drawer-top] - [status-im.contexts.quo-preview.drawers.permission-drawers :as + [status-im.contexts.preview.quo.drawers.action-drawers :as action-drawers] + [status-im.contexts.preview.quo.drawers.bottom-actions :as bottom-actions] + [status-im.contexts.preview.quo.drawers.documentation-drawers :as + documentation-drawers] + [status-im.contexts.preview.quo.drawers.drawer-buttons :as drawer-buttons] + [status-im.contexts.preview.quo.drawers.drawer-top :as drawer-top] + [status-im.contexts.preview.quo.drawers.permission-drawers :as permission-drawers] - [status-im.contexts.quo-preview.dropdowns.dropdown :as dropdown] - [status-im.contexts.quo-preview.dropdowns.dropdown-input :as + [status-im.contexts.preview.quo.dropdowns.dropdown :as dropdown] + [status-im.contexts.preview.quo.dropdowns.dropdown-input :as dropdown-input] - [status-im.contexts.quo-preview.dropdowns.network-dropdown :as + [status-im.contexts.preview.quo.dropdowns.network-dropdown :as network-dropdown] - [status-im.contexts.quo-preview.empty-state.empty-state :as empty-state] - [status-im.contexts.quo-preview.foundations.shadows :as shadows] - [status-im.contexts.quo-preview.gradient.gradient-cover :as gradient-cover] - [status-im.contexts.quo-preview.graph.interactive-graph :as + [status-im.contexts.preview.quo.empty-state.empty-state :as empty-state] + [status-im.contexts.preview.quo.foundations.shadows :as shadows] + [status-im.contexts.preview.quo.gradient.gradient-cover :as gradient-cover] + [status-im.contexts.preview.quo.graph.interactive-graph :as interactive-graph] - [status-im.contexts.quo-preview.graph.wallet-graph :as wallet-graph] - [status-im.contexts.quo-preview.info.info-message :as info-message] - [status-im.contexts.quo-preview.info.information-box :as information-box] - [status-im.contexts.quo-preview.inputs.address-input :as address-input] - [status-im.contexts.quo-preview.inputs.input :as input] - [status-im.contexts.quo-preview.inputs.locked-input :as locked-input] - [status-im.contexts.quo-preview.inputs.profile-input :as profile-input] - [status-im.contexts.quo-preview.inputs.recovery-phrase-input :as + [status-im.contexts.preview.quo.graph.wallet-graph :as wallet-graph] + [status-im.contexts.preview.quo.info.info-message :as info-message] + [status-im.contexts.preview.quo.info.information-box :as information-box] + [status-im.contexts.preview.quo.inputs.address-input :as address-input] + [status-im.contexts.preview.quo.inputs.input :as input] + [status-im.contexts.preview.quo.inputs.locked-input :as locked-input] + [status-im.contexts.preview.quo.inputs.profile-input :as profile-input] + [status-im.contexts.preview.quo.inputs.recovery-phrase-input :as recovery-phrase-input] - [status-im.contexts.quo-preview.inputs.search-input :as search-input] - [status-im.contexts.quo-preview.inputs.title-input :as title-input] - [status-im.contexts.quo-preview.ios.drawer-bar :as drawer-bar] - [status-im.contexts.quo-preview.keycard.keycard :as keycard] - [status-im.contexts.quo-preview.links.link-preview :as link-preview] - [status-im.contexts.quo-preview.links.url-preview :as url-preview] - [status-im.contexts.quo-preview.links.url-preview-list :as + [status-im.contexts.preview.quo.inputs.search-input :as search-input] + [status-im.contexts.preview.quo.inputs.title-input :as title-input] + [status-im.contexts.preview.quo.ios.drawer-bar :as drawer-bar] + [status-im.contexts.preview.quo.keycard.keycard :as keycard] + [status-im.contexts.preview.quo.links.link-preview :as link-preview] + [status-im.contexts.preview.quo.links.url-preview :as url-preview] + [status-im.contexts.preview.quo.links.url-preview-list :as url-preview-list] - [status-im.contexts.quo-preview.list-items.account :as + [status-im.contexts.preview.quo.list-items.account :as account-item] - [status-im.contexts.quo-preview.list-items.account-list-card :as + [status-im.contexts.preview.quo.list-items.account-list-card :as account-list-card] - [status-im.contexts.quo-preview.list-items.address :as address] - [status-im.contexts.quo-preview.list-items.channel :as channel] - [status-im.contexts.quo-preview.list-items.community-list :as + [status-im.contexts.preview.quo.list-items.address :as address] + [status-im.contexts.preview.quo.list-items.channel :as channel] + [status-im.contexts.preview.quo.list-items.community-list :as community-list] - [status-im.contexts.quo-preview.list-items.dapp :as dapp] - [status-im.contexts.quo-preview.list-items.preview-lists :as preview-lists] - [status-im.contexts.quo-preview.list-items.saved-address :as saved-address] - [status-im.contexts.quo-preview.list-items.saved-contact-address :as saved-contact-address] - [status-im.contexts.quo-preview.list-items.token-network :as token-network] - [status-im.contexts.quo-preview.list-items.token-value :as token-value] - [status-im.contexts.quo-preview.list-items.user-list :as user-list] - [status-im.contexts.quo-preview.loaders.skeleton-list :as skeleton-list] - [status-im.contexts.quo-preview.markdown.list :as markdown-list] - [status-im.contexts.quo-preview.markdown.text :as text] - [status-im.contexts.quo-preview.messages.author :as messages-author] - [status-im.contexts.quo-preview.messages.gap :as messages-gap] - [status-im.contexts.quo-preview.messages.system-message :as system-message] - [status-im.contexts.quo-preview.navigation.bottom-nav-tab :as + [status-im.contexts.preview.quo.list-items.dapp :as dapp] + [status-im.contexts.preview.quo.list-items.preview-lists :as preview-lists] + [status-im.contexts.preview.quo.list-items.saved-address :as saved-address] + [status-im.contexts.preview.quo.list-items.saved-contact-address :as + saved-contact-address] + [status-im.contexts.preview.quo.list-items.token-network :as token-network] + [status-im.contexts.preview.quo.list-items.token-value :as token-value] + [status-im.contexts.preview.quo.list-items.user-list :as user-list] + [status-im.contexts.preview.quo.loaders.skeleton-list :as skeleton-list] + [status-im.contexts.preview.quo.markdown.list :as markdown-list] + [status-im.contexts.preview.quo.markdown.text :as text] + [status-im.contexts.preview.quo.messages.author :as messages-author] + [status-im.contexts.preview.quo.messages.gap :as messages-gap] + [status-im.contexts.preview.quo.messages.system-message :as system-message] + [status-im.contexts.preview.quo.navigation.bottom-nav-tab :as bottom-nav-tab] - [status-im.contexts.quo-preview.navigation.floating-shell-button :as + [status-im.contexts.preview.quo.navigation.floating-shell-button :as floating-shell-button] - [status-im.contexts.quo-preview.navigation.page-nav :as page-nav] - [status-im.contexts.quo-preview.navigation.top-nav :as top-nav] - [status-im.contexts.quo-preview.notifications.activity-logs :as + [status-im.contexts.preview.quo.navigation.page-nav :as page-nav] + [status-im.contexts.preview.quo.navigation.top-nav :as top-nav] + [status-im.contexts.preview.quo.notifications.activity-logs :as activity-logs] - [status-im.contexts.quo-preview.notifications.activity-logs-photos :as + [status-im.contexts.preview.quo.notifications.activity-logs-photos :as activity-logs-photos] - [status-im.contexts.quo-preview.notifications.notification :as + [status-im.contexts.preview.quo.notifications.notification :as notification] - [status-im.contexts.quo-preview.notifications.toast :as toast] - [status-im.contexts.quo-preview.numbered-keyboard.keyboard-key :as + [status-im.contexts.preview.quo.notifications.toast :as toast] + [status-im.contexts.preview.quo.numbered-keyboard.keyboard-key :as keyboard-key] - [status-im.contexts.quo-preview.numbered-keyboard.numbered-keyboard :as + [status-im.contexts.preview.quo.numbered-keyboard.numbered-keyboard :as numbered-keyboard] - [status-im.contexts.quo-preview.onboarding.small-option-card :as + [status-im.contexts.preview.quo.onboarding.small-option-card :as small-option-card] - [status-im.contexts.quo-preview.password.tips :as tips] - [status-im.contexts.quo-preview.profile.collectible :as collectible] - [status-im.contexts.quo-preview.profile.link-card :as link-card] - [status-im.contexts.quo-preview.profile.profile-card :as profile-card] - [status-im.contexts.quo-preview.profile.select-profile :as select-profile] - [status-im.contexts.quo-preview.profile.showcase-nav :as showcase-nav] - [status-im.contexts.quo-preview.record-audio.record-audio :as record-audio] - [status-im.contexts.quo-preview.selectors.disclaimer :as disclaimer] - [status-im.contexts.quo-preview.selectors.filter :as filter] - [status-im.contexts.quo-preview.selectors.react :as react] - [status-im.contexts.quo-preview.selectors.react-selector :as react-selector] - [status-im.contexts.quo-preview.selectors.reactions-selector :as reactions-selector] - [status-im.contexts.quo-preview.selectors.selectors :as selectors] - [status-im.contexts.quo-preview.settings.accounts :as accounts] - [status-im.contexts.quo-preview.settings.category :as category] - [status-im.contexts.quo-preview.settings.data-item :as data-item] - [status-im.contexts.quo-preview.settings.privacy-option :as privacy-option] - [status-im.contexts.quo-preview.settings.reorder-item :as reorder-item] - [status-im.contexts.quo-preview.settings.section-label :as section-label] - [status-im.contexts.quo-preview.settings.settings-item :as settings-item] - [status-im.contexts.quo-preview.share.qr-code :as qr-code] - [status-im.contexts.quo-preview.share.share-qr-code :as share-qr-code] - [status-im.contexts.quo-preview.style :as style] - [status-im.contexts.quo-preview.switcher.group-messaging-card :as group-messaging-card] - [status-im.contexts.quo-preview.switcher.switcher-cards :as switcher-cards] - [status-im.contexts.quo-preview.tabs.account-selector :as account-selector] - [status-im.contexts.quo-preview.tabs.segmented-tab :as segmented] - [status-im.contexts.quo-preview.tabs.tabs :as tabs] - [status-im.contexts.quo-preview.tags.context-tags :as context-tags] - [status-im.contexts.quo-preview.tags.network-tags :as network-tags] - [status-im.contexts.quo-preview.tags.number-tag :as number-tag] - [status-im.contexts.quo-preview.tags.permission-tag :as permission-tag] - [status-im.contexts.quo-preview.tags.status-tags :as status-tags] - [status-im.contexts.quo-preview.tags.summary-tag :as summary-tag] - [status-im.contexts.quo-preview.tags.tag :as tag] - [status-im.contexts.quo-preview.tags.tags :as tags] - [status-im.contexts.quo-preview.tags.tiny-tag :as tiny-tag] - [status-im.contexts.quo-preview.tags.token-tag :as token-tag] - [status-im.contexts.quo-preview.text-combinations.channel-name :as channel-name] - [status-im.contexts.quo-preview.text-combinations.page-top :as page-top] - [status-im.contexts.quo-preview.text-combinations.preview :as text-combinations] - [status-im.contexts.quo-preview.text-combinations.standard-title :as standard-title] - [status-im.contexts.quo-preview.text-combinations.username :as username] - [status-im.contexts.quo-preview.wallet.account-card :as account-card] - [status-im.contexts.quo-preview.wallet.account-origin :as account-origin] - [status-im.contexts.quo-preview.wallet.account-overview :as + [status-im.contexts.preview.quo.password.tips :as tips] + [status-im.contexts.preview.quo.profile.collectible :as collectible] + [status-im.contexts.preview.quo.profile.link-card :as link-card] + [status-im.contexts.preview.quo.profile.profile-card :as profile-card] + [status-im.contexts.preview.quo.profile.select-profile :as select-profile] + [status-im.contexts.preview.quo.profile.showcase-nav :as showcase-nav] + [status-im.contexts.preview.quo.record-audio.record-audio :as record-audio] + [status-im.contexts.preview.quo.selectors.disclaimer :as disclaimer] + [status-im.contexts.preview.quo.selectors.filter :as filter] + [status-im.contexts.preview.quo.selectors.react :as react] + [status-im.contexts.preview.quo.selectors.react-selector :as react-selector] + [status-im.contexts.preview.quo.selectors.reactions-selector :as reactions-selector] + [status-im.contexts.preview.quo.selectors.selectors :as selectors] + [status-im.contexts.preview.quo.settings.accounts :as accounts] + [status-im.contexts.preview.quo.settings.category :as category] + [status-im.contexts.preview.quo.settings.data-item :as data-item] + [status-im.contexts.preview.quo.settings.privacy-option :as privacy-option] + [status-im.contexts.preview.quo.settings.reorder-item :as reorder-item] + [status-im.contexts.preview.quo.settings.section-label :as section-label] + [status-im.contexts.preview.quo.settings.settings-item :as settings-item] + [status-im.contexts.preview.quo.share.qr-code :as qr-code] + [status-im.contexts.preview.quo.share.share-qr-code :as share-qr-code] + [status-im.contexts.preview.quo.style :as style] + [status-im.contexts.preview.quo.switcher.group-messaging-card :as + group-messaging-card] + [status-im.contexts.preview.quo.switcher.switcher-cards :as switcher-cards] + [status-im.contexts.preview.quo.tabs.account-selector :as account-selector] + [status-im.contexts.preview.quo.tabs.segmented-tab :as segmented] + [status-im.contexts.preview.quo.tabs.tabs :as tabs] + [status-im.contexts.preview.quo.tags.context-tags :as context-tags] + [status-im.contexts.preview.quo.tags.network-tags :as network-tags] + [status-im.contexts.preview.quo.tags.number-tag :as number-tag] + [status-im.contexts.preview.quo.tags.permission-tag :as permission-tag] + [status-im.contexts.preview.quo.tags.status-tags :as status-tags] + [status-im.contexts.preview.quo.tags.summary-tag :as summary-tag] + [status-im.contexts.preview.quo.tags.tag :as tag] + [status-im.contexts.preview.quo.tags.tags :as tags] + [status-im.contexts.preview.quo.tags.tiny-tag :as tiny-tag] + [status-im.contexts.preview.quo.tags.token-tag :as token-tag] + [status-im.contexts.preview.quo.text-combinations.channel-name :as channel-name] + [status-im.contexts.preview.quo.text-combinations.page-top :as page-top] + [status-im.contexts.preview.quo.text-combinations.preview :as text-combinations] + [status-im.contexts.preview.quo.text-combinations.standard-title :as standard-title] + [status-im.contexts.preview.quo.text-combinations.username :as username] + [status-im.contexts.preview.quo.wallet.account-card :as account-card] + [status-im.contexts.preview.quo.wallet.account-origin :as account-origin] + [status-im.contexts.preview.quo.wallet.account-overview :as account-overview] - [status-im.contexts.quo-preview.wallet.account-permissions :as account-permissions] - [status-im.contexts.quo-preview.wallet.confirmation-progress :as confirmation-progress] - [status-im.contexts.quo-preview.wallet.keypair :as keypair] - [status-im.contexts.quo-preview.wallet.network-amount :as network-amount] - [status-im.contexts.quo-preview.wallet.network-bridge :as network-bridge] - [status-im.contexts.quo-preview.wallet.network-link :as network-link] - [status-im.contexts.quo-preview.wallet.network-routing :as network-routing] - [status-im.contexts.quo-preview.wallet.progress-bar :as progress-bar] - [status-im.contexts.quo-preview.wallet.required-tokens :as required-tokens] - [status-im.contexts.quo-preview.wallet.summary-info :as summary-info] - [status-im.contexts.quo-preview.wallet.token-input :as token-input] - [status-im.contexts.quo-preview.wallet.transaction-progress :as transaction-progress] - [status-im.contexts.quo-preview.wallet.transaction-summary :as + [status-im.contexts.preview.quo.wallet.account-permissions :as account-permissions] + [status-im.contexts.preview.quo.wallet.confirmation-progress :as + confirmation-progress] + [status-im.contexts.preview.quo.wallet.keypair :as keypair] + [status-im.contexts.preview.quo.wallet.network-amount :as network-amount] + [status-im.contexts.preview.quo.wallet.network-bridge :as network-bridge] + [status-im.contexts.preview.quo.wallet.network-link :as network-link] + [status-im.contexts.preview.quo.wallet.network-routing :as network-routing] + [status-im.contexts.preview.quo.wallet.progress-bar :as progress-bar] + [status-im.contexts.preview.quo.wallet.required-tokens :as required-tokens] + [status-im.contexts.preview.quo.wallet.summary-info :as summary-info] + [status-im.contexts.preview.quo.wallet.token-input :as token-input] + [status-im.contexts.preview.quo.wallet.transaction-progress :as transaction-progress] + [status-im.contexts.preview.quo.wallet.transaction-summary :as transaction-summary] - [status-im.contexts.quo-preview.wallet.wallet-activity :as wallet-activity] - [status-im.contexts.quo-preview.wallet.wallet-overview :as wallet-overview] + [status-im.contexts.preview.quo.wallet.wallet-activity :as wallet-activity] + [status-im.contexts.preview.quo.wallet.wallet-overview :as wallet-overview] [utils.re-frame :as rf])) (def screens-categories diff --git a/src/status_im/contexts/quo_preview/markdown/list.cljs b/src/status_im/contexts/preview/quo/markdown/list.cljs similarity index 91% rename from src/status_im/contexts/quo_preview/markdown/list.cljs rename to src/status_im/contexts/preview/quo/markdown/list.cljs index a1475e1632e..b611bbc0abb 100644 --- a/src/status_im/contexts/quo_preview/markdown/list.cljs +++ b/src/status_im/contexts/preview/quo/markdown/list.cljs @@ -1,9 +1,9 @@ -(ns status-im.contexts.quo-preview.markdown.list +(ns status-im.contexts.preview.quo.markdown.list (:require [quo.core :as quo] [reagent.core :as reagent] [status-im.common.resources :as resources] - [status-im.contexts.quo-preview.preview :as preview])) + [status-im.contexts.preview.quo.preview :as preview])) (def descriptor [{:key :title :type :text} diff --git a/src/status_im/contexts/quo_preview/markdown/text.cljs b/src/status_im/contexts/preview/quo/markdown/text.cljs similarity index 87% rename from src/status_im/contexts/quo_preview/markdown/text.cljs rename to src/status_im/contexts/preview/quo/markdown/text.cljs index 1d95c7ca590..610e178a2cd 100644 --- a/src/status_im/contexts/quo_preview/markdown/text.cljs +++ b/src/status_im/contexts/preview/quo/markdown/text.cljs @@ -1,8 +1,8 @@ -(ns status-im.contexts.quo-preview.markdown.text +(ns status-im.contexts.preview.quo.markdown.text (:require [quo.core :as quo] [reagent.core :as reagent] - [status-im.contexts.quo-preview.preview :as preview])) + [status-im.contexts.preview.quo.preview :as preview])) (def descriptor [{:key :size diff --git a/src/status_im/contexts/quo_preview/messages/author.cljs b/src/status_im/contexts/preview/quo/messages/author.cljs similarity index 89% rename from src/status_im/contexts/quo_preview/messages/author.cljs rename to src/status_im/contexts/preview/quo/messages/author.cljs index 1575f9593f0..9d6f8e27f31 100644 --- a/src/status_im/contexts/quo_preview/messages/author.cljs +++ b/src/status_im/contexts/preview/quo/messages/author.cljs @@ -1,8 +1,8 @@ -(ns status-im.contexts.quo-preview.messages.author +(ns status-im.contexts.preview.quo.messages.author (:require [quo.core :as quo] [reagent.core :as reagent] - [status-im.contexts.quo-preview.preview :as preview])) + [status-im.contexts.preview.quo.preview :as preview])) (def descriptor [{:key :primary-name :type :text :limit 24} diff --git a/src/status_im/contexts/quo_preview/messages/gap.cljs b/src/status_im/contexts/preview/quo/messages/gap.cljs similarity index 88% rename from src/status_im/contexts/quo_preview/messages/gap.cljs rename to src/status_im/contexts/preview/quo/messages/gap.cljs index a87d4fbf993..dab793029ca 100644 --- a/src/status_im/contexts/quo_preview/messages/gap.cljs +++ b/src/status_im/contexts/preview/quo/messages/gap.cljs @@ -1,8 +1,8 @@ -(ns status-im.contexts.quo-preview.messages.gap +(ns status-im.contexts.preview.quo.messages.gap (:require [quo.core :as quo] [reagent.core :as reagent] - [status-im.contexts.quo-preview.preview :as preview] + [status-im.contexts.preview.quo.preview :as preview] [utils.i18n :as i18n])) (def descriptor diff --git a/src/status_im/contexts/quo_preview/messages/system_message.cljs b/src/status_im/contexts/preview/quo/messages/system_message.cljs similarity index 92% rename from src/status_im/contexts/quo_preview/messages/system_message.cljs rename to src/status_im/contexts/preview/quo/messages/system_message.cljs index 66f38e00636..d05f7f84c7b 100644 --- a/src/status_im/contexts/quo_preview/messages/system_message.cljs +++ b/src/status_im/contexts/preview/quo/messages/system_message.cljs @@ -1,10 +1,10 @@ -(ns status-im.contexts.quo-preview.messages.system-message +(ns status-im.contexts.preview.quo.messages.system-message (:require [quo.core :as quo] [react-native.core :as rn] [reagent.core :as reagent] [status-im.common.resources :as resources] - [status-im.contexts.quo-preview.preview :as preview])) + [status-im.contexts.preview.quo.preview :as preview])) (def descriptor [{:label "Message Content" diff --git a/src/status_im/contexts/quo_preview/navigation/bottom_nav_tab.cljs b/src/status_im/contexts/preview/quo/navigation/bottom_nav_tab.cljs similarity index 94% rename from src/status_im/contexts/quo_preview/navigation/bottom_nav_tab.cljs rename to src/status_im/contexts/preview/quo/navigation/bottom_nav_tab.cljs index ce5743e5681..f2856ba4840 100644 --- a/src/status_im/contexts/quo_preview/navigation/bottom_nav_tab.cljs +++ b/src/status_im/contexts/preview/quo/navigation/bottom_nav_tab.cljs @@ -1,10 +1,10 @@ -(ns status-im.contexts.quo-preview.navigation.bottom-nav-tab +(ns status-im.contexts.preview.quo.navigation.bottom-nav-tab (:require [quo.core :as quo] [quo.foundations.colors :as colors] [react-native.reanimated :as reanimated] [reagent.core :as reagent] - [status-im.contexts.quo-preview.preview :as preview])) + [status-im.contexts.preview.quo.preview :as preview])) (def descriptor [{:key :icon diff --git a/src/status_im/contexts/quo_preview/navigation/floating_shell_button.cljs b/src/status_im/contexts/preview/quo/navigation/floating_shell_button.cljs similarity index 92% rename from src/status_im/contexts/quo_preview/navigation/floating_shell_button.cljs rename to src/status_im/contexts/preview/quo/navigation/floating_shell_button.cljs index d12d6bae99b..552935a474f 100644 --- a/src/status_im/contexts/quo_preview/navigation/floating_shell_button.cljs +++ b/src/status_im/contexts/preview/quo/navigation/floating_shell_button.cljs @@ -1,8 +1,8 @@ -(ns status-im.contexts.quo-preview.navigation.floating-shell-button +(ns status-im.contexts.preview.quo.navigation.floating-shell-button (:require [quo.core :as quo] [reagent.core :as reagent] - [status-im.contexts.quo-preview.preview :as preview] + [status-im.contexts.preview.quo.preview :as preview] [utils.i18n :as i18n])) (def descriptor diff --git a/src/status_im/contexts/quo_preview/navigation/page_nav.cljs b/src/status_im/contexts/preview/quo/navigation/page_nav.cljs similarity index 98% rename from src/status_im/contexts/quo_preview/navigation/page_nav.cljs rename to src/status_im/contexts/preview/quo/navigation/page_nav.cljs index ebe91b857a1..805bed1604e 100644 --- a/src/status_im/contexts/quo_preview/navigation/page_nav.cljs +++ b/src/status_im/contexts/preview/quo/navigation/page_nav.cljs @@ -1,4 +1,4 @@ -(ns status-im.contexts.quo-preview.navigation.page-nav +(ns status-im.contexts.preview.quo.navigation.page-nav (:require [clojure.string :as string] [quo.core :as quo] @@ -7,7 +7,7 @@ [react-native.core :as rn] [reagent.core :as reagent] [status-im.common.resources :as resources] - [status-im.contexts.quo-preview.preview :as preview])) + [status-im.contexts.preview.quo.preview :as preview])) (def ^:private networks [{:source (quo.resources/get-network :ethereum)} diff --git a/src/status_im/contexts/quo_preview/navigation/top_nav.cljs b/src/status_im/contexts/preview/quo/navigation/top_nav.cljs similarity index 95% rename from src/status_im/contexts/quo_preview/navigation/top_nav.cljs rename to src/status_im/contexts/preview/quo/navigation/top_nav.cljs index 5314bf72d9a..ff7f830eb87 100644 --- a/src/status_im/contexts/quo_preview/navigation/top_nav.cljs +++ b/src/status_im/contexts/preview/quo/navigation/top_nav.cljs @@ -1,10 +1,10 @@ -(ns status-im.contexts.quo-preview.navigation.top-nav +(ns status-im.contexts.preview.quo.navigation.top-nav (:require [quo.core :as quo] [quo.foundations.colors :as colors] [reagent.core :as reagent] [status-im.common.resources :as resources] - [status-im.contexts.quo-preview.preview :as preview])) + [status-im.contexts.preview.quo.preview :as preview])) (def descriptor [{:key :notification diff --git a/src/status_im/contexts/quo_preview/notifications/activity_logs.cljs b/src/status_im/contexts/preview/quo/notifications/activity_logs.cljs similarity index 97% rename from src/status_im/contexts/quo_preview/notifications/activity_logs.cljs rename to src/status_im/contexts/preview/quo/notifications/activity_logs.cljs index bb4167b6d01..e4602f3564a 100644 --- a/src/status_im/contexts/quo_preview/notifications/activity_logs.cljs +++ b/src/status_im/contexts/preview/quo/notifications/activity_logs.cljs @@ -1,12 +1,12 @@ -(ns status-im.contexts.quo-preview.notifications.activity-logs +(ns status-im.contexts.preview.quo.notifications.activity-logs (:require [quo.core :as quo] [quo.foundations.colors :as colors] [quo.theme :as quo.theme] [react-native.core :as rn] [reagent.core :as reagent] - [status-im.contexts.quo-preview.preview :as preview] - [status-im.contexts.quo-preview.tags.status-tags :as status-tags])) + [status-im.contexts.preview.quo.preview :as preview] + [status-im.contexts.preview.quo.tags.status-tags :as status-tags])) (def descriptor [{:label "Unread?" diff --git a/src/status_im/contexts/quo_preview/notifications/activity_logs_photos.cljs b/src/status_im/contexts/preview/quo/notifications/activity_logs_photos.cljs similarity index 89% rename from src/status_im/contexts/quo_preview/notifications/activity_logs_photos.cljs rename to src/status_im/contexts/preview/quo/notifications/activity_logs_photos.cljs index 213f1bfd4a0..a11b48165a3 100644 --- a/src/status_im/contexts/quo_preview/notifications/activity_logs_photos.cljs +++ b/src/status_im/contexts/preview/quo/notifications/activity_logs_photos.cljs @@ -1,10 +1,10 @@ -(ns status-im.contexts.quo-preview.notifications.activity-logs-photos +(ns status-im.contexts.preview.quo.notifications.activity-logs-photos (:require [quo.core :as quo] [react-native.core :as rn] [reagent.core :as reagent] [status-im.common.resources :as resources] - [status-im.contexts.quo-preview.preview :as preview])) + [status-im.contexts.preview.quo.preview :as preview])) (def descriptor [{:label "Photos Count:" diff --git a/src/status_im/contexts/quo_preview/notifications/notification.cljs b/src/status_im/contexts/preview/quo/notifications/notification.cljs similarity index 94% rename from src/status_im/contexts/quo_preview/notifications/notification.cljs rename to src/status_im/contexts/preview/quo/notifications/notification.cljs index 5d1a80477da..02844a43dd0 100644 --- a/src/status_im/contexts/quo_preview/notifications/notification.cljs +++ b/src/status_im/contexts/preview/quo/notifications/notification.cljs @@ -1,9 +1,9 @@ -(ns status-im.contexts.quo-preview.notifications.notification +(ns status-im.contexts.preview.quo.notifications.notification (:require [quo.core :as quo] [react-native.core :as rn] - [status-im.contexts.quo-preview.code.snippet :as snippet-preview] - [status-im.contexts.quo-preview.preview :as preview] + [status-im.contexts.preview.quo.code.snippet :as snippet-preview] + [status-im.contexts.preview.quo.preview :as preview] [utils.re-frame :as rf])) (defn notification-button diff --git a/src/status_im/contexts/quo_preview/notifications/toast.cljs b/src/status_im/contexts/preview/quo/notifications/toast.cljs similarity index 96% rename from src/status_im/contexts/quo_preview/notifications/toast.cljs rename to src/status_im/contexts/preview/quo/notifications/toast.cljs index 4c80ad35b87..02587fd742c 100644 --- a/src/status_im/contexts/quo_preview/notifications/toast.cljs +++ b/src/status_im/contexts/preview/quo/notifications/toast.cljs @@ -1,10 +1,10 @@ -(ns status-im.contexts.quo-preview.notifications.toast +(ns status-im.contexts.preview.quo.notifications.toast (:require [quo.core :as quo] [react-native.core :as rn] [reagent.core :as reagent] [status-im.common.resources :as resources] - [status-im.contexts.quo-preview.preview :as preview] + [status-im.contexts.preview.quo.preview :as preview] [utils.re-frame :as rf])) (defn toast-button diff --git a/src/status_im/contexts/quo_preview/numbered_keyboard/keyboard_key.cljs b/src/status_im/contexts/preview/quo/numbered_keyboard/keyboard_key.cljs similarity index 88% rename from src/status_im/contexts/quo_preview/numbered_keyboard/keyboard_key.cljs rename to src/status_im/contexts/preview/quo/numbered_keyboard/keyboard_key.cljs index 2160f4cb1ca..9b865acdc9a 100644 --- a/src/status_im/contexts/quo_preview/numbered_keyboard/keyboard_key.cljs +++ b/src/status_im/contexts/preview/quo/numbered_keyboard/keyboard_key.cljs @@ -1,8 +1,8 @@ -(ns status-im.contexts.quo-preview.numbered-keyboard.keyboard-key +(ns status-im.contexts.preview.quo.numbered-keyboard.keyboard-key (:require [quo.core :as quo] [reagent.core :as reagent] - [status-im.contexts.quo-preview.preview :as preview])) + [status-im.contexts.preview.quo.preview :as preview])) (def descriptor [{:key :blur? :type :boolean} diff --git a/src/status_im/contexts/quo_preview/numbered_keyboard/numbered_keyboard.cljs b/src/status_im/contexts/preview/quo/numbered_keyboard/numbered_keyboard.cljs similarity index 88% rename from src/status_im/contexts/quo_preview/numbered_keyboard/numbered_keyboard.cljs rename to src/status_im/contexts/preview/quo/numbered_keyboard/numbered_keyboard.cljs index 292c9ed3eae..d8d471ad823 100644 --- a/src/status_im/contexts/quo_preview/numbered_keyboard/numbered_keyboard.cljs +++ b/src/status_im/contexts/preview/quo/numbered_keyboard/numbered_keyboard.cljs @@ -1,8 +1,8 @@ -(ns status-im.contexts.quo-preview.numbered-keyboard.numbered-keyboard +(ns status-im.contexts.preview.quo.numbered-keyboard.numbered-keyboard (:require [quo.core :as quo] [reagent.core :as reagent] - [status-im.contexts.quo-preview.preview :as preview])) + [status-im.contexts.preview.quo.preview :as preview])) (def descriptor [{:key :blur? :type :boolean} diff --git a/src/status_im/contexts/quo_preview/onboarding/small_option_card.cljs b/src/status_im/contexts/preview/quo/onboarding/small_option_card.cljs similarity index 91% rename from src/status_im/contexts/quo_preview/onboarding/small_option_card.cljs rename to src/status_im/contexts/preview/quo/onboarding/small_option_card.cljs index f5c059e2b00..60daa42028f 100644 --- a/src/status_im/contexts/quo_preview/onboarding/small_option_card.cljs +++ b/src/status_im/contexts/preview/quo/onboarding/small_option_card.cljs @@ -1,10 +1,10 @@ -(ns status-im.contexts.quo-preview.onboarding.small-option-card +(ns status-im.contexts.preview.quo.onboarding.small-option-card (:require [quo.core :as quo] [quo.foundations.colors :as colors] [reagent.core :as reagent] [status-im.common.resources :as resources] - [status-im.contexts.quo-preview.preview :as preview])) + [status-im.contexts.preview.quo.preview :as preview])) (def descriptor [{:key :variant diff --git a/src/status_im/contexts/quo_preview/password/tips.cljs b/src/status_im/contexts/preview/quo/password/tips.cljs similarity index 87% rename from src/status_im/contexts/quo_preview/password/tips.cljs rename to src/status_im/contexts/preview/quo/password/tips.cljs index d0cd789955a..e08ccca7673 100644 --- a/src/status_im/contexts/quo_preview/password/tips.cljs +++ b/src/status_im/contexts/preview/quo/password/tips.cljs @@ -1,9 +1,9 @@ -(ns status-im.contexts.quo-preview.password.tips +(ns status-im.contexts.preview.quo.password.tips (:require [quo.core :as quo] [quo.foundations.colors :as colors] [reagent.core :as reagent] - [status-im.contexts.quo-preview.preview :as preview])) + [status-im.contexts.preview.quo.preview :as preview])) (def descriptor [{:key :text :type :text} diff --git a/src/status_im/contexts/quo_preview/preview.clj b/src/status_im/contexts/preview/quo/preview.clj similarity index 83% rename from src/status_im/contexts/quo_preview/preview.clj rename to src/status_im/contexts/preview/quo/preview.clj index e684360dc82..a8d9d7f46d5 100644 --- a/src/status_im/contexts/quo_preview/preview.clj +++ b/src/status_im/contexts/preview/quo/preview.clj @@ -1,4 +1,4 @@ -(ns status-im.contexts.quo-preview.preview) +(ns status-im.contexts.preview.quo.preview) (defmacro list-comp [[the-binding seq-expr & bindings] body-expr] diff --git a/src/status_im/contexts/quo_preview/preview.cljs b/src/status_im/contexts/preview/quo/preview.cljs similarity index 98% rename from src/status_im/contexts/quo_preview/preview.cljs rename to src/status_im/contexts/preview/quo/preview.cljs index 24d827900a6..dafaaa25714 100644 --- a/src/status_im/contexts/quo_preview/preview.cljs +++ b/src/status_im/contexts/preview/quo/preview.cljs @@ -1,4 +1,4 @@ -(ns status-im.contexts.quo-preview.preview +(ns status-im.contexts.preview.quo.preview (:require [camel-snake-kebab.core :as camel-snake-kebab] [clojure.string :as string] @@ -11,10 +11,10 @@ [react-native.safe-area :as safe-area] [reagent.core :as reagent] [status-im.common.resources :as resources] - [status-im.contexts.quo-preview.common :as common] - [status-im.contexts.quo-preview.style :as style] + [status-im.contexts.preview.quo.common :as common] + [status-im.contexts.preview.quo.style :as style] utils.number) - (:require-macros status-im.contexts.quo-preview.preview)) + (:require-macros status-im.contexts.preview.quo.preview)) (defn- label-view [_ label] diff --git a/src/status_im/contexts/quo_preview/profile/collectible.cljs b/src/status_im/contexts/preview/quo/profile/collectible.cljs similarity index 88% rename from src/status_im/contexts/quo_preview/profile/collectible.cljs rename to src/status_im/contexts/preview/quo/profile/collectible.cljs index 530352784f5..e894b690940 100644 --- a/src/status_im/contexts/quo_preview/profile/collectible.cljs +++ b/src/status_im/contexts/preview/quo/profile/collectible.cljs @@ -1,9 +1,9 @@ -(ns status-im.contexts.quo-preview.profile.collectible +(ns status-im.contexts.preview.quo.profile.collectible (:require [quo.core :as quo] [reagent.core :as reagent] [status-im.common.resources :as resources] - [status-im.contexts.quo-preview.preview :as preview])) + [status-im.contexts.preview.quo.preview :as preview])) (defonce test-image (resources/get-mock-image :collectible)) (def test-images (repeat 10 test-image)) diff --git a/src/status_im/contexts/quo_preview/profile/link_card.cljs b/src/status_im/contexts/preview/quo/profile/link_card.cljs similarity index 97% rename from src/status_im/contexts/quo_preview/profile/link_card.cljs rename to src/status_im/contexts/preview/quo/profile/link_card.cljs index 7e8278e2aa2..3e9a354a51f 100644 --- a/src/status_im/contexts/quo_preview/profile/link_card.cljs +++ b/src/status_im/contexts/preview/quo/profile/link_card.cljs @@ -1,7 +1,7 @@ -(ns status-im.contexts.quo-preview.profile.link-card +(ns status-im.contexts.preview.quo.profile.link-card (:require [quo.core :as quo] [reagent.core :as reagent] - [status-im.contexts.quo-preview.preview :as preview])) + [status-im.contexts.preview.quo.preview :as preview])) (defn- initial-state [social] diff --git a/src/status_im/contexts/quo_preview/profile/profile_card.cljs b/src/status_im/contexts/preview/quo/profile/profile_card.cljs similarity index 93% rename from src/status_im/contexts/quo_preview/profile/profile_card.cljs rename to src/status_im/contexts/preview/quo/profile/profile_card.cljs index 664b5e6f0a6..593cb22041b 100644 --- a/src/status_im/contexts/quo_preview/profile/profile_card.cljs +++ b/src/status_im/contexts/preview/quo/profile/profile_card.cljs @@ -1,9 +1,9 @@ -(ns status-im.contexts.quo-preview.profile.profile-card +(ns status-im.contexts.preview.quo.profile.profile-card (:require [quo.core :as quo] [reagent.core :as reagent] [status-im.common.resources :as resources] - [status-im.contexts.quo-preview.preview :as preview])) + [status-im.contexts.preview.quo.preview :as preview])) (def descriptor [{:key :keycard-account? :type :boolean} diff --git a/src/status_im/contexts/quo_preview/profile/select_profile.cljs b/src/status_im/contexts/preview/quo/profile/select_profile.cljs similarity index 88% rename from src/status_im/contexts/quo_preview/profile/select_profile.cljs rename to src/status_im/contexts/preview/quo/profile/select_profile.cljs index 96db065dc23..79f10faeab0 100644 --- a/src/status_im/contexts/quo_preview/profile/select_profile.cljs +++ b/src/status_im/contexts/preview/quo/profile/select_profile.cljs @@ -1,9 +1,9 @@ -(ns status-im.contexts.quo-preview.profile.select-profile +(ns status-im.contexts.preview.quo.profile.select-profile (:require [quo.core :as quo] [reagent.core :as reagent] [status-im.common.resources :as resources] - [status-im.contexts.quo-preview.preview :as preview])) + [status-im.contexts.preview.quo.preview :as preview])) (def descriptor [(preview/customization-color-option) diff --git a/src/status_im/contexts/quo_preview/profile/showcase_nav.cljs b/src/status_im/contexts/preview/quo/profile/showcase_nav.cljs similarity index 91% rename from src/status_im/contexts/quo_preview/profile/showcase_nav.cljs rename to src/status_im/contexts/preview/quo/profile/showcase_nav.cljs index c50d7517e3b..5cd9019f888 100644 --- a/src/status_im/contexts/quo_preview/profile/showcase_nav.cljs +++ b/src/status_im/contexts/preview/quo/profile/showcase_nav.cljs @@ -1,8 +1,8 @@ -(ns status-im.contexts.quo-preview.profile.showcase-nav +(ns status-im.contexts.preview.quo.profile.showcase-nav (:require [quo.core :as quo] [reagent.core :as reagent] - [status-im.contexts.quo-preview.preview :as preview])) + [status-im.contexts.preview.quo.preview :as preview])) (def generate-nav-data (->> (range 15) diff --git a/src/status_im/contexts/quo_preview/record_audio/record_audio.cljs b/src/status_im/contexts/preview/quo/record_audio/record_audio.cljs similarity index 96% rename from src/status_im/contexts/quo_preview/record_audio/record_audio.cljs rename to src/status_im/contexts/preview/quo/record_audio/record_audio.cljs index ec50846bd3e..4a3b8ed7ce8 100644 --- a/src/status_im/contexts/quo_preview/record_audio/record_audio.cljs +++ b/src/status_im/contexts/preview/quo/record_audio/record_audio.cljs @@ -1,4 +1,4 @@ -(ns status-im.contexts.quo-preview.record-audio.record-audio +(ns status-im.contexts.preview.quo.record-audio.record-audio (:require [quo.core :as quo] [react-native.core :as rn] @@ -6,7 +6,7 @@ [reagent.core :as reagent] [status-im.common.alert.effects :as alert.effects] [status-im.constants :as constants] - [status-im.contexts.quo-preview.preview :as preview] + [status-im.contexts.preview.quo.preview :as preview] [utils.i18n :as i18n] [utils.re-frame :as rf])) diff --git a/src/status_im/contexts/quo_preview/selectors/disclaimer.cljs b/src/status_im/contexts/preview/quo/selectors/disclaimer.cljs similarity index 89% rename from src/status_im/contexts/quo_preview/selectors/disclaimer.cljs rename to src/status_im/contexts/preview/quo/selectors/disclaimer.cljs index 941cfdf0d8f..354197f618e 100644 --- a/src/status_im/contexts/quo_preview/selectors/disclaimer.cljs +++ b/src/status_im/contexts/preview/quo/selectors/disclaimer.cljs @@ -1,9 +1,9 @@ -(ns status-im.contexts.quo-preview.selectors.disclaimer +(ns status-im.contexts.preview.quo.selectors.disclaimer (:require [quo.core :as quo] [react-native.core :as rn] [reagent.core :as reagent] - [status-im.contexts.quo-preview.preview :as preview])) + [status-im.contexts.preview.quo.preview :as preview])) (def descriptor [{:key :checked? :type :boolean} diff --git a/src/status_im/contexts/quo_preview/selectors/filter.cljs b/src/status_im/contexts/preview/quo/selectors/filter.cljs similarity index 81% rename from src/status_im/contexts/quo_preview/selectors/filter.cljs rename to src/status_im/contexts/preview/quo/selectors/filter.cljs index c8ab26cdd00..f49dadae3ed 100644 --- a/src/status_im/contexts/quo_preview/selectors/filter.cljs +++ b/src/status_im/contexts/preview/quo/selectors/filter.cljs @@ -1,8 +1,8 @@ -(ns status-im.contexts.quo-preview.selectors.filter +(ns status-im.contexts.preview.quo.selectors.filter (:require [quo.core :as quo] [reagent.core :as reagent] - [status-im.contexts.quo-preview.preview :as preview])) + [status-im.contexts.preview.quo.preview :as preview])) (def descriptor [{:key :blur? :type :boolean}]) diff --git a/src/status_im/contexts/quo_preview/selectors/react.cljs b/src/status_im/contexts/preview/quo/selectors/react.cljs similarity index 96% rename from src/status_im/contexts/quo_preview/selectors/react.cljs rename to src/status_im/contexts/preview/quo/selectors/react.cljs index 335fb511e80..67fd3063b4d 100644 --- a/src/status_im/contexts/quo_preview/selectors/react.cljs +++ b/src/status_im/contexts/preview/quo/selectors/react.cljs @@ -1,4 +1,4 @@ -(ns status-im.contexts.quo-preview.selectors.react +(ns status-im.contexts.preview.quo.selectors.react (:require [clojure.string :as string] [quo.core :as quo] @@ -6,7 +6,7 @@ [react-native.core :as rn] [reagent.core :as reagent] [status-im.constants :as constants] - [status-im.contexts.quo-preview.preview :as preview])) + [status-im.contexts.preview.quo.preview :as preview])) (defn- gen-quantity [max-count _] diff --git a/src/status_im/contexts/quo_preview/selectors/react_selector.cljs b/src/status_im/contexts/preview/quo/selectors/react_selector.cljs similarity index 93% rename from src/status_im/contexts/quo_preview/selectors/react_selector.cljs rename to src/status_im/contexts/preview/quo/selectors/react_selector.cljs index 7ffd90c1122..5d4941eee0f 100644 --- a/src/status_im/contexts/quo_preview/selectors/react_selector.cljs +++ b/src/status_im/contexts/preview/quo/selectors/react_selector.cljs @@ -1,4 +1,4 @@ -(ns status-im.contexts.quo-preview.selectors.react-selector +(ns status-im.contexts.preview.quo.selectors.react-selector (:require [clojure.string :as string] [quo.core :as quo] @@ -6,7 +6,7 @@ [react-native.core :as rn] [reagent.core :as reagent] [status-im.constants :as constants] - [status-im.contexts.quo-preview.preview :as preview])) + [status-im.contexts.preview.quo.preview :as preview])) (def descriptor [{:key :clicks diff --git a/src/status_im/contexts/quo_preview/selectors/reactions_selector.cljs b/src/status_im/contexts/preview/quo/selectors/reactions_selector.cljs similarity index 84% rename from src/status_im/contexts/quo_preview/selectors/reactions_selector.cljs rename to src/status_im/contexts/preview/quo/selectors/reactions_selector.cljs index 8ebd4a2580a..b96063fd7e0 100644 --- a/src/status_im/contexts/quo_preview/selectors/reactions_selector.cljs +++ b/src/status_im/contexts/preview/quo/selectors/reactions_selector.cljs @@ -1,11 +1,11 @@ -(ns status-im.contexts.quo-preview.selectors.reactions-selector +(ns status-im.contexts.preview.quo.selectors.reactions-selector (:require [clojure.string :as string] [quo.core :as quo] [react-native.core :as rn] [reagent.core :as r] [status-im.constants :as constants] - [status-im.contexts.quo-preview.preview :as preview])) + [status-im.contexts.preview.quo.preview :as preview])) (def descriptor [{:key :emoji diff --git a/src/status_im/contexts/quo_preview/selectors/selectors.cljs b/src/status_im/contexts/preview/quo/selectors/selectors.cljs similarity index 91% rename from src/status_im/contexts/quo_preview/selectors/selectors.cljs rename to src/status_im/contexts/preview/quo/selectors/selectors.cljs index f9667b0f055..31adf7f8ea5 100644 --- a/src/status_im/contexts/quo_preview/selectors/selectors.cljs +++ b/src/status_im/contexts/preview/quo/selectors/selectors.cljs @@ -1,9 +1,9 @@ -(ns status-im.contexts.quo-preview.selectors.selectors +(ns status-im.contexts.preview.quo.selectors.selectors (:require [quo.core :as quo] [react-native.core :as rn] [reagent.core :as reagent] - [status-im.contexts.quo-preview.preview :as preview])) + [status-im.contexts.preview.quo.preview :as preview])) (def descriptor [{:key :disabled? :type :boolean} diff --git a/src/status_im/contexts/quo_preview/settings/accounts.cljs b/src/status_im/contexts/preview/quo/settings/accounts.cljs similarity index 88% rename from src/status_im/contexts/quo_preview/settings/accounts.cljs rename to src/status_im/contexts/preview/quo/settings/accounts.cljs index 5e5f3fc4975..3a11e61c6c6 100644 --- a/src/status_im/contexts/quo_preview/settings/accounts.cljs +++ b/src/status_im/contexts/preview/quo/settings/accounts.cljs @@ -1,8 +1,8 @@ -(ns status-im.contexts.quo-preview.settings.accounts +(ns status-im.contexts.preview.quo.settings.accounts (:require [quo.core :as quo] [reagent.core :as reagent] - [status-im.contexts.quo-preview.preview :as preview])) + [status-im.contexts.preview.quo.preview :as preview])) (def descriptor [(preview/customization-color-option) diff --git a/src/status_im/contexts/quo_preview/settings/category.cljs b/src/status_im/contexts/preview/quo/settings/category.cljs similarity index 92% rename from src/status_im/contexts/quo_preview/settings/category.cljs rename to src/status_im/contexts/preview/quo/settings/category.cljs index 8605ec5570b..51986ddf9e3 100644 --- a/src/status_im/contexts/quo_preview/settings/category.cljs +++ b/src/status_im/contexts/preview/quo/settings/category.cljs @@ -1,9 +1,9 @@ -(ns status-im.contexts.quo-preview.settings.category +(ns status-im.contexts.preview.quo.settings.category (:require [quo.core :as quo] [reagent.core :as reagent] [status-im.common.resources :as resources] - [status-im.contexts.quo-preview.preview :as preview])) + [status-im.contexts.preview.quo.preview :as preview])) (defn create-item-array [n] diff --git a/src/status_im/contexts/quo_preview/settings/data_item.cljs b/src/status_im/contexts/preview/quo/settings/data_item.cljs similarity index 95% rename from src/status_im/contexts/quo_preview/settings/data_item.cljs rename to src/status_im/contexts/preview/quo/settings/data_item.cljs index 16d4767a6d9..643aa67315e 100644 --- a/src/status_im/contexts/quo_preview/settings/data_item.cljs +++ b/src/status_im/contexts/preview/quo/settings/data_item.cljs @@ -1,10 +1,10 @@ -(ns status-im.contexts.quo-preview.settings.data-item +(ns status-im.contexts.preview.quo.settings.data-item (:require [quo.core :as quo] [quo.foundations.resources :as quo.resources] [reagent.core :as reagent] [status-im.common.resources :as resources] - [status-im.contexts.quo-preview.preview :as preview])) + [status-im.contexts.preview.quo.preview :as preview])) (def descriptor [{:key :blur? :type :boolean} diff --git a/src/status_im/contexts/quo_preview/settings/privacy_option.cljs b/src/status_im/contexts/preview/quo/settings/privacy_option.cljs similarity index 96% rename from src/status_im/contexts/quo_preview/settings/privacy_option.cljs rename to src/status_im/contexts/preview/quo/settings/privacy_option.cljs index 7c9ae158fc3..ec14be0121e 100644 --- a/src/status_im/contexts/quo_preview/settings/privacy_option.cljs +++ b/src/status_im/contexts/preview/quo/settings/privacy_option.cljs @@ -1,9 +1,9 @@ -(ns status-im.contexts.quo-preview.settings.privacy-option +(ns status-im.contexts.preview.quo.settings.privacy-option (:require [quo.core :as quo] [react-native.core :as rn] [reagent.core :as reagent] - [status-im.contexts.quo-preview.preview :as preview])) + [status-im.contexts.preview.quo.preview :as preview])) (def descriptor [{:key :header :type :text} diff --git a/src/status_im/contexts/quo_preview/settings/reorder_item.cljs b/src/status_im/contexts/preview/quo/settings/reorder_item.cljs similarity index 95% rename from src/status_im/contexts/quo_preview/settings/reorder_item.cljs rename to src/status_im/contexts/preview/quo/settings/reorder_item.cljs index 1e674f79d33..541e3cfd032 100644 --- a/src/status_im/contexts/quo_preview/settings/reorder_item.cljs +++ b/src/status_im/contexts/preview/quo/settings/reorder_item.cljs @@ -1,9 +1,9 @@ -(ns status-im.contexts.quo-preview.settings.reorder-item +(ns status-im.contexts.preview.quo.settings.reorder-item (:require [quo.components.settings.reorder-item.types :as types] [quo.core :as quo] [status-im.common.resources :as resources] - [status-im.contexts.quo-preview.preview :as preview])) + [status-im.contexts.preview.quo.preview :as preview])) (def mock-data [{:id 1 diff --git a/src/status_im/contexts/quo_preview/settings/section_label.cljs b/src/status_im/contexts/preview/quo/settings/section_label.cljs similarity index 89% rename from src/status_im/contexts/quo_preview/settings/section_label.cljs rename to src/status_im/contexts/preview/quo/settings/section_label.cljs index d7b201b1852..2195e1841d2 100644 --- a/src/status_im/contexts/quo_preview/settings/section_label.cljs +++ b/src/status_im/contexts/preview/quo/settings/section_label.cljs @@ -1,8 +1,8 @@ -(ns status-im.contexts.quo-preview.settings.section-label +(ns status-im.contexts.preview.quo.settings.section-label (:require [quo.core :as quo] [reagent.core :as reagent] - [status-im.contexts.quo-preview.preview :as preview])) + [status-im.contexts.preview.quo.preview :as preview])) (def ^:private descriptor [{:key :section diff --git a/src/status_im/contexts/quo_preview/settings/settings_item.cljs b/src/status_im/contexts/preview/quo/settings/settings_item.cljs similarity index 97% rename from src/status_im/contexts/quo_preview/settings/settings_item.cljs rename to src/status_im/contexts/preview/quo/settings/settings_item.cljs index 409a2661382..7bf067c88ba 100644 --- a/src/status_im/contexts/quo_preview/settings/settings_item.cljs +++ b/src/status_im/contexts/preview/quo/settings/settings_item.cljs @@ -1,9 +1,9 @@ -(ns status-im.contexts.quo-preview.settings.settings-item +(ns status-im.contexts.preview.quo.settings.settings-item (:require [quo.core :as quo] [reagent.core :as reagent] [status-im.common.resources :as resources] - [status-im.contexts.quo-preview.preview :as preview])) + [status-im.contexts.preview.quo.preview :as preview])) (def descriptor [{:key :title diff --git a/src/status_im/contexts/quo_preview/share/qr_code.cljs b/src/status_im/contexts/preview/quo/share/qr_code.cljs similarity index 97% rename from src/status_im/contexts/quo_preview/share/qr_code.cljs rename to src/status_im/contexts/preview/quo/share/qr_code.cljs index bb4e3f9c4f6..9ce6286b474 100644 --- a/src/status_im/contexts/quo_preview/share/qr_code.cljs +++ b/src/status_im/contexts/preview/quo/share/qr_code.cljs @@ -1,11 +1,11 @@ -(ns status-im.contexts.quo-preview.share.qr-code +(ns status-im.contexts.preview.quo.share.qr-code (:require [quo.core :as quo] [quo.foundations.colors :as colors] [react-native.core :as rn] [reagent.core :as reagent] [status-im.common.resources :as resources] - [status-im.contexts.quo-preview.preview :as preview] + [status-im.contexts.preview.quo.preview :as preview] [utils.image-server :as image-server] [utils.re-frame :as rf])) diff --git a/src/status_im/contexts/quo_preview/share/share_qr_code.cljs b/src/status_im/contexts/preview/quo/share/share_qr_code.cljs similarity index 98% rename from src/status_im/contexts/quo_preview/share/share_qr_code.cljs rename to src/status_im/contexts/preview/quo/share/share_qr_code.cljs index d85022b9fc9..67ee718cd42 100644 --- a/src/status_im/contexts/quo_preview/share/share_qr_code.cljs +++ b/src/status_im/contexts/preview/quo/share/share_qr_code.cljs @@ -1,10 +1,10 @@ -(ns status-im.contexts.quo-preview.share.share-qr-code +(ns status-im.contexts.preview.quo.share.share-qr-code (:require [quo.core :as quo] [react-native.core :as rn] [reagent.core :as reagent] [status-im.common.resources :as resources] - [status-im.contexts.quo-preview.preview :as preview] + [status-im.contexts.preview.quo.preview :as preview] [utils.image-server :as image-server] [utils.re-frame :as rf])) diff --git a/src/status_im/contexts/quo_preview/style.cljs b/src/status_im/contexts/preview/quo/style.cljs similarity index 99% rename from src/status_im/contexts/quo_preview/style.cljs rename to src/status_im/contexts/preview/quo/style.cljs index 98711df4c31..98288818cdf 100644 --- a/src/status_im/contexts/quo_preview/style.cljs +++ b/src/status_im/contexts/preview/quo/style.cljs @@ -1,4 +1,4 @@ -(ns status-im.contexts.quo-preview.style +(ns status-im.contexts.preview.quo.style (:require [quo.foundations.colors :as colors] [quo.foundations.typography :as typography])) diff --git a/src/status_im/contexts/quo_preview/switcher/group_messaging_card.cljs b/src/status_im/contexts/preview/quo/switcher/group_messaging_card.cljs similarity index 96% rename from src/status_im/contexts/quo_preview/switcher/group_messaging_card.cljs rename to src/status_im/contexts/preview/quo/switcher/group_messaging_card.cljs index 4a14c784259..9b00314fb20 100644 --- a/src/status_im/contexts/quo_preview/switcher/group_messaging_card.cljs +++ b/src/status_im/contexts/preview/quo/switcher/group_messaging_card.cljs @@ -1,9 +1,9 @@ -(ns status-im.contexts.quo-preview.switcher.group-messaging-card +(ns status-im.contexts.preview.quo.switcher.group-messaging-card (:require [quo.core :as quo] [reagent.core :as reagent] [status-im.common.resources :as resources] - [status-im.contexts.quo-preview.preview :as preview])) + [status-im.contexts.preview.quo.preview :as preview])) (def descriptor [{:key :title :type :text} diff --git a/src/status_im/contexts/quo_preview/switcher/switcher_cards.cljs b/src/status_im/contexts/preview/quo/switcher/switcher_cards.cljs similarity index 97% rename from src/status_im/contexts/quo_preview/switcher/switcher_cards.cljs rename to src/status_im/contexts/preview/quo/switcher/switcher_cards.cljs index 6e75ef9f276..40e345a29a4 100644 --- a/src/status_im/contexts/quo_preview/switcher/switcher_cards.cljs +++ b/src/status_im/contexts/preview/quo/switcher/switcher_cards.cljs @@ -1,10 +1,10 @@ -(ns status-im.contexts.quo-preview.switcher.switcher-cards +(ns status-im.contexts.preview.quo.switcher.switcher-cards (:require [quo.foundations.colors :as colors] [reagent.core :as reagent] [status-im.common.resources :as resources] [status-im.constants :as constants] - [status-im.contexts.quo-preview.preview :as preview] + [status-im.contexts.preview.quo.preview :as preview] [status-im.contexts.shell.jump-to.components.switcher-cards.view :as switcher-cards] [status-im.contexts.shell.jump-to.constants :as shell.constants])) diff --git a/src/status_im/contexts/quo_preview/tabs/account_selector.cljs b/src/status_im/contexts/preview/quo/tabs/account_selector.cljs similarity index 93% rename from src/status_im/contexts/quo_preview/tabs/account_selector.cljs rename to src/status_im/contexts/preview/quo/tabs/account_selector.cljs index 1b9c7b0a48d..b1efa83ef87 100644 --- a/src/status_im/contexts/quo_preview/tabs/account_selector.cljs +++ b/src/status_im/contexts/preview/quo/tabs/account_selector.cljs @@ -1,8 +1,8 @@ -(ns status-im.contexts.quo-preview.tabs.account-selector +(ns status-im.contexts.preview.quo.tabs.account-selector (:require [quo.core :as quo] [reagent.core :as reagent] - [status-im.contexts.quo-preview.preview :as preview])) + [status-im.contexts.preview.quo.preview :as preview])) (def descriptor [{:key :show-label? :type :boolean} diff --git a/src/status_im/contexts/quo_preview/tabs/segmented_tab.cljs b/src/status_im/contexts/preview/quo/tabs/segmented_tab.cljs similarity index 92% rename from src/status_im/contexts/quo_preview/tabs/segmented_tab.cljs rename to src/status_im/contexts/preview/quo/tabs/segmented_tab.cljs index 659895e28d6..441a76b0a76 100644 --- a/src/status_im/contexts/quo_preview/tabs/segmented_tab.cljs +++ b/src/status_im/contexts/preview/quo/tabs/segmented_tab.cljs @@ -1,9 +1,9 @@ -(ns status-im.contexts.quo-preview.tabs.segmented-tab +(ns status-im.contexts.preview.quo.tabs.segmented-tab (:require [quo.core :as quo] [react-native.core :as rn] [reagent.core :as reagent] - [status-im.contexts.quo-preview.preview :as preview])) + [status-im.contexts.preview.quo.preview :as preview])) (def descriptor [{:key :size diff --git a/src/status_im/contexts/quo_preview/tabs/tabs.cljs b/src/status_im/contexts/preview/quo/tabs/tabs.cljs similarity index 93% rename from src/status_im/contexts/quo_preview/tabs/tabs.cljs rename to src/status_im/contexts/preview/quo/tabs/tabs.cljs index b397eb44bd1..ff90e5f8c37 100644 --- a/src/status_im/contexts/quo_preview/tabs/tabs.cljs +++ b/src/status_im/contexts/preview/quo/tabs/tabs.cljs @@ -1,8 +1,8 @@ -(ns status-im.contexts.quo-preview.tabs.tabs +(ns status-im.contexts.preview.quo.tabs.tabs (:require [quo.core :as quo] [reagent.core :as reagent] - [status-im.contexts.quo-preview.preview :as preview])) + [status-im.contexts.preview.quo.preview :as preview])) (def descriptor [{:key :size diff --git a/src/status_im/contexts/quo_preview/tags/context_tags.cljs b/src/status_im/contexts/preview/quo/tags/context_tags.cljs similarity index 98% rename from src/status_im/contexts/quo_preview/tags/context_tags.cljs rename to src/status_im/contexts/preview/quo/tags/context_tags.cljs index b7aa81a2170..6fa61b994a7 100644 --- a/src/status_im/contexts/quo_preview/tags/context_tags.cljs +++ b/src/status_im/contexts/preview/quo/tags/context_tags.cljs @@ -1,11 +1,11 @@ -(ns status-im.contexts.quo-preview.tags.context-tags +(ns status-im.contexts.preview.quo.tags.context-tags (:require [quo.core :as quo] [quo.foundations.colors :as colors] [react-native.core :as rn] [reagent.core :as reagent] [status-im.common.resources :as resources] - [status-im.contexts.quo-preview.preview :as preview])) + [status-im.contexts.preview.quo.preview :as preview])) (def example-pk "0x04fcf40c526b09ff9fb22f4a5dbd08490ef9b64af700870f8a0ba2133f4251d5607ed83cd9047b8c2796576bc83fa0de23a13a4dced07654b8ff137fe744047917") diff --git a/src/status_im/contexts/quo_preview/tags/network_tags.cljs b/src/status_im/contexts/preview/quo/tags/network_tags.cljs similarity index 92% rename from src/status_im/contexts/quo_preview/tags/network_tags.cljs rename to src/status_im/contexts/preview/quo/tags/network_tags.cljs index a09090c9b61..289b99c0636 100644 --- a/src/status_im/contexts/quo_preview/tags/network_tags.cljs +++ b/src/status_im/contexts/preview/quo/tags/network_tags.cljs @@ -1,10 +1,10 @@ -(ns status-im.contexts.quo-preview.tags.network-tags +(ns status-im.contexts.preview.quo.tags.network-tags (:require [quo.core :as quo] [quo.foundations.resources :as resources] [react-native.core :as rn] [reagent.core :as reagent] - [status-im.contexts.quo-preview.preview :as preview])) + [status-im.contexts.preview.quo.preview :as preview])) (def community-networks [[{:source (resources/get-network :ethereum)}] diff --git a/src/status_im/contexts/quo_preview/tags/number_tag.cljs b/src/status_im/contexts/preview/quo/tags/number_tag.cljs similarity index 90% rename from src/status_im/contexts/quo_preview/tags/number_tag.cljs rename to src/status_im/contexts/preview/quo/tags/number_tag.cljs index c60677b59f7..0517c8a8f7b 100644 --- a/src/status_im/contexts/quo_preview/tags/number_tag.cljs +++ b/src/status_im/contexts/preview/quo/tags/number_tag.cljs @@ -1,8 +1,8 @@ -(ns status-im.contexts.quo-preview.tags.number-tag +(ns status-im.contexts.preview.quo.tags.number-tag (:require [quo.core :as quo] [reagent.core :as reagent] - [status-im.contexts.quo-preview.preview :as preview])) + [status-im.contexts.preview.quo.preview :as preview])) (def descriptor [{:key :type diff --git a/src/status_im/contexts/quo_preview/tags/permission_tag.cljs b/src/status_im/contexts/preview/quo/tags/permission_tag.cljs similarity index 99% rename from src/status_im/contexts/quo_preview/tags/permission_tag.cljs rename to src/status_im/contexts/preview/quo/tags/permission_tag.cljs index daa214f5765..5be5a2c1d89 100644 --- a/src/status_im/contexts/quo_preview/tags/permission_tag.cljs +++ b/src/status_im/contexts/preview/quo/tags/permission_tag.cljs @@ -1,11 +1,11 @@ -(ns status-im.contexts.quo-preview.tags.permission-tag +(ns status-im.contexts.preview.quo.tags.permission-tag (:require [quo.core :as quo] [quo.foundations.colors :as colors] [react-native.core :as rn] [reagent.core :as reagent] [status-im.common.resources :as resources] - [status-im.contexts.quo-preview.preview :as preview])) + [status-im.contexts.preview.quo.preview :as preview])) (def descriptor [{:key :size diff --git a/src/status_im/contexts/quo_preview/tags/status_tags.cljs b/src/status_im/contexts/preview/quo/tags/status_tags.cljs similarity index 94% rename from src/status_im/contexts/quo_preview/tags/status_tags.cljs rename to src/status_im/contexts/preview/quo/tags/status_tags.cljs index 73ae38030e4..ed81c5c8dcc 100644 --- a/src/status_im/contexts/quo_preview/tags/status_tags.cljs +++ b/src/status_im/contexts/preview/quo/tags/status_tags.cljs @@ -1,9 +1,9 @@ -(ns status-im.contexts.quo-preview.tags.status-tags +(ns status-im.contexts.preview.quo.tags.status-tags (:require [quo.core :as quo] [react-native.core :as rn] [reagent.core :as reagent] - [status-im.contexts.quo-preview.preview :as preview] + [status-im.contexts.preview.quo.preview :as preview] [utils.i18n :as i18n])) (def status-tags-options diff --git a/src/status_im/contexts/quo_preview/tags/summary_tag.cljs b/src/status_im/contexts/preview/quo/tags/summary_tag.cljs similarity index 94% rename from src/status_im/contexts/quo_preview/tags/summary_tag.cljs rename to src/status_im/contexts/preview/quo/tags/summary_tag.cljs index b8925ae39a4..c3d72fbee20 100644 --- a/src/status_im/contexts/quo_preview/tags/summary_tag.cljs +++ b/src/status_im/contexts/preview/quo/tags/summary_tag.cljs @@ -1,11 +1,11 @@ -(ns status-im.contexts.quo-preview.tags.summary-tag +(ns status-im.contexts.preview.quo.tags.summary-tag (:require [quo.core :as quo] [quo.foundations.resources :as quo.resources] [react-native.core :as rn] [reagent.core :as reagent] [status-im.common.resources :as resources] - [status-im.contexts.quo-preview.preview :as preview])) + [status-im.contexts.preview.quo.preview :as preview])) (defn data [type] diff --git a/src/status_im/contexts/quo_preview/tags/tag.cljs b/src/status_im/contexts/preview/quo/tags/tag.cljs similarity index 93% rename from src/status_im/contexts/quo_preview/tags/tag.cljs rename to src/status_im/contexts/preview/quo/tags/tag.cljs index 9a049c1cf2d..b1bde147bc9 100644 --- a/src/status_im/contexts/quo_preview/tags/tag.cljs +++ b/src/status_im/contexts/preview/quo/tags/tag.cljs @@ -1,9 +1,9 @@ -(ns status-im.contexts.quo-preview.tags.tag +(ns status-im.contexts.preview.quo.tags.tag (:require [quo.core :as quo] [reagent.core :as reagent] [status-im.common.resources :as resources] - [status-im.contexts.quo-preview.preview :as preview])) + [status-im.contexts.preview.quo.preview :as preview])) (def descriptor [{:key :size diff --git a/src/status_im/contexts/quo_preview/tags/tags.cljs b/src/status_im/contexts/preview/quo/tags/tags.cljs similarity index 95% rename from src/status_im/contexts/quo_preview/tags/tags.cljs rename to src/status_im/contexts/preview/quo/tags/tags.cljs index 33b55012b78..8efc9612f05 100644 --- a/src/status_im/contexts/quo_preview/tags/tags.cljs +++ b/src/status_im/contexts/preview/quo/tags/tags.cljs @@ -1,9 +1,9 @@ -(ns status-im.contexts.quo-preview.tags.tags +(ns status-im.contexts.preview.quo.tags.tags (:require [quo.core :as quo] [reagent.core :as reagent] [status-im.common.resources :as resources] - [status-im.contexts.quo-preview.preview :as preview])) + [status-im.contexts.preview.quo.preview :as preview])) (def descriptor [{:key :size diff --git a/src/status_im/contexts/quo_preview/tags/tiny_tag.cljs b/src/status_im/contexts/preview/quo/tags/tiny_tag.cljs similarity index 84% rename from src/status_im/contexts/quo_preview/tags/tiny_tag.cljs rename to src/status_im/contexts/preview/quo/tags/tiny_tag.cljs index 994f97662cf..6dd5ec257a6 100644 --- a/src/status_im/contexts/quo_preview/tags/tiny_tag.cljs +++ b/src/status_im/contexts/preview/quo/tags/tiny_tag.cljs @@ -1,9 +1,9 @@ -(ns status-im.contexts.quo-preview.tags.tiny-tag +(ns status-im.contexts.preview.quo.tags.tiny-tag (:require [quo.core :as quo] [react-native.core :as rn] [reagent.core :as reagent] - [status-im.contexts.quo-preview.preview :as preview])) + [status-im.contexts.preview.quo.preview :as preview])) (def descriptor [{:key :blur? :type :boolean} diff --git a/src/status_im/contexts/quo_preview/tags/token_tag.cljs b/src/status_im/contexts/preview/quo/tags/token_tag.cljs similarity index 93% rename from src/status_im/contexts/quo_preview/tags/token_tag.cljs rename to src/status_im/contexts/preview/quo/tags/token_tag.cljs index dadfb24ef9c..a61a355d33b 100644 --- a/src/status_im/contexts/quo_preview/tags/token_tag.cljs +++ b/src/status_im/contexts/preview/quo/tags/token_tag.cljs @@ -1,9 +1,9 @@ -(ns status-im.contexts.quo-preview.tags.token-tag +(ns status-im.contexts.preview.quo.tags.token-tag (:require [quo.core :as quo] [react-native.core :as rn] [reagent.core :as reagent] - [status-im.contexts.quo-preview.preview :as preview])) + [status-im.contexts.preview.quo.preview :as preview])) (def descriptor [{:key :size diff --git a/src/status_im/contexts/quo_preview/text_combinations/channel_name.cljs b/src/status_im/contexts/preview/quo/text_combinations/channel_name.cljs similarity index 84% rename from src/status_im/contexts/quo_preview/text_combinations/channel_name.cljs rename to src/status_im/contexts/preview/quo/text_combinations/channel_name.cljs index 7b9d0015924..aed3c7ef5d9 100644 --- a/src/status_im/contexts/quo_preview/text_combinations/channel_name.cljs +++ b/src/status_im/contexts/preview/quo/text_combinations/channel_name.cljs @@ -1,7 +1,7 @@ -(ns status-im.contexts.quo-preview.text-combinations.channel-name +(ns status-im.contexts.preview.quo.text-combinations.channel-name (:require [quo.core :as quo] [reagent.core :as reagent] - [status-im.contexts.quo-preview.preview :as preview])) + [status-im.contexts.preview.quo.preview :as preview])) (def descriptor diff --git a/src/status_im/contexts/quo_preview/text_combinations/page_top.cljs b/src/status_im/contexts/preview/quo/text_combinations/page_top.cljs similarity index 97% rename from src/status_im/contexts/quo_preview/text_combinations/page_top.cljs rename to src/status_im/contexts/preview/quo/text_combinations/page_top.cljs index 1db98b29e16..c3fd0e87716 100644 --- a/src/status_im/contexts/quo_preview/text_combinations/page_top.cljs +++ b/src/status_im/contexts/preview/quo/text_combinations/page_top.cljs @@ -1,9 +1,9 @@ -(ns status-im.contexts.quo-preview.text-combinations.page-top +(ns status-im.contexts.preview.quo.text-combinations.page-top (:require [quo.core :as quo] [quo.foundations.resources :as quo.resources] [reagent.core :as reagent] [status-im.common.resources :as resources] - [status-im.contexts.quo-preview.preview :as preview])) + [status-im.contexts.preview.quo.preview :as preview])) (def avatar-1 {:emoji "🥨" diff --git a/src/status_im/contexts/quo_preview/text_combinations/preview.cljs b/src/status_im/contexts/preview/quo/text_combinations/preview.cljs similarity index 90% rename from src/status_im/contexts/quo_preview/text_combinations/preview.cljs rename to src/status_im/contexts/preview/quo/text_combinations/preview.cljs index 7d8b0816b00..f1d471fa8f6 100644 --- a/src/status_im/contexts/quo_preview/text_combinations/preview.cljs +++ b/src/status_im/contexts/preview/quo/text_combinations/preview.cljs @@ -1,9 +1,9 @@ -(ns status-im.contexts.quo-preview.text-combinations.preview +(ns status-im.contexts.preview.quo.text-combinations.preview (:require [quo.core :as quo] [reagent.core :as reagent] [status-im.common.resources :as resources] - [status-im.contexts.quo-preview.preview :as preview])) + [status-im.contexts.preview.quo.preview :as preview])) (def descriptor [{:key :title :type :text} diff --git a/src/status_im/contexts/quo_preview/text_combinations/standard_title.cljs b/src/status_im/contexts/preview/quo/text_combinations/standard_title.cljs similarity index 94% rename from src/status_im/contexts/quo_preview/text_combinations/standard_title.cljs rename to src/status_im/contexts/preview/quo/text_combinations/standard_title.cljs index 9e31cb5543f..04ae7cefbe0 100644 --- a/src/status_im/contexts/quo_preview/text_combinations/standard_title.cljs +++ b/src/status_im/contexts/preview/quo/text_combinations/standard_title.cljs @@ -1,7 +1,7 @@ -(ns status-im.contexts.quo-preview.text-combinations.standard-title +(ns status-im.contexts.preview.quo.text-combinations.standard-title (:require [quo.core :as quo] [reagent.core :as reagent] - [status-im.contexts.quo-preview.preview :as preview])) + [status-im.contexts.preview.quo.preview :as preview])) (def descriptor [{:key :title :type :text} diff --git a/src/status_im/contexts/quo_preview/text_combinations/username.cljs b/src/status_im/contexts/preview/quo/text_combinations/username.cljs similarity index 92% rename from src/status_im/contexts/quo_preview/text_combinations/username.cljs rename to src/status_im/contexts/preview/quo/text_combinations/username.cljs index 4456c516438..5af209ad836 100644 --- a/src/status_im/contexts/quo_preview/text_combinations/username.cljs +++ b/src/status_im/contexts/preview/quo/text_combinations/username.cljs @@ -1,7 +1,7 @@ -(ns status-im.contexts.quo-preview.text-combinations.username +(ns status-im.contexts.preview.quo.text-combinations.username (:require [quo.core :as quo] [reagent.core :as reagent] - [status-im.contexts.quo-preview.preview :as preview])) + [status-im.contexts.preview.quo.preview :as preview])) (def descriptor [{:key :name-type diff --git a/src/status_im/contexts/quo_preview/wallet/account_card.cljs b/src/status_im/contexts/preview/quo/wallet/account_card.cljs similarity index 95% rename from src/status_im/contexts/quo_preview/wallet/account_card.cljs rename to src/status_im/contexts/preview/quo/wallet/account_card.cljs index 1149cb4598d..fd1984d270a 100644 --- a/src/status_im/contexts/quo_preview/wallet/account_card.cljs +++ b/src/status_im/contexts/preview/quo/wallet/account_card.cljs @@ -1,9 +1,9 @@ -(ns status-im.contexts.quo-preview.wallet.account-card +(ns status-im.contexts.preview.quo.wallet.account-card (:require [quo.core :as quo] [react-native.core :as rn] [reagent.core :as reagent] - [status-im.contexts.quo-preview.preview :as preview] + [status-im.contexts.preview.quo.preview :as preview] [utils.collection])) (def descriptor diff --git a/src/status_im/contexts/quo_preview/wallet/account_origin.cljs b/src/status_im/contexts/preview/quo/wallet/account_origin.cljs similarity index 89% rename from src/status_im/contexts/quo_preview/wallet/account_origin.cljs rename to src/status_im/contexts/preview/quo/wallet/account_origin.cljs index 69f0aee9f17..4afc299e548 100644 --- a/src/status_im/contexts/quo_preview/wallet/account_origin.cljs +++ b/src/status_im/contexts/preview/quo/wallet/account_origin.cljs @@ -1,9 +1,9 @@ -(ns status-im.contexts.quo-preview.wallet.account-origin +(ns status-im.contexts.preview.quo.wallet.account-origin (:require [quo.core :as quo] [reagent.core :as reagent] [status-im.common.resources :as resources] - [status-im.contexts.quo-preview.preview :as preview])) + [status-im.contexts.preview.quo.preview :as preview])) (def descriptor [{:type :select diff --git a/src/status_im/contexts/quo_preview/wallet/account_overview.cljs b/src/status_im/contexts/preview/quo/wallet/account_overview.cljs similarity index 94% rename from src/status_im/contexts/quo_preview/wallet/account_overview.cljs rename to src/status_im/contexts/preview/quo/wallet/account_overview.cljs index e1cd3ec36f3..2cadb35ed6f 100644 --- a/src/status_im/contexts/quo_preview/wallet/account_overview.cljs +++ b/src/status_im/contexts/preview/quo/wallet/account_overview.cljs @@ -1,8 +1,8 @@ -(ns status-im.contexts.quo-preview.wallet.account-overview +(ns status-im.contexts.preview.quo.wallet.account-overview (:require [quo.core :as quo] [reagent.core :as reagent] - [status-im.contexts.quo-preview.preview :as preview])) + [status-im.contexts.preview.quo.preview :as preview])) (def descriptor [{:key :time-frame-string :type :text} diff --git a/src/status_im/contexts/quo_preview/wallet/account_permissions.cljs b/src/status_im/contexts/preview/quo/wallet/account_permissions.cljs similarity index 95% rename from src/status_im/contexts/quo_preview/wallet/account_permissions.cljs rename to src/status_im/contexts/preview/quo/wallet/account_permissions.cljs index 019d230d297..fde6ded7631 100644 --- a/src/status_im/contexts/quo_preview/wallet/account_permissions.cljs +++ b/src/status_im/contexts/preview/quo/wallet/account_permissions.cljs @@ -1,8 +1,8 @@ -(ns status-im.contexts.quo-preview.wallet.account-permissions +(ns status-im.contexts.preview.quo.wallet.account-permissions (:require [quo.core :as quo] [reagent.core :as reagent] - [status-im.contexts.quo-preview.preview :as preview])) + [status-im.contexts.preview.quo.preview :as preview])) (def ^:private descriptor [{:key :name diff --git a/src/status_im/contexts/quo_preview/wallet/confirmation_progress.cljs b/src/status_im/contexts/preview/quo/wallet/confirmation_progress.cljs similarity index 94% rename from src/status_im/contexts/quo_preview/wallet/confirmation_progress.cljs rename to src/status_im/contexts/preview/quo/wallet/confirmation_progress.cljs index 68efbaf326f..2e40e191af5 100644 --- a/src/status_im/contexts/quo_preview/wallet/confirmation_progress.cljs +++ b/src/status_im/contexts/preview/quo/wallet/confirmation_progress.cljs @@ -1,9 +1,9 @@ -(ns status-im.contexts.quo-preview.wallet.confirmation-progress +(ns status-im.contexts.preview.quo.wallet.confirmation-progress (:require [quo.core :as quo] [react-native.core :as rn] [reagent.core :as reagent] - [status-im.contexts.quo-preview.preview :as preview])) + [status-im.contexts.preview.quo.preview :as preview])) (def descriptor [{:type :text diff --git a/src/status_im/contexts/quo_preview/wallet/keypair.cljs b/src/status_im/contexts/preview/quo/wallet/keypair.cljs similarity index 97% rename from src/status_im/contexts/quo_preview/wallet/keypair.cljs rename to src/status_im/contexts/preview/quo/wallet/keypair.cljs index cfc58a82d80..5fc137f3cdd 100644 --- a/src/status_im/contexts/quo_preview/wallet/keypair.cljs +++ b/src/status_im/contexts/preview/quo/wallet/keypair.cljs @@ -1,9 +1,9 @@ -(ns status-im.contexts.quo-preview.wallet.keypair +(ns status-im.contexts.preview.quo.wallet.keypair (:require [quo.core :as quo] [react-native.core :as rn] [reagent.core :as reagent] - [status-im.contexts.quo-preview.preview :as preview])) + [status-im.contexts.preview.quo.preview :as preview])) (def accounts [{:account-props {:customization-color :turquoise diff --git a/src/status_im/contexts/quo_preview/wallet/network_amount.cljs b/src/status_im/contexts/preview/quo/wallet/network_amount.cljs similarity index 82% rename from src/status_im/contexts/quo_preview/wallet/network_amount.cljs rename to src/status_im/contexts/preview/quo/wallet/network_amount.cljs index bce247bec64..ee2af7684a2 100644 --- a/src/status_im/contexts/quo_preview/wallet/network_amount.cljs +++ b/src/status_im/contexts/preview/quo/wallet/network_amount.cljs @@ -1,8 +1,8 @@ -(ns status-im.contexts.quo-preview.wallet.network-amount +(ns status-im.contexts.preview.quo.wallet.network-amount (:require [quo.core :as quo] [reagent.core :as reagent] - [status-im.contexts.quo-preview.preview :as preview])) + [status-im.contexts.preview.quo.preview :as preview])) (def descriptor diff --git a/src/status_im/contexts/quo_preview/wallet/network_bridge.cljs b/src/status_im/contexts/preview/quo/wallet/network_bridge.cljs similarity index 89% rename from src/status_im/contexts/quo_preview/wallet/network_bridge.cljs rename to src/status_im/contexts/preview/quo/wallet/network_bridge.cljs index 3f347862086..86934994c4d 100644 --- a/src/status_im/contexts/quo_preview/wallet/network_bridge.cljs +++ b/src/status_im/contexts/preview/quo/wallet/network_bridge.cljs @@ -1,8 +1,8 @@ -(ns status-im.contexts.quo-preview.wallet.network-bridge +(ns status-im.contexts.preview.quo.wallet.network-bridge (:require [quo.core :as quo] [reagent.core :as reagent] - [status-im.contexts.quo-preview.preview :as preview])) + [status-im.contexts.preview.quo.preview :as preview])) (def descriptor diff --git a/src/status_im/contexts/quo_preview/wallet/network_link.cljs b/src/status_im/contexts/preview/quo/wallet/network_link.cljs similarity index 89% rename from src/status_im/contexts/quo_preview/wallet/network_link.cljs rename to src/status_im/contexts/preview/quo/wallet/network_link.cljs index 344ac865257..f02375d0835 100644 --- a/src/status_im/contexts/quo_preview/wallet/network_link.cljs +++ b/src/status_im/contexts/preview/quo/wallet/network_link.cljs @@ -1,8 +1,8 @@ -(ns status-im.contexts.quo-preview.wallet.network-link +(ns status-im.contexts.preview.quo.wallet.network-link (:require [quo.core :as quo] [reagent.core :as reagent] - [status-im.contexts.quo-preview.preview :as preview])) + [status-im.contexts.preview.quo.preview :as preview])) (def networks [{:key :ethereum diff --git a/src/status_im/contexts/quo_preview/wallet/network_routing.cljs b/src/status_im/contexts/preview/quo/wallet/network_routing.cljs similarity index 97% rename from src/status_im/contexts/quo_preview/wallet/network_routing.cljs rename to src/status_im/contexts/preview/quo/wallet/network_routing.cljs index feb4f588d9d..26d531ade26 100644 --- a/src/status_im/contexts/quo_preview/wallet/network_routing.cljs +++ b/src/status_im/contexts/preview/quo/wallet/network_routing.cljs @@ -1,9 +1,9 @@ -(ns status-im.contexts.quo-preview.wallet.network-routing +(ns status-im.contexts.preview.quo.wallet.network-routing (:require [quo.core :as quo] [quo.foundations.colors :as colors] [react-native.core :as rn] [reagent.core :as reagent] - [status-im.contexts.quo-preview.preview :as preview])) + [status-im.contexts.preview.quo.preview :as preview])) (def descriptor [{:key :number-networks diff --git a/src/status_im/contexts/quo_preview/wallet/progress_bar.cljs b/src/status_im/contexts/preview/quo/wallet/progress_bar.cljs similarity index 89% rename from src/status_im/contexts/quo_preview/wallet/progress_bar.cljs rename to src/status_im/contexts/preview/quo/wallet/progress_bar.cljs index d3bf0aa9824..ae82c3ea45c 100644 --- a/src/status_im/contexts/quo_preview/wallet/progress_bar.cljs +++ b/src/status_im/contexts/preview/quo/wallet/progress_bar.cljs @@ -1,9 +1,9 @@ -(ns status-im.contexts.quo-preview.wallet.progress-bar +(ns status-im.contexts.preview.quo.wallet.progress-bar (:require [quo.core :as quo] [react-native.core :as rn] [reagent.core :as reagent] - [status-im.contexts.quo-preview.preview :as preview])) + [status-im.contexts.preview.quo.preview :as preview])) (def descriptor [{:key :state diff --git a/src/status_im/contexts/quo_preview/wallet/required_tokens.cljs b/src/status_im/contexts/preview/quo/wallet/required_tokens.cljs similarity index 90% rename from src/status_im/contexts/quo_preview/wallet/required_tokens.cljs rename to src/status_im/contexts/preview/quo/wallet/required_tokens.cljs index 5c57508c1d8..7263b34ea53 100644 --- a/src/status_im/contexts/quo_preview/wallet/required_tokens.cljs +++ b/src/status_im/contexts/preview/quo/wallet/required_tokens.cljs @@ -1,9 +1,9 @@ -(ns status-im.contexts.quo-preview.wallet.required-tokens +(ns status-im.contexts.preview.quo.wallet.required-tokens (:require [quo.core :as quo] [reagent.core :as reagent] [status-im.common.resources :as resources] - [status-im.contexts.quo-preview.preview :as preview])) + [status-im.contexts.preview.quo.preview :as preview])) (def descriptor [{:key :type diff --git a/src/status_im/contexts/quo_preview/wallet/summary_info.cljs b/src/status_im/contexts/preview/quo/wallet/summary_info.cljs similarity index 94% rename from src/status_im/contexts/quo_preview/wallet/summary_info.cljs rename to src/status_im/contexts/preview/quo/wallet/summary_info.cljs index 06fc13034b9..7fbf8e827a1 100644 --- a/src/status_im/contexts/quo_preview/wallet/summary_info.cljs +++ b/src/status_im/contexts/preview/quo/wallet/summary_info.cljs @@ -1,9 +1,9 @@ -(ns status-im.contexts.quo-preview.wallet.summary-info +(ns status-im.contexts.preview.quo.wallet.summary-info (:require [quo.core :as quo] [reagent.core :as reagent] [status-im.common.resources :as resources] - [status-im.contexts.quo-preview.preview :as preview])) + [status-im.contexts.preview.quo.preview :as preview])) (def descriptor diff --git a/src/status_im/contexts/quo_preview/wallet/token_input.cljs b/src/status_im/contexts/preview/quo/wallet/token_input.cljs similarity index 91% rename from src/status_im/contexts/quo_preview/wallet/token_input.cljs rename to src/status_im/contexts/preview/quo/wallet/token_input.cljs index 3de5659a58d..36b92af0c85 100644 --- a/src/status_im/contexts/quo_preview/wallet/token_input.cljs +++ b/src/status_im/contexts/preview/quo/wallet/token_input.cljs @@ -1,9 +1,9 @@ -(ns status-im.contexts.quo-preview.wallet.token-input +(ns status-im.contexts.preview.quo.wallet.token-input (:require [quo.core :as quo] [quo.foundations.resources :as resources] [reagent.core :as reagent] - [status-im.contexts.quo-preview.preview :as preview])) + [status-im.contexts.preview.quo.preview :as preview])) (def networks [{:source (resources/get-network :arbitrum)} diff --git a/src/status_im/contexts/quo_preview/wallet/transaction_progress.cljs b/src/status_im/contexts/preview/quo/wallet/transaction_progress.cljs similarity index 97% rename from src/status_im/contexts/quo_preview/wallet/transaction_progress.cljs rename to src/status_im/contexts/preview/quo/wallet/transaction_progress.cljs index 46113004514..08256b5bd78 100644 --- a/src/status_im/contexts/quo_preview/wallet/transaction_progress.cljs +++ b/src/status_im/contexts/preview/quo/wallet/transaction_progress.cljs @@ -1,10 +1,10 @@ -(ns status-im.contexts.quo-preview.wallet.transaction-progress +(ns status-im.contexts.preview.quo.wallet.transaction-progress (:require [quo.core :as quo] [react-native.core :as rn] [reagent.core :as reagent] [status-im.common.resources :as resources] - [status-im.contexts.quo-preview.preview :as preview])) + [status-im.contexts.preview.quo.preview :as preview])) (def descriptor [{:type :text diff --git a/src/status_im/contexts/quo_preview/wallet/transaction_summary.cljs b/src/status_im/contexts/preview/quo/wallet/transaction_summary.cljs similarity index 97% rename from src/status_im/contexts/quo_preview/wallet/transaction_summary.cljs rename to src/status_im/contexts/preview/quo/wallet/transaction_summary.cljs index 8441d93b11f..0b7e51a6a29 100644 --- a/src/status_im/contexts/quo_preview/wallet/transaction_summary.cljs +++ b/src/status_im/contexts/preview/quo/wallet/transaction_summary.cljs @@ -1,10 +1,10 @@ -(ns status-im.contexts.quo-preview.wallet.transaction-summary +(ns status-im.contexts.preview.quo.wallet.transaction-summary (:require [quo.core :as quo] [quo.foundations.resources :as quo.resources] [reagent.core :as reagent] [status-im.common.resources :as resources] - [status-im.contexts.quo-preview.preview :as preview])) + [status-im.contexts.preview.quo.preview :as preview])) (def asset-snt {:size 24 diff --git a/src/status_im/contexts/quo_preview/wallet/wallet_activity.cljs b/src/status_im/contexts/preview/quo/wallet/wallet_activity.cljs similarity index 98% rename from src/status_im/contexts/quo_preview/wallet/wallet_activity.cljs rename to src/status_im/contexts/preview/quo/wallet/wallet_activity.cljs index fdbe8cb1306..32be5f38517 100644 --- a/src/status_im/contexts/quo_preview/wallet/wallet_activity.cljs +++ b/src/status_im/contexts/preview/quo/wallet/wallet_activity.cljs @@ -1,11 +1,11 @@ -(ns status-im.contexts.quo-preview.wallet.wallet-activity +(ns status-im.contexts.preview.quo.wallet.wallet-activity (:require [quo.core :as quo] [quo.foundations.resources :as quo.resources] [react-native.core :as rn] [reagent.core :as reagent] [status-im.common.resources :as resources] - [status-im.contexts.quo-preview.preview :as preview])) + [status-im.contexts.preview.quo.preview :as preview])) (def asset-snt {:size 24 diff --git a/src/status_im/contexts/quo_preview/wallet/wallet_overview.cljs b/src/status_im/contexts/preview/quo/wallet/wallet_overview.cljs similarity index 94% rename from src/status_im/contexts/quo_preview/wallet/wallet_overview.cljs rename to src/status_im/contexts/preview/quo/wallet/wallet_overview.cljs index 7e7fd3d22c0..bdcb338388a 100644 --- a/src/status_im/contexts/quo_preview/wallet/wallet_overview.cljs +++ b/src/status_im/contexts/preview/quo/wallet/wallet_overview.cljs @@ -1,9 +1,9 @@ -(ns status-im.contexts.quo-preview.wallet.wallet-overview +(ns status-im.contexts.preview.quo.wallet.wallet-overview (:require [quo.core :as quo] [quo.foundations.resources :as quo.resources] [reagent.core :as reagent] - [status-im.contexts.quo-preview.preview :as preview])) + [status-im.contexts.preview.quo.preview :as preview])) (def descriptor [{:key :state diff --git a/src/status_im/contexts/status_im_preview/common/floating_button_page/style.cljs b/src/status_im/contexts/preview/status_im/common/floating_button_page/style.cljs similarity index 88% rename from src/status_im/contexts/status_im_preview/common/floating_button_page/style.cljs rename to src/status_im/contexts/preview/status_im/common/floating_button_page/style.cljs index 362b8aab7f3..51efcb78673 100644 --- a/src/status_im/contexts/status_im_preview/common/floating_button_page/style.cljs +++ b/src/status_im/contexts/preview/status_im/common/floating_button_page/style.cljs @@ -1,4 +1,4 @@ -(ns status-im.contexts.status-im-preview.common.floating-button-page.style +(ns status-im.contexts.preview.status-im.common.floating-button-page.style (:require [quo.foundations.colors :as colors] [react-native.safe-area :as safe-area])) diff --git a/src/status_im/contexts/status_im_preview/common/floating_button_page/view.cljs b/src/status_im/contexts/preview/status_im/common/floating_button_page/view.cljs similarity index 94% rename from src/status_im/contexts/status_im_preview/common/floating_button_page/view.cljs rename to src/status_im/contexts/preview/status_im/common/floating_button_page/view.cljs index 30a5d2a9750..3d518001702 100644 --- a/src/status_im/contexts/status_im_preview/common/floating_button_page/view.cljs +++ b/src/status_im/contexts/preview/status_im/common/floating_button_page/view.cljs @@ -1,11 +1,12 @@ -(ns status-im.contexts.status-im-preview.common.floating-button-page.view +(ns status-im.contexts.preview.status-im.common.floating-button-page.view (:require [quo.core :as quo] [re-frame.core :as rf] [react-native.core :as rn] [reagent.core :as reagent] [status-im.common.floating-button-page.view :as floating-button-page] [status-im.common.resources :as resources] - [status-im.contexts.status-im-preview.common.floating-button-page.style :as style])) + [status-im.contexts.preview.status-im.common.floating-button-page.style :as + style])) (defn view [] diff --git a/src/status_im/contexts/status_im_preview/main.cljs b/src/status_im/contexts/preview/status_im/main.cljs similarity index 85% rename from src/status_im/contexts/status_im_preview/main.cljs rename to src/status_im/contexts/preview/status_im/main.cljs index cbc0a448d89..643f82b434d 100644 --- a/src/status_im/contexts/status_im_preview/main.cljs +++ b/src/status_im/contexts/preview/status_im/main.cljs @@ -1,12 +1,13 @@ -(ns status-im.contexts.status-im-preview.main +(ns status-im.contexts.preview.status-im.main (:refer-clojure :exclude [filter]) (:require [quo.core :as quo] [react-native.core :as rn] [reagent.core :as reagent] - [status-im.contexts.quo-preview.common :as common] - [status-im.contexts.status-im-preview.common.floating-button-page.view :as floating-button-page] - [status-im.contexts.status-im-preview.style :as style] + [status-im.contexts.preview.quo.common :as common] + [status-im.contexts.preview.status-im.common.floating-button-page.view :as + floating-button-page] + [status-im.contexts.preview.status-im.style :as style] [utils.re-frame :as rf])) (def screens-categories diff --git a/src/status_im/contexts/status_im_preview/style.cljs b/src/status_im/contexts/preview/status_im/style.cljs similarity index 82% rename from src/status_im/contexts/status_im_preview/style.cljs rename to src/status_im/contexts/preview/status_im/style.cljs index a4c2bfa3896..169701559f9 100644 --- a/src/status_im/contexts/status_im_preview/style.cljs +++ b/src/status_im/contexts/preview/status_im/style.cljs @@ -1,4 +1,4 @@ -(ns status-im.contexts.status-im-preview.style +(ns status-im.contexts.preview.status-im.style (:require [quo.foundations.colors :as colors])) diff --git a/src/status_im/contexts/profile/create/events.cljs b/src/status_im/contexts/profile/create/events.cljs index 3d831cc9ccc..50c8b7db7b8 100644 --- a/src/status_im/contexts/profile/create/events.cljs +++ b/src/status_im/contexts/profile/create/events.cljs @@ -1,7 +1,7 @@ (ns status-im.contexts.profile.create.events (:require [native-module.core :as native-module] - [status-im.contexts.emoji-picker.utils :as emoji-picker.utils] + [status-im.common.emoji-picker.utils :as emoji-picker.utils] [status-im.contexts.profile.config :as profile.config] status-im.contexts.profile.create.effects [utils.re-frame :as rf] diff --git a/src/status_im/contexts/profile/login/events.cljs b/src/status_im/contexts/profile/login/events.cljs index 560584628b2..2100eb29c16 100644 --- a/src/status_im/contexts/profile/login/events.cljs +++ b/src/status_im/contexts/profile/login/events.cljs @@ -17,13 +17,13 @@ [status-im.common.universal-links :as universal-links] [status-im.config :as config] [status-im.constants :as constants] + [status-im.contexts.chat.contacts.events :as contacts] [status-im.contexts.chat.messages.link-preview.events :as link-preview] - [status-im.contexts.contacts.events :as contacts] [status-im.contexts.profile.config :as profile.config] status-im.contexts.profile.login.effects + [status-im.contexts.profile.push-notifications.events :as notifications] [status-im.contexts.profile.rpc :as profile.rpc] [status-im.contexts.profile.settings.events :as profile.settings.events] - [status-im.contexts.push-notifications.events :as notifications] [status-im.contexts.shell.activity-center.events :as activity-center] [status-im.navigation.events :as navigation] [taoensso.timbre :as log] diff --git a/src/status_im/contexts/push_notifications/effects.cljs b/src/status_im/contexts/profile/push_notifications/effects.cljs similarity index 96% rename from src/status_im/contexts/push_notifications/effects.cljs rename to src/status_im/contexts/profile/push_notifications/effects.cljs index 40f85e0df01..b748f168757 100644 --- a/src/status_im/contexts/push_notifications/effects.cljs +++ b/src/status_im/contexts/profile/push_notifications/effects.cljs @@ -1,4 +1,4 @@ -(ns status-im.contexts.push-notifications.effects +(ns status-im.contexts.profile.push-notifications.effects (:require [native-module.push-notifications :as native-module.pn] [react-native.platform :as platform] diff --git a/src/status_im/contexts/push_notifications/events.cljs b/src/status_im/contexts/profile/push_notifications/events.cljs similarity index 95% rename from src/status_im/contexts/push_notifications/events.cljs rename to src/status_im/contexts/profile/push_notifications/events.cljs index 2ec50ec81e6..7ff8c2261c1 100644 --- a/src/status_im/contexts/push_notifications/events.cljs +++ b/src/status_im/contexts/profile/push_notifications/events.cljs @@ -1,4 +1,4 @@ -(ns status-im.contexts.push-notifications.events +(ns status-im.contexts.profile.push-notifications.events (:require [cljs-bean.core :as bean] [native-module.push-notifications :as native-module.pn] @@ -6,7 +6,7 @@ [react-native.platform :as platform] [react-native.push-notification-ios :as pn-ios] [status-im.config :as config] - status-im.contexts.push-notifications.effects + status-im.contexts.profile.push-notifications.effects [taoensso.timbre :as log] [utils.re-frame :as rf] [utils.transforms :as transforms])) diff --git a/src/status_im/contexts/push_notifications/local/effects.cljs b/src/status_im/contexts/profile/push_notifications/local/effects.cljs similarity index 92% rename from src/status_im/contexts/push_notifications/local/effects.cljs rename to src/status_im/contexts/profile/push_notifications/local/effects.cljs index 440dbaa3d59..7bf2b0a1c05 100644 --- a/src/status_im/contexts/push_notifications/local/effects.cljs +++ b/src/status_im/contexts/profile/push_notifications/local/effects.cljs @@ -1,4 +1,4 @@ -(ns status-im.contexts.push-notifications.local.effects +(ns status-im.contexts.profile.push-notifications.local.effects (:require [cljs-bean.core :as bean] [native-module.push-notifications :as native-module.pn] diff --git a/src/status_im/contexts/push_notifications/local/events.cljs b/src/status_im/contexts/profile/push_notifications/local/events.cljs similarity index 90% rename from src/status_im/contexts/push_notifications/local/events.cljs rename to src/status_im/contexts/profile/push_notifications/local/events.cljs index 792a3ce8d70..4946ef89156 100644 --- a/src/status_im/contexts/push_notifications/local/events.cljs +++ b/src/status_im/contexts/profile/push_notifications/local/events.cljs @@ -1,8 +1,8 @@ -(ns status-im.contexts.push-notifications.local.events +(ns status-im.contexts.profile.push-notifications.local.events (:require [legacy.status-im.notifications.wallet :as notifications.wallet] [react-native.platform :as platform] - status-im.contexts.push-notifications.local.effects + status-im.contexts.profile.push-notifications.local.effects [utils.re-frame :as rf])) diff --git a/src/status_im/contexts/profile/recover/events.cljs b/src/status_im/contexts/profile/recover/events.cljs index caf7c8223d9..8aa072aa599 100644 --- a/src/status_im/contexts/profile/recover/events.cljs +++ b/src/status_im/contexts/profile/recover/events.cljs @@ -1,7 +1,7 @@ (ns status-im.contexts.profile.recover.events (:require [native-module.core :as native-module] - [status-im.contexts.emoji-picker.utils :as emoji-picker.utils] + [status-im.common.emoji-picker.utils :as emoji-picker.utils] [status-im.contexts.profile.config :as profile.config] status-im.contexts.profile.recover.effects [utils.re-frame :as rf] diff --git a/src/status_im/contexts/quo_preview/ios/drawer_bar.cljs b/src/status_im/contexts/quo_preview/ios/drawer_bar.cljs deleted file mode 100644 index 0e362096e74..00000000000 --- a/src/status_im/contexts/quo_preview/ios/drawer_bar.cljs +++ /dev/null @@ -1,9 +0,0 @@ -(ns status-im.contexts.quo-preview.ios.drawer-bar - (:require - [quo.core :as quo] - [status-im.contexts.quo-preview.preview :as preview])) - -(defn view - [] - [preview/preview-container {} - [quo/drawer-bar]]) diff --git a/src/status_im/contexts/wallet/add_address_to_watch/confirm_address/view.cljs b/src/status_im/contexts/wallet/add_address_to_watch/confirm_address/view.cljs index bda93cb1c5f..2f8dfda6f57 100644 --- a/src/status_im/contexts/wallet/add_address_to_watch/confirm_address/view.cljs +++ b/src/status_im/contexts/wallet/add_address_to_watch/confirm_address/view.cljs @@ -5,7 +5,7 @@ [quo.foundations.colors :as colors] [react-native.core :as rn] [reagent.core :as reagent] - [status-im.contexts.emoji-picker.utils :as emoji-picker.utils] + [status-im.common.emoji-picker.utils :as emoji-picker.utils] [status-im.contexts.wallet.add-address-to-watch.confirm-address.style :as style] [status-im.contexts.wallet.common.screen-base.create-or-edit-account.view :as create-or-edit-account] diff --git a/src/status_im/contexts/wallet/create_account/view.cljs b/src/status_im/contexts/wallet/create_account/view.cljs index 755fd3e7692..783b7deed09 100644 --- a/src/status_im/contexts/wallet/create_account/view.cljs +++ b/src/status_im/contexts/wallet/create_account/view.cljs @@ -7,9 +7,9 @@ [react-native.core :as rn] [react-native.safe-area :as safe-area] [reagent.core :as reagent] + [status-im.common.emoji-picker.utils :as emoji-picker.utils] [status-im.common.standard-authentication.core :as standard-auth] [status-im.constants :as constants] - [status-im.contexts.emoji-picker.utils :as emoji-picker.utils] [status-im.contexts.wallet.common.utils :as utils] [status-im.contexts.wallet.create-account.style :as style] [utils.i18n :as i18n] diff --git a/src/status_im/core.cljs b/src/status_im/core.cljs index a733a1a94b1..ef8657bd408 100644 --- a/src/status_im/core.cljs +++ b/src/status_im/core.cljs @@ -16,7 +16,7 @@ [status-im.common.log :as log] [status-im.common.universal-links :as universal-links] [status-im.config :as config] - [status-im.contexts.push-notifications.events :as notifications] + [status-im.contexts.profile.push-notifications.events :as notifications] [status-im.contexts.shell.jump-to.state :as shell.state] [status-im.contexts.shell.jump-to.utils :as shell.utils] status-im.events diff --git a/src/status_im/events.cljs b/src/status_im/events.cljs index a55f29dacd6..701a334f6bc 100644 --- a/src/status_im/events.cljs +++ b/src/status_im/events.cljs @@ -4,19 +4,19 @@ [legacy.status-im.keycard.core :as keycard] status-im.common.alert.effects status-im.common.async-storage.effects + status-im.common.emoji-picker.events status-im.common.font.events [status-im.common.json-rpc.events] status-im.common.password-authentication.events status-im.common.signals.events status-im.common.theme.events [status-im.common.toasts.events] - [status-im.contexts.add-new-contact.events] status-im.contexts.chat.composer.events status-im.contexts.chat.events + [status-im.contexts.chat.home.add-new-contact.events] status-im.contexts.chat.photo-selector.events status-im.contexts.communities.events status-im.contexts.communities.overview.events - status-im.contexts.emoji-picker.events status-im.contexts.onboarding.common.overlay.events status-im.contexts.onboarding.events status-im.contexts.profile.events diff --git a/src/status_im/navigation/screens.cljs b/src/status_im/navigation/screens.cljs index 35c8ce9a8b3..02977951e28 100644 --- a/src/status_im/navigation/screens.cljs +++ b/src/status_im/navigation/screens.cljs @@ -1,11 +1,12 @@ (ns status-im.navigation.screens (:require [legacy.status-im.ui.screens.screens :as old-screens] + [status-im.common.emoji-picker.view :as emoji-picker] [status-im.config :as config] - [status-im.contexts.add-new-contact.scan.scan-profile-qr-page :as scan-profile-qr-page] - [status-im.contexts.add-new-contact.views :as add-new-contact] [status-im.contexts.chat.camera.view :as camera-screen] [status-im.contexts.chat.group-details.view :as group-details] + [status-im.contexts.chat.home.add-new-contact.scan.scan-profile-qr-page :as scan-profile-qr-page] + [status-im.contexts.chat.home.add-new-contact.views :as add-new-contact] [status-im.contexts.chat.lightbox.view :as lightbox] [status-im.contexts.chat.messages.view :as chat] [status-im.contexts.chat.new-chat.view :as new-chat] @@ -17,7 +18,6 @@ [status-im.contexts.communities.actions.request-to-join.view :as join-menu] [status-im.contexts.communities.discover.view :as communities.discover] [status-im.contexts.communities.overview.view :as communities.overview] - [status-im.contexts.emoji-picker.view :as emoji-picker] [status-im.contexts.onboarding.create-password.view :as create-password] [status-im.contexts.onboarding.create-profile.view :as create-profile] [status-im.contexts.onboarding.enable-biometrics.view :as enable-biometrics] @@ -31,14 +31,14 @@ [status-im.contexts.onboarding.syncing.progress.view :as syncing-devices] [status-im.contexts.onboarding.syncing.results.view :as syncing-results] [status-im.contexts.onboarding.welcome.view :as welcome] + [status-im.contexts.preview.quo.component-preview.view :as component-preview] + [status-im.contexts.preview.quo.main :as quo.preview] + [status-im.contexts.preview.status-im.main :as status-im-preview] [status-im.contexts.profile.profiles.view :as profiles] [status-im.contexts.profile.settings.view :as settings] - [status-im.contexts.quo-preview.component-preview.view :as component-preview] - [status-im.contexts.quo-preview.main :as quo.preview] [status-im.contexts.shell.activity-center.view :as activity-center] [status-im.contexts.shell.jump-to.view :as shell] [status-im.contexts.shell.share.view :as share] - [status-im.contexts.status-im-preview.main :as status-im-preview] [status-im.contexts.syncing.find-sync-code.view :as find-sync-code] [status-im.contexts.syncing.how-to-pair.view :as how-to-pair] [status-im.contexts.syncing.scan-sync-code-page.view :as scan-sync-code-page] From 006b637b1be0bbd2d7fb7d5efdaaa561345e5307 Mon Sep 17 00:00:00 2001 From: Omar Basem Date: Wed, 3 Jan 2024 15:36:17 +0400 Subject: [PATCH 04/28] Quo: quiz item (#18306) * Quo: quiz item --- .../list_items/quiz_item/component_spec.cljs | 24 ++++++++++ .../list_items/quiz_item/style.cljs | 45 +++++++++++++++++++ .../components/list_items/quiz_item/view.cljs | 30 +++++++++++++ src/quo/core.cljs | 6 ++- src/quo/core_spec.cljs | 1 + src/quo/foundations/colors.cljs | 3 ++ .../preview/quo/list_items/quiz_item.cljs | 28 ++++++++++++ src/status_im/contexts/preview/quo/main.cljs | 3 ++ translations/en.json | 3 +- 9 files changed, 140 insertions(+), 3 deletions(-) create mode 100644 src/quo/components/list_items/quiz_item/component_spec.cljs create mode 100644 src/quo/components/list_items/quiz_item/style.cljs create mode 100644 src/quo/components/list_items/quiz_item/view.cljs create mode 100644 src/status_im/contexts/preview/quo/list_items/quiz_item.cljs diff --git a/src/quo/components/list_items/quiz_item/component_spec.cljs b/src/quo/components/list_items/quiz_item/component_spec.cljs new file mode 100644 index 00000000000..6429f24b226 --- /dev/null +++ b/src/quo/components/list_items/quiz_item/component_spec.cljs @@ -0,0 +1,24 @@ +(ns quo.components.list-items.quiz-item.component-spec + (:require + [quo.components.list-items.quiz-item.view :as quiz-item] + [test-helpers.component :as h])) + +(h/describe "List Items: Token Value" + (h/test "Number label renders" + (h/render [quiz-item/view + {:state :empty + :word "collapse" + :number 2}]) + (h/is-truthy (h/get-by-label-text :number-container))) + (h/test "Success icon renders" + (h/render [quiz-item/view + {:state :success + :word "collapse" + :number 2}]) + (h/is-truthy (h/get-by-label-text :success-icon))) + (h/test "Error icon renders" + (h/render [quiz-item/view + {:state :error + :word "collapse" + :number 2}]) + (h/is-truthy (h/get-by-label-text :error-icon)))) diff --git a/src/quo/components/list_items/quiz_item/style.cljs b/src/quo/components/list_items/quiz_item/style.cljs new file mode 100644 index 00000000000..9efad1f7b5e --- /dev/null +++ b/src/quo/components/list_items/quiz_item/style.cljs @@ -0,0 +1,45 @@ +(ns quo.components.list-items.quiz-item.style + (:require [quo.foundations.colors :as colors])) + +(defn container + [{:keys [blur? theme state]}] + {:flex 1 + :flex-direction :row + :justify-content :space-between + :align-items :center + :max-height 56 + :padding 12 + :border-radius 12 + :opacity (if (= state :disabled) 0.3 1) + :border-width (if (and blur? (or (= state :empty) (= state :disabled))) 0 1) + :border-color (case state + :success colors/success-50-opa-20 + :error colors/danger-50-opa-20 + (colors/theme-colors colors/neutral-20 colors/neutral-80 theme)) + :background-color (case state + :empty (if blur? + colors/white-opa-5 + (colors/theme-colors colors/white colors/neutral-80-opa-40 theme)) + :disabled (if blur? + colors/white-opa-5 + (colors/theme-colors colors/neutral-5 colors/neutral-80-opa-40 theme)) + :success (colors/resolve-color :success theme 10) + :error (colors/resolve-color :danger theme 10))}) + +(defn num-container + [{:keys [blur? theme]}] + {:width 32 + :height 32 + :justify-content :center + :align-items :center + :border-radius 10 + :border-width 1 + :border-color (if blur? + colors/white-opa-10 + (colors/theme-colors colors/neutral-20 colors/neutral-70 theme))}) + +(defn text + [{:keys [theme state]}] + {:color (case state + :success (colors/theme-colors colors/success-50 colors/success-60 theme) + :error (colors/theme-colors colors/danger-50 colors/danger-60 theme))}) diff --git a/src/quo/components/list_items/quiz_item/view.cljs b/src/quo/components/list_items/quiz_item/view.cljs new file mode 100644 index 00000000000..1aef7b8347e --- /dev/null +++ b/src/quo/components/list_items/quiz_item/view.cljs @@ -0,0 +1,30 @@ +(ns quo.components.list-items.quiz-item.view + (:require + [quo.components.icon :as icon] + [quo.components.list-items.quiz-item.style :as style] + [quo.components.markdown.text :as text] + [quo.foundations.colors :as colors] + [quo.theme :as quo.theme] + [react-native.core :as rn] + [utils.i18n :as i18n])) + +(defn- view-internal + [{:keys [state theme number word] :as props}] + [rn/view {:style (style/container props)} + (if (or (= state :empty) (= state :disabled)) + [rn/view + {:style (style/num-container props) + :accessibility-label :number-container} + [text/text {:weight :semi-bold} number]] + [text/text {:style (style/text props)} + (if (= state :success) word (i18n/label :t/oops-wrong-word))]) + (when (= state :success) + [icon/icon :i/check + {:color (colors/theme-colors colors/success-50 colors/success-60 theme) + :accessibility-label :success-icon}]) + (when (= state :error) + [icon/icon :i/incorrect + {:color (colors/theme-colors colors/danger-50 colors/danger-60 theme) + :accessibility-label :error-icon}])]) + +(def view (quo.theme/with-theme view-internal)) diff --git a/src/quo/core.cljs b/src/quo/core.cljs index ff6404ba4f5..6db877dd430 100644 --- a/src/quo/core.cljs +++ b/src/quo/core.cljs @@ -80,6 +80,7 @@ quo.components.list-items.dapp.view quo.components.list-items.menu-item quo.components.list-items.preview-list.view + quo.components.list-items.quiz-item.view quo.components.list-items.saved-address.view quo.components.list-items.saved-contact-address.view quo.components.list-items.token-network.view @@ -296,15 +297,16 @@ (def account-list-card quo.components.list-items.account-list-card.view/view) (def address quo.components.list-items.address.view/view) (def channel quo.components.list-items.channel.view/view) +(def community-list-item quo.components.list-items.community.view/view) (def dapp quo.components.list-items.dapp.view/view) (def menu-item quo.components.list-items.menu-item/menu-item) (def preview-list quo.components.list-items.preview-list.view/view) -(def user-list quo.components.list-items.user-list/user-list) -(def community-list-item quo.components.list-items.community.view/view) +(def quiz-item quo.components.list-items.quiz-item.view/view) (def saved-address quo.components.list-items.saved-address.view/view) (def saved-contact-address quo.components.list-items.saved-contact-address.view/view) (def token-network quo.components.list-items.token-network.view/view) (def token-value quo.components.list-items.token-value.view/view) +(def user-list quo.components.list-items.user-list/user-list) ;;;; Loaders (def skeleton-list quo.components.loaders.skeleton-list.view/view) diff --git a/src/quo/core_spec.cljs b/src/quo/core_spec.cljs index ad872532c34..8852a132ed9 100644 --- a/src/quo/core_spec.cljs +++ b/src/quo/core_spec.cljs @@ -47,6 +47,7 @@ quo.components.list-items.channel.component-spec quo.components.list-items.community.component-spec quo.components.list-items.dapp.component-spec + quo.components.list-items.quiz-item.component-spec quo.components.list-items.saved-address.component-spec quo.components.list-items.saved-contact-address.component-spec quo.components.list-items.token-network.component-spec diff --git a/src/quo/foundations/colors.cljs b/src/quo/foundations/colors.cljs index 3d809509e12..4d1c61f71cf 100644 --- a/src/quo/foundations/colors.cljs +++ b/src/quo/foundations/colors.cljs @@ -203,6 +203,9 @@ (def danger-50-opa-30 (alpha danger-50 0.3)) (def danger-50-opa-40 (alpha danger-50 0.4)) +;;60 with transparency +(def danger-60-opa-10 (alpha danger-60 0.1)) + ;;;;Warning (def warning-50 "#FF7D46") (def warning-60 "#CC6438") diff --git a/src/status_im/contexts/preview/quo/list_items/quiz_item.cljs b/src/status_im/contexts/preview/quo/list_items/quiz_item.cljs new file mode 100644 index 00000000000..687aea9c97a --- /dev/null +++ b/src/status_im/contexts/preview/quo/list_items/quiz_item.cljs @@ -0,0 +1,28 @@ +(ns status-im.contexts.preview.quo.list-items.quiz-item + (:require [quo.core :as quo] + [reagent.core :as reagent] + [status-im.contexts.preview.quo.preview :as preview])) + +(def descriptor + [{:key :state + :type :select + :options [{:key :empty} + {:key :disabled} + {:key :success} + {:key :error}]} + {:key :blur? :type :boolean}]) + +(defn view + [] + (let [state (reagent/atom {:state :empty + :word "collapse" + :number 8 + :blur? false})] + (fn [] + [preview/preview-container + {:state state + :descriptor descriptor + :blur? (:blur? @state) + :show-blur-background? true + :blur-dark-only? true} + [quo/quiz-item @state]]))) diff --git a/src/status_im/contexts/preview/quo/main.cljs b/src/status_im/contexts/preview/quo/main.cljs index 743fef1d7f8..d83f56a2e0c 100644 --- a/src/status_im/contexts/preview/quo/main.cljs +++ b/src/status_im/contexts/preview/quo/main.cljs @@ -95,6 +95,7 @@ community-list] [status-im.contexts.preview.quo.list-items.dapp :as dapp] [status-im.contexts.preview.quo.list-items.preview-lists :as preview-lists] + [status-im.contexts.preview.quo.list-items.quiz-item :as quiz-item] [status-im.contexts.preview.quo.list-items.saved-address :as saved-address] [status-im.contexts.preview.quo.list-items.saved-contact-address :as saved-contact-address] @@ -349,6 +350,8 @@ :component dapp/preview} {:name :preview-lists :component preview-lists/view} + {:name :quiz-item + :component quiz-item/view} {:name :saved-address :component saved-address/view} {:name :saved-contact-address diff --git a/translations/en.json b/translations/en.json index 2bca9c76186..7af4a4d75e7 100644 --- a/translations/en.json +++ b/translations/en.json @@ -2445,5 +2445,6 @@ "transacation-finalised": "Transaction finalised!", "no-relevant-tokens": "No relevant tokens", "from-label": "From", - "to-label": "To" + "to-label": "To", + "oops-wrong-word": "Oops! Wrong word" } From f2c69ab9a86a1c3b5121523b9c908e69d73ed5b4 Mon Sep 17 00:00:00 2001 From: Omar Basem Date: Wed, 3 Jan 2024 15:48:04 +0400 Subject: [PATCH 05/28] Wallet: crypto max decimals (#18267) * wallet: crypto max decimals --- .../contexts/wallet/common/utils.cljs | 28 +++++++++++++++++++ .../contexts/wallet/common/utils_test.cljs | 15 ++++++++++ src/status_im/subs/wallet/wallet.cljs | 10 +++++-- 3 files changed, 50 insertions(+), 3 deletions(-) diff --git a/src/status_im/contexts/wallet/common/utils.cljs b/src/status_im/contexts/wallet/common/utils.cljs index 0bbbcfca27b..60119b80a15 100644 --- a/src/status_im/contexts/wallet/common/utils.cljs +++ b/src/status_im/contexts/wallet/common/utils.cljs @@ -37,6 +37,34 @@ (map (comp :raw-balance val)) (reduce money/add))) +(defn extract-exponent + [s] + (if-let [index (string/index-of s "e")] + (subs s (+ index 2)) + nil)) + +(defn calc-max-crypto-decimals + [value] + (let [str-representation (str value) + decimal-part (second (clojure.string/split str-representation #"\.")) + exponent (extract-exponent str-representation) + zeroes-count (count (take-while #(= \0 %) decimal-part)) + max-decimals (or exponent zeroes-count) + first-non-zero-digit (first (filter #(not (= \0 %)) decimal-part))] + (if (= \1 first-non-zero-digit) + (inc max-decimals) + max-decimals))) + +(defn get-standard-crypto-format + "For full details: https://github.com/status-im/status-mobile/issues/18225" + [{:keys [market-values-per-currency]} token-units] + (let [price (get-in market-values-per-currency [:usd :price]) + one-cent-value (if (pos? price) (/ 0.01 price) 0) + decimals-count (calc-max-crypto-decimals one-cent-value)] + (if (< token-units one-cent-value) + (str "<" (.toFixed one-cent-value decimals-count)) + (.toFixed token-units decimals-count)))) + (defn total-token-units-in-all-chains [{:keys [balances-per-chain decimals] :as _token}] (-> balances-per-chain diff --git a/src/status_im/contexts/wallet/common/utils_test.cljs b/src/status_im/contexts/wallet/common/utils_test.cljs index 4bbb654f3c3..e33aa0a15e4 100644 --- a/src/status_im/contexts/wallet/common/utils_test.cljs +++ b/src/status_im/contexts/wallet/common/utils_test.cljs @@ -16,3 +16,18 @@ (is (= (utils/get-wallet-qr wallet-singlechain) "x000"))))) + +(deftest test-extract-exponent + (testing "extract-exponent function" + (is (= (utils/extract-exponent "123.456") nil)) + (is (= (utils/extract-exponent "2.5e-2") "2")) + (is (= (utils/extract-exponent "4.567e-10") "10")))) + +(deftest test-calc-max-crypto-decimals + (testing "calc-max-crypto-decimals function" + (is (= (utils/calc-max-crypto-decimals 0.00323) 2)) + (is (= (utils/calc-max-crypto-decimals 0.00123) 3)) + (is (= (utils/calc-max-crypto-decimals 0.00000423) 5)) + (is (= (utils/calc-max-crypto-decimals 2.23e-6) 5)) + (is (= (utils/calc-max-crypto-decimals 1.13e-6) 6)))) + diff --git a/src/status_im/subs/wallet/wallet.cljs b/src/status_im/subs/wallet/wallet.cljs index 6669499401e..a9384fce668 100644 --- a/src/status_im/subs/wallet/wallet.cljs +++ b/src/status_im/subs/wallet/wallet.cljs @@ -171,7 +171,11 @@ currency (get market-values-per-currency constants/profile-default-currency)) - {:keys [change-pct-24hour]} market-values] + {:keys [change-pct-24hour]} market-values + crypto-value (utils/get-standard-crypto-format token token-units) + fiat-value (if (string/includes? crypto-value "<") + "<$0.01" + (utils/prettify-balance currency-symbol fiat-value))] {:token (:symbol token) :token-name (:name token) :state :default @@ -180,8 +184,8 @@ (neg? change-pct-24hour) :negative :else :empty) :customization-color color - :values {:crypto-value token-units - :fiat-value (utils/prettify-balance currency-symbol fiat-value)}})) + :values {:crypto-value crypto-value + :fiat-value fiat-value}})) (rf/reg-sub :wallet/account-token-values From fc591f303c295f3a1cf48e7c83158cd52d658b1e Mon Sep 17 00:00:00 2001 From: Parvesh Monu Date: Wed, 3 Jan 2024 18:24:58 +0530 Subject: [PATCH 06/28] fix unable to open add-new-contact screen if hardware button is pressed while qr scanner is open (#18296) --- src/status_im/common/scan_qr_code/view.cljs | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/src/status_im/common/scan_qr_code/view.cljs b/src/status_im/common/scan_qr_code/view.cljs index 31dffa483ef..5ee2734c23e 100644 --- a/src/status_im/common/scan_qr_code/view.cljs +++ b/src/status_im/common/scan_qr_code/view.cljs @@ -180,6 +180,11 @@ app-state-listener (.addEventListener rn/app-state "change" set-torch-off-fn)] #(.remove app-state-listener))) +(defn- navigate-back-handler + [] + (rf/dispatch [:navigate-back]) + true) + (defn f-view-internal [{:keys [title subtitle validate-fn on-success-scan error-message]}] (let [insets (safe-area/get-insets) @@ -197,15 +202,16 @@ (boolean (not-empty @qr-view-finder))) camera-ready-to-scan? (and show-camera? (not @qr-code-succeed?))] - (rn/use-effect - #(set-listener-torch-off-on-app-inactive torch?)) - (rn/use-effect (fn [] + (rn/hw-back-add-listener navigate-back-handler) + (set-listener-torch-off-on-app-inactive torch?) (when-not @camera-permission-granted? - (permissions/permission-granted? :camera - #(reset! camera-permission-granted? %) - #(reset! camera-permission-granted? false))))) + (permissions/permission-granted? + :camera + #(reset! camera-permission-granted? %) + #(reset! camera-permission-granted? false))) + #(rn/hw-back-remove-listener navigate-back-handler))) [:<> [rn/view {:style style/background}] (when camera-ready-to-scan? From 4ff5e4da8be7001d17b787eb2a4dc9c5830d0689 Mon Sep 17 00:00:00 2001 From: Ulises Manuel <90291778+ulisesmac@users.noreply.github.com> Date: Wed, 3 Jan 2024 18:41:12 -0600 Subject: [PATCH 07/28] [#17938] Collectibles per account (#18277) * Update wallet events and subs to handle collectibles per account Additionally, - Move collectibles related events to a new events namespace (`status-im.contexts.wallet.events.collectibles`). - Update tests to consider collectibles per account. * Update collectibles tab to handle a current viewing account --- .../wallet/common/collectibles_tab/view.cljs | 5 +- src/status_im/contexts/wallet/events.cljs | 124 +---------------- .../contexts/wallet/events/collectibles.cljs | 125 ++++++++++++++++++ .../contexts/wallet/events_test.cljs | 46 ++++--- src/status_im/subs/wallet/collectibles.cljs | 20 ++- src/status_im/subs/wallet/wallet.cljs | 1 - 6 files changed, 178 insertions(+), 143 deletions(-) create mode 100644 src/status_im/contexts/wallet/events/collectibles.cljs diff --git a/src/status_im/contexts/wallet/common/collectibles_tab/view.cljs b/src/status_im/contexts/wallet/common/collectibles_tab/view.cljs index e514fabd99e..d1363de92f6 100644 --- a/src/status_im/contexts/wallet/common/collectibles_tab/view.cljs +++ b/src/status_im/contexts/wallet/common/collectibles_tab/view.cljs @@ -10,7 +10,10 @@ (defn- view-internal [{:keys [theme]}] - (let [collectible-list (rf/sub [:wallet/collectibles])] + (let [specific-address (rf/sub [:wallet/current-viewing-account-address]) + collectible-list (if specific-address + (rf/sub [:wallet/collectibles-per-account specific-address]) + (rf/sub [:wallet/all-collectibles]))] (if (empty? collectible-list) [empty-tab/view {:title (i18n/label :t/no-collectibles) diff --git a/src/status_im/contexts/wallet/events.cljs b/src/status_im/contexts/wallet/events.cljs index 696d205d132..9d5e4f7840b 100644 --- a/src/status_im/contexts/wallet/events.cljs +++ b/src/status_im/contexts/wallet/events.cljs @@ -5,6 +5,7 @@ [clojure.string :as string] [react-native.background-timer :as background-timer] [status-im.common.data-store.wallet :as data-store] + [status-im.contexts.wallet.events.collectibles] [status-im.contexts.wallet.item-types :as item-types] [status-im.contexts.wallet.temp :as temp] [taoensso.timbre :as log] @@ -13,8 +14,7 @@ [utils.i18n :as i18n] [utils.money :as money] [utils.number] - [utils.re-frame :as rf] - [utils.transforms :as types])) + [utils.re-frame :as rf])) (rf/reg-event-fx :wallet/show-account-created-toast (fn [{:keys [db]} [address]] @@ -65,10 +65,7 @@ db (data-store/rpc->accounts wallet-accounts)) :fx [[:dispatch [:wallet/get-wallet-token]] - [:dispatch - [:wallet/request-collectibles - {:start-at-index 0 - :new-request? true}]] + [:dispatch [:wallet/request-collectibles {:start-at-index 0 :new-request? true}]] (when new-account? [:dispatch [:wallet/navigate-to-new-account navigate-to-account]])]}))) @@ -224,121 +221,6 @@ data)}] {:db (assoc db :wallet/networks network-data)}))) -(def collectibles-request-batch-size 1000) - -(defn displayable-collectible? - [collectible] - (let [{:keys [image-url animation-url]} (:collectible-data collectible)] - (or (not (string/blank? animation-url)) - (not (string/blank? image-url))))) - -(defn store-collectibles - [{:keys [db]} [collectibles]] - (let [stored-collectibles (get-in db [:wallet :collectibles]) - displayable-collectibles (filter displayable-collectible? collectibles)] - {:db (assoc-in db - [:wallet :collectibles] - (reduce conj displayable-collectibles stored-collectibles))})) - -(rf/reg-event-fx :wallet/store-collectibles store-collectibles) - -(defn clear-stored-collectibles - [{:keys [db]}] - {:db (update db :wallet dissoc :collectibles)}) - -(rf/reg-event-fx :wallet/clear-stored-collectibles clear-stored-collectibles) - -(defn store-last-collectible-details - [{:keys [db]} [collectible]] - {:db (assoc-in db - [:wallet :last-collectible-details] - collectible)}) - -(rf/reg-event-fx :wallet/store-last-collectible-details store-last-collectible-details) - -(def collectible-data-types - {:unique-id 0 - :header 1 - :details 2 - :community-header 3}) - -(def fetch-type - {:never-fetch 0 - :always-fetch 1 - :fetch-if-not-cached 2 - :fetch-if-cache-old 3}) - -(def max-cache-age-seconds 3600) - -(rf/reg-event-fx - :wallet/request-collectibles - (fn [{:keys [db]} [{:keys [start-at-index new-request?]}]] - (let [request-id 0 - collectibles-filter nil - data-type (collectible-data-types :header) - fetch-criteria {:fetch-type (fetch-type :fetch-if-not-cached) - :max-cache-age-seconds max-cache-age-seconds} - request-params [request-id - [(chain/chain-id db)] - (keys (get-in db [:wallet :accounts])) - collectibles-filter - start-at-index - collectibles-request-batch-size - data-type - fetch-criteria]] - {:fx [[:json-rpc/call - [{:method "wallet_getOwnedCollectiblesAsync" - :params request-params - :on-success #() - :on-error (fn [error] - (log/error "failed to request collectibles" - {:event :wallet/request-collectibles - :error error - :params request-params}))}]] - (when new-request? - [:dispatch [:wallet/clear-stored-collectibles]])]}))) - -(rf/reg-event-fx :wallet/owned-collectibles-filtering-done - (fn [_ [{:keys [message]}]] - (let [response (cske/transform-keys csk/->kebab-case-keyword - (types/json->clj message)) - {:keys [collectibles has-more offset]} response - start-at-index (+ offset (count collectibles))] - {:fx - [[:dispatch [:wallet/store-collectibles collectibles]] - (when has-more - [:dispatch - [:wallet/request-collectibles - {:start-at-index start-at-index}]])]}))) - -(rf/reg-event-fx :wallet/get-collectible-details - (fn [_ [collectible-id]] - (let [request-id 0 - collectible-id-converted (cske/transform-keys csk/->PascalCaseKeyword collectible-id) - data-type (collectible-data-types :details) - request-params [request-id [collectible-id-converted] data-type]] - {:fx [[:json-rpc/call - [{:method "wallet_getCollectiblesByUniqueIDAsync" - :params request-params - :on-error (fn [error] - (log/error "failed to request collectible" - {:event :wallet/get-collectible-details - :error error - :params request-params}))}]]]}))) - -(rf/reg-event-fx :wallet/get-collectible-details-done - (fn [_ [{:keys [message]}]] - (let [response (cske/transform-keys csk/->kebab-case-keyword - (types/json->clj message)) - {:keys [collectibles]} response - collectible (first collectibles)] - (if collectible - {:fx - [[:dispatch [:wallet/store-last-collectible-details collectible]]]} - (log/error "failed to get collectible details" - {:event :wallet/get-collectible-details-done - :response response}))))) - (rf/reg-event-fx :wallet/find-ens (fn [{:keys [db]} [input contacts chain-id cb]] (let [result (if (empty? input) diff --git a/src/status_im/contexts/wallet/events/collectibles.cljs b/src/status_im/contexts/wallet/events/collectibles.cljs new file mode 100644 index 00000000000..477f25dcc3e --- /dev/null +++ b/src/status_im/contexts/wallet/events/collectibles.cljs @@ -0,0 +1,125 @@ +(ns status-im.contexts.wallet.events.collectibles + (:require [camel-snake-kebab.core :as csk] + [camel-snake-kebab.extras :as cske] + [clojure.string :as string] + [re-frame.core :as rf] + [taoensso.timbre :as log] + [utils.ethereum.chain :as chain] + [utils.transforms :as types])) + +(def collectible-data-types + {:unique-id 0 + :header 1 + :details 2 + :community-header 3}) + +(def fetch-type + {:never-fetch 0 + :always-fetch 1 + :fetch-if-not-cached 2 + :fetch-if-cache-old 3}) + +(def max-cache-age-seconds 3600) +(def collectibles-request-batch-size 1000) + +(defn displayable-collectible? + [collectible] + (let [{:keys [image-url animation-url]} (:collectible-data collectible)] + (or (not (string/blank? animation-url)) + (not (string/blank? image-url))))) + +(defn- add-collectibles-to-accounts + [accounts collectibles] + (reduce (fn [acc {:keys [ownership] :as collectible}] + (->> ownership + (map :address) ; In ERC1155 tokens a collectible can be owned by multiple addresses. + (reduce (fn add-collectible-to-address [acc address] + (update-in acc [address :collectibles] conj collectible)) + acc))) + accounts + collectibles)) + +(defn store-collectibles + [{:keys [db]} [collectibles]] + (let [displayable-collectibles (filter displayable-collectible? collectibles)] + {:db (update-in db [:wallet :accounts] add-collectibles-to-accounts displayable-collectibles)})) + +(rf/reg-event-fx :wallet/store-collectibles store-collectibles) + +(defn clear-stored-collectibles + [{:keys [db]}] + {:db (update-in db [:wallet :accounts] update-vals #(dissoc % :collectibles))}) + +(rf/reg-event-fx :wallet/clear-stored-collectibles clear-stored-collectibles) + +(defn store-last-collectible-details + [{:keys [db]} [collectible]] + {:db (assoc-in db [:wallet :last-collectible-details] collectible)}) + +(rf/reg-event-fx :wallet/store-last-collectible-details store-last-collectible-details) + +(rf/reg-event-fx + :wallet/request-collectibles + (fn [{:keys [db]} [{:keys [start-at-index new-request?]}]] + (let [request-id 0 + collectibles-filter nil + data-type (collectible-data-types :header) + fetch-criteria {:fetch-type (fetch-type :fetch-if-not-cached) + :max-cache-age-seconds max-cache-age-seconds} + request-params [request-id + [(chain/chain-id db)] + (keys (get-in db [:wallet :accounts])) + collectibles-filter + start-at-index + collectibles-request-batch-size + data-type + fetch-criteria]] + {:fx [[:json-rpc/call + [{:method "wallet_getOwnedCollectiblesAsync" + :params request-params + :on-error (fn [error] + (log/error "failed to request collectibles" + {:event :wallet/request-collectibles + :error error + :params request-params}))}]] + (when new-request? + [:dispatch [:wallet/clear-stored-collectibles]])]}))) + +(rf/reg-event-fx + :wallet/owned-collectibles-filtering-done + (fn [_ [{:keys [message]}]] + (let [{:keys [has-more offset + collectibles]} (cske/transform-keys csk/->kebab-case-keyword (types/json->clj message)) + start-at-index (+ offset (count collectibles))] + {:fx [[:dispatch [:wallet/store-collectibles collectibles]] + (when has-more + [:dispatch [:wallet/request-collectibles {:start-at-index start-at-index}]])]}))) + +(rf/reg-event-fx + :wallet/get-collectible-details + (fn [_ [collectible-id]] + (let [request-id 0 + collectible-id-converted (cske/transform-keys csk/->PascalCaseKeyword collectible-id) + data-type (collectible-data-types :details) + request-params [request-id [collectible-id-converted] data-type]] + {:fx [[:json-rpc/call + [{:method "wallet_getCollectiblesByUniqueIDAsync" + :params request-params + :on-error (fn [error] + (log/error "failed to request collectible" + {:event :wallet/get-collectible-details + :error error + :params request-params}))}]]]}))) + +(rf/reg-event-fx + :wallet/get-collectible-details-done + (fn [_ [{:keys [message]}]] + (let [response (cske/transform-keys csk/->kebab-case-keyword + (types/json->clj message)) + {:keys [collectibles]} response + collectible (first collectibles)] + (if collectible + {:fx [[:dispatch [:wallet/store-last-collectible-details collectible]]]} + (log/error "failed to get collectible details" + {:event :wallet/get-collectible-details-done + :response response}))))) diff --git a/src/status_im/contexts/wallet/events_test.cljs b/src/status_im/contexts/wallet/events_test.cljs index cbdd2caf567..32e2b7edd2d 100644 --- a/src/status_im/contexts/wallet/events_test.cljs +++ b/src/status_im/contexts/wallet/events_test.cljs @@ -2,7 +2,8 @@ (:require [cljs.test :refer-macros [deftest is testing]] matcher-combinators.test - [status-im.contexts.wallet.events :as events])) + [status-im.contexts.wallet.events :as events] + [status-im.contexts.wallet.events.collectibles :as collectibles])) (def address "0x2f88d65f3cb52605a54a833ae118fb1363acccd2") @@ -35,27 +36,40 @@ [false {:collectible-data {:image-url nil :animation-url ""}}] [false {:collectible-data {:image-url "" :animation-url ""}}]]] (doseq [[result collection] expected-results] - (is (match? result (events/displayable-collectible? collection)))))) + (is (match? result (collectibles/displayable-collectible? collection)))))) (testing "save-collectibles-request-details" - (let [db {:wallet {}} - collectibles [{:collectible-data {:image-url "https://..." :animation-url "https://..."}} - {:collectible-data {:image-url "" :animation-url "https://..."}} - {:collectible-data {:image-url "" :animation-url nil}}] - expected-db {:wallet {:collectibles [{:collectible-data - {:image-url "https://..." :animation-url "https://..."}} - {:collectible-data - {:image-url "" :animation-url "https://..."}}]}} - effects (events/store-collectibles {:db db} [collectibles]) - result-db (:db effects)] + (let [db {:wallet {:accounts {"0x1" {} + "0x3" {}}}} + collectible-1 {:collectible-data {:image-url "https://..." :animation-url "https://..."} + :ownership [{:address "0x1" + :balance "1"}]} + collectible-2 {:collectible-data {:image-url "" :animation-url "https://..."} + :ownership [{:address "0x1" + :balance "1"}]} + collectible-3 {:collectible-data {:image-url "" :animation-url nil} + :ownership [{:address "0x2" + :balance "1"}]} + collectibles [collectible-1 collectible-2 collectible-3] + expected-db {:wallet {:accounts {"0x1" {:collectibles (list collectible-2 collectible-1)} + "0x2" {:collectibles (list collectible-3)} + "0x3" {}}}} + effects (collectibles/store-collectibles {:db db} [collectibles]) + result-db (:db effects)] (is (match? result-db expected-db))))) (deftest clear-stored-collectibles - (let [db {:wallet {:collectibles [{:id 1} {:id 2}]}}] + (let [db {:wallet {:accounts {"0x1" {:collectibles [{:id 1} {:id 2}]} + "0x2" {"some other stuff" "with any value" + :collectibles [{:id 3}]} + "0x3" {}}}}] (testing "clear-stored-collectibles" - (let [expected-db {:wallet {}} - effects (events/clear-stored-collectibles {:db db}) + (let [expected-db {:wallet {:accounts {"0x1" {} + "0x2" {"some other stuff" "with any value"} + "0x3" {}}}} + effects (collectibles/clear-stored-collectibles {:db db}) result-db (:db effects)] + (is (match? result-db expected-db)))))) (deftest store-last-collectible-details @@ -65,6 +79,6 @@ :image-url "https://..."} expected-db {:wallet {:last-collectible-details {:description "Pandaria" :image-url "https://..."}}} - effects (events/store-last-collectible-details {:db db} [last-collectible]) + effects (collectibles/store-last-collectible-details {:db db} [last-collectible]) result-db (:db effects)] (is (match? result-db expected-db))))) diff --git a/src/status_im/subs/wallet/collectibles.cljs b/src/status_im/subs/wallet/collectibles.cljs index 642996b6b73..ec1aceec7e4 100644 --- a/src/status_im/subs/wallet/collectibles.cljs +++ b/src/status_im/subs/wallet/collectibles.cljs @@ -11,12 +11,24 @@ image-url)) (re-frame/reg-sub - :wallet/collectibles + :wallet/collectibles-per-account + :<- [:wallet] + (fn [wallet [_ address]] + (as-> wallet $ + (get-in $ [:accounts address :collectibles]) + (map (fn [{:keys [collectible-data] :as collectible}] + (assoc collectible :preview-url (preview-url collectible-data))) + $)))) + +(re-frame/reg-sub + :wallet/all-collectibles :<- [:wallet] (fn [wallet] - (map (fn [collectible] - (assoc collectible :preview-url (preview-url (:collectible-data collectible)))) - (:collectibles wallet)))) + (->> wallet + :accounts + (mapcat (comp :collectibles val)) + (map (fn [{:keys [collectible-data] :as collectible}] + (assoc collectible :preview-url (preview-url collectible-data))))))) (re-frame/reg-sub :wallet/last-collectible-details diff --git a/src/status_im/subs/wallet/wallet.cljs b/src/status_im/subs/wallet/wallet.cljs index a9384fce668..e44eff87dc1 100644 --- a/src/status_im/subs/wallet/wallet.cljs +++ b/src/status_im/subs/wallet/wallet.cljs @@ -39,7 +39,6 @@ :<- [:wallet/ui] :-> :tokens-loading?) - (rf/reg-sub :wallet/current-viewing-account-address :<- [:wallet] From 85c928f862d7e14f23b4d1b135d6c2007eeadf2b Mon Sep 17 00:00:00 2001 From: Yevheniia Berdnyk Date: Wed, 3 Jan 2024 21:20:10 +0200 Subject: [PATCH 08/28] e2e: enabled tests for pinning messages --- .../critical/chats/test_1_1_public_chats.py | 30 +++++++++---------- .../tests/critical/chats/test_group_chat.py | 6 ++-- .../chats/test_public_chat_browsing.py | 2 ++ 3 files changed, 19 insertions(+), 19 deletions(-) diff --git a/test/appium/tests/critical/chats/test_1_1_public_chats.py b/test/appium/tests/critical/chats/test_1_1_public_chats.py index 071a1531df7..99ab162fa5b 100644 --- a/test/appium/tests/critical/chats/test_1_1_public_chats.py +++ b/test/appium/tests/critical/chats/test_1_1_public_chats.py @@ -174,7 +174,6 @@ def test_1_1_chat_emoji_send_reply_and_open_link(self): self.errors.verify_no_errors() - @marks.xfail(reason="Pin feature is in development", run=False) @marks.testrail_id(702731) def test_1_1_chat_pin_messages(self): self.home_1.just_fyi("Check that Device1 can pin own message in 1-1 chat") @@ -190,10 +189,10 @@ def test_1_1_chat_pin_messages(self): "messages are in Device1 profile") self.chat_2.pin_message(self.message_2, 'pin-to-chat') for chat_number, chat in enumerate([self.chat_1, self.chat_2]): - chat.pinned_messages_count.wait_for_element_text("2", + chat.pinned_messages_count.wait_for_element_text(text="2", message="Pinned messages count is not 2 as expected!") - chat.just_fyi("Check pinned message are visible in Pinned panel for user %s" % (chat_number + 1)) + chat.just_fyi("Check pinned messages are visible in Pinned panel for user %s" % (chat_number + 1)) chat.pinned_messages_count.click() for message in self.message_1, self.message_2: pinned_by = chat.pinned_messages_list.get_message_pinned_by_text(message) @@ -219,18 +218,17 @@ def test_1_1_chat_pin_messages(self): self.chat_1.send_message(message) self.chat_1.chat_element_by_text(message).wait_for_status_to_be("Delivered") self.chat_1.pin_message(message, 'pin-to-chat') - # if self.chat_1.pin_limit_popover.is_element_displayed(30): + # if not self.chat_1.pin_limit_popover.is_element_displayed(): + # self.errors.append("Pin limit popover is not displayed when pinning more than 3 messages") self.chat_1.view_pinned_messages_button.click_until_presence_of_element(self.chat_1.pinned_messages_list) - # temp solution instead of getting pin_limit_popover: if self.chat_1.pinned_messages_list.get_pinned_messages_number() > 3 \ or self.chat_1.pinned_messages_list.message_element_by_text(self.message_4).is_element_displayed(): self.errors.append("Can pin more than 3 messages in chat") else: - self.chat_1.pinned_messages_list.message_element_by_text( - self.message_2).click_inside_element_by_coordinate() + self.chat_1.pinned_messages_list.message_element_by_text(self.message_2).long_press_element() self.home_1.just_fyi("Unpin one message so that another could be pinned") - self.chat_1.element_by_translation_id('unpin-from-chat').click() - self.chat_1.chat_element_by_text(self.message_4).click() + unpin_element = self.chat_1.element_by_translation_id('unpin-from-chat') + unpin_element.click_until_absense_of_element(desired_element=unpin_element) self.chat_1.pin_message(self.message_4, 'pin-to-chat') if not (self.chat_1.chat_element_by_text(self.message_4).pinned_by_label.is_element_displayed(30) and self.chat_2.chat_element_by_text(self.message_4).pinned_by_label.is_element_displayed(30)): @@ -248,13 +246,13 @@ def test_1_1_chat_pin_messages(self): self.chat_1.view_pinned_messages_button.click_until_presence_of_element(self.chat_1.pinned_messages_list) pinned_message = self.chat_1.pinned_messages_list.message_element_by_text(self.message_4) - element = self.chat_1.element_by_translation_id("unpin-from-chat") - pinned_message.long_press_until_element_is_shown(element) - element.click_until_absense_of_element(element) - try: - self.chat_2.chat_element_by_text(self.message_4).pinned_by_label.wait_for_invisibility_of_element() - except TimeoutException: - self.errors.append("Message_4 is not unpinned!") + unpin_element = self.chat_1.element_by_translation_id("unpin-from-chat") + pinned_message.long_press_until_element_is_shown(unpin_element) + unpin_element.click_until_absense_of_element(unpin_element) + # try: + # self.chat_2.chat_element_by_text(self.message_4).pinned_by_label.wait_for_invisibility_of_element() + # except TimeoutException: + # self.errors.append("Message_4 is not unpinned!") for chat_number, chat in enumerate([self.chat_1, self.chat_2]): count = chat.pinned_messages_count.text diff --git a/test/appium/tests/critical/chats/test_group_chat.py b/test/appium/tests/critical/chats/test_group_chat.py index 1e7c4b8ba49..e8db4d6ef9a 100644 --- a/test/appium/tests/critical/chats/test_group_chat.py +++ b/test/appium/tests/critical/chats/test_group_chat.py @@ -323,7 +323,6 @@ def test_group_chat_offline_pn(self): self.errors.append('%s if not shown for device %s' % (message, str(i))) self.errors.verify_no_errors() - @marks.xfail(reason="Pin feature is in development", run=False) @marks.testrail_id(702732) def test_group_chat_pin_messages(self): [self.homes[i].navigate_back_to_home_view() for i in range(3)] @@ -371,8 +370,9 @@ def test_group_chat_pin_messages(self): self.chats[0].send_message(self.message_4) self.chats[0].pin_message(self.message_4, 'pin-to-chat') self.chats[0].view_pinned_messages_button.click_until_presence_of_element(self.chats[0].pinned_messages_list) - self.chats[0].pinned_messages_list.message_element_by_text(self.message_2).click_inside_element_by_coordinate() - self.chats[0].element_by_translation_id('unpin-from-chat').click() + self.chats[0].pinned_messages_list.message_element_by_text(self.message_2).long_press_element() + unpin_element = self.chats[0].element_by_translation_id('unpin-from-chat') + unpin_element.click_until_absense_of_element(desired_element=unpin_element) self.chats[0].chat_element_by_text(self.message_4).click() self.chats[0].pin_message(self.message_4, 'pin-to-chat') if not (self.chats[0].chat_element_by_text(self.message_4).pinned_by_label.is_element_displayed(30) and diff --git a/test/appium/tests/critical/chats/test_public_chat_browsing.py b/test/appium/tests/critical/chats/test_public_chat_browsing.py index 41ac72edaef..62df30e80cc 100644 --- a/test/appium/tests/critical/chats/test_public_chat_browsing.py +++ b/test/appium/tests/critical/chats/test_public_chat_browsing.py @@ -1070,6 +1070,8 @@ def test_community_hashtag_links_to_community_channels(self): self.errors.verify_no_errors() @marks.testrail_id(703629) + @marks.xfail( + reason="Can't join a community if admin goes offline, https://github.com/status-im/status-mobile/issues/17678") def test_community_join_when_node_owner_offline(self): for home in self.homes: home.navigate_back_to_home_view() From d64508a74acf61695c665a9df9af482f271f4f3b Mon Sep 17 00:00:00 2001 From: Siddarth Kumar Date: Thu, 4 Jan 2024 17:09:24 +0530 Subject: [PATCH 09/28] chore: convert `RNSelectableTextInput` to Kotlin (#18320) ### Summary This commit adds `Kotlin` plugin to native module `react-native-status` and converts these files to `Kotlin` : - `modules/react-native-status/android/src/main/java/im/status/ethereum/module/RNSelectableTextInputViewManager.java` - `modules/react-native-status/android/src/main/java/im/status/ethereum/module/RNSelectableTextInputModule.java` ### Platforms - Android --- .../react-native-status/android/build.gradle | 1 + .../module/RNSelectableTextInputModule.java | 78 -------------- .../module/RNSelectableTextInputModule.kt | 72 +++++++++++++ .../RNSelectableTextInputViewManager.java | 102 ------------------ .../RNSelectableTextInputViewManager.kt | 85 +++++++++++++++ 5 files changed, 158 insertions(+), 180 deletions(-) delete mode 100644 modules/react-native-status/android/src/main/java/im/status/ethereum/module/RNSelectableTextInputModule.java create mode 100644 modules/react-native-status/android/src/main/java/im/status/ethereum/module/RNSelectableTextInputModule.kt delete mode 100644 modules/react-native-status/android/src/main/java/im/status/ethereum/module/RNSelectableTextInputViewManager.java create mode 100644 modules/react-native-status/android/src/main/java/im/status/ethereum/module/RNSelectableTextInputViewManager.kt diff --git a/modules/react-native-status/android/build.gradle b/modules/react-native-status/android/build.gradle index f25a3cf7ba1..112739ce879 100644 --- a/modules/react-native-status/android/build.gradle +++ b/modules/react-native-status/android/build.gradle @@ -1,4 +1,5 @@ apply plugin: 'com.android.library' +apply plugin: "org.jetbrains.kotlin.android" def getStatusGoSHA1 = { -> def statusgoOverridePath = System.getenv("STATUS_GO_SRC_OVERRIDE") diff --git a/modules/react-native-status/android/src/main/java/im/status/ethereum/module/RNSelectableTextInputModule.java b/modules/react-native-status/android/src/main/java/im/status/ethereum/module/RNSelectableTextInputModule.java deleted file mode 100644 index dc1e8fd958b..00000000000 --- a/modules/react-native-status/android/src/main/java/im/status/ethereum/module/RNSelectableTextInputModule.java +++ /dev/null @@ -1,78 +0,0 @@ -package im.status.ethereum.module; - -import android.view.ActionMode; -import com.facebook.react.bridge.ReactApplicationContext; -import com.facebook.react.bridge.ReactContextBaseJavaModule; -import com.facebook.react.bridge.ReactMethod; -import com.facebook.react.uimanager.NativeViewHierarchyManager; -import com.facebook.react.uimanager.UIBlock; -import com.facebook.react.uimanager.UIManagerModule; -import com.facebook.react.views.textinput.ReactEditText; -import javax.annotation.Nonnull; - -class RNSelectableTextInputModule extends ReactContextBaseJavaModule { - - private ActionMode lastActionMode; - - public RNSelectableTextInputModule(ReactApplicationContext reactContext) { - super(reactContext); - } - - @Nonnull - @Override - public String getName() { - return "RNSelectableTextInputManager"; - } - - @ReactMethod - public void setupMenuItems(final Integer selectableTextViewReactTag, final Integer textInputReactTag) { - ReactApplicationContext reactContext = this.getReactApplicationContext(); - UIManagerModule uiManager = reactContext.getNativeModule(UIManagerModule.class); - uiManager.addUIBlock(new UIBlock() { - public void execute (NativeViewHierarchyManager nvhm) { - RNSelectableTextInputViewManager rnSelectableTextManager = (RNSelectableTextInputViewManager) nvhm.resolveViewManager(selectableTextViewReactTag); - ReactEditText reactTextView = (ReactEditText) nvhm.resolveView(textInputReactTag); - rnSelectableTextManager.registerSelectionListener(reactTextView); - } - }); - } - - @ReactMethod - public void startActionMode(final Integer textInputReactTag) { - ReactApplicationContext reactContext = this.getReactApplicationContext(); - UIManagerModule uiManager = reactContext.getNativeModule(UIManagerModule.class); - uiManager.addUIBlock(new UIBlock() { - public void execute (NativeViewHierarchyManager nvhm) { - ReactEditText reactTextView = (ReactEditText) nvhm.resolveView(textInputReactTag); - lastActionMode = reactTextView.startActionMode(reactTextView.getCustomSelectionActionModeCallback(), ActionMode.TYPE_FLOATING); - } - }); - } - - @ReactMethod - public void hideLastActionMode(){ - ReactApplicationContext reactContext = this.getReactApplicationContext(); - UIManagerModule uiManager = reactContext.getNativeModule(UIManagerModule.class); - uiManager.addUIBlock(new UIBlock() { - public void execute (NativeViewHierarchyManager nvhm) { - if(lastActionMode!=null){ - lastActionMode.finish(); - lastActionMode = null; - } - } - }); - } - - @ReactMethod - public void setSelection(final Integer textInputReactTag, final Integer start, final Integer end){ - ReactApplicationContext reactContext = this.getReactApplicationContext(); - UIManagerModule uiManager = reactContext.getNativeModule(UIManagerModule.class); - uiManager.addUIBlock(new UIBlock() { - public void execute (NativeViewHierarchyManager nvhm) { - ReactEditText reactTextView = (ReactEditText) nvhm.resolveView(textInputReactTag); - reactTextView.setSelection(start, end); - } - }); - } - -} diff --git a/modules/react-native-status/android/src/main/java/im/status/ethereum/module/RNSelectableTextInputModule.kt b/modules/react-native-status/android/src/main/java/im/status/ethereum/module/RNSelectableTextInputModule.kt new file mode 100644 index 00000000000..56b753ae6ec --- /dev/null +++ b/modules/react-native-status/android/src/main/java/im/status/ethereum/module/RNSelectableTextInputModule.kt @@ -0,0 +1,72 @@ +package im.status.ethereum.module + +import android.view.ActionMode +import com.facebook.react.bridge.ReactApplicationContext +import com.facebook.react.bridge.ReactContextBaseJavaModule +import com.facebook.react.bridge.ReactMethod +import com.facebook.react.uimanager.NativeViewHierarchyManager +import com.facebook.react.uimanager.UIBlock +import com.facebook.react.uimanager.UIManagerModule +import com.facebook.react.views.textinput.ReactEditText + +class RNSelectableTextInputModule(reactContext: ReactApplicationContext) : ReactContextBaseJavaModule(reactContext) { + + private var lastActionMode: ActionMode? = null + + override fun getName(): String { + return "RNSelectableTextInputManager" + } + + @ReactMethod + fun setupMenuItems(selectableTextViewReactTag: Int?, textInputReactTag: Int?) { + val reactContext = reactApplicationContext + val uiManager = reactContext.getNativeModule(UIManagerModule::class.java) + selectableTextViewReactTag?.let { selectableTag -> + textInputReactTag?.let { inputTag -> + uiManager?.addUIBlock(UIBlock { nvhm: NativeViewHierarchyManager -> + val rnSelectableTextManager = nvhm.resolveViewManager(selectableTag) as RNSelectableTextInputViewManager + val reactTextView = nvhm.resolveView(inputTag) as ReactEditText + rnSelectableTextManager.registerSelectionListener(reactTextView) + }) + } + } + } + + @ReactMethod + fun startActionMode(textInputReactTag: Int?) { + val reactContext = reactApplicationContext + val uiManager = reactContext.getNativeModule(UIManagerModule::class.java) + textInputReactTag?.let { inputTag -> + uiManager?.addUIBlock(UIBlock { nvhm: NativeViewHierarchyManager -> + val reactTextView = nvhm.resolveView(inputTag) as ReactEditText + lastActionMode = reactTextView.startActionMode(reactTextView.customSelectionActionModeCallback, ActionMode.TYPE_FLOATING) + }) + } + } + + @ReactMethod + fun hideLastActionMode() { + val reactContext = reactApplicationContext + val uiManager = reactContext.getNativeModule(UIManagerModule::class.java) + uiManager?.addUIBlock(UIBlock { _ -> + lastActionMode?.finish() + lastActionMode = null + }) + } + + @ReactMethod + fun setSelection(textInputReactTag: Int?, start: Int?, end: Int?) { + val reactContext = reactApplicationContext + val uiManager = reactContext.getNativeModule(UIManagerModule::class.java) + textInputReactTag?.let { inputTag -> + start?.let { s -> + end?.let { e -> + uiManager?.addUIBlock(UIBlock { nvhm: NativeViewHierarchyManager -> + val reactTextView = nvhm.resolveView(inputTag) as ReactEditText + reactTextView.setSelection(s, e) + }) + } + } + } + } +} diff --git a/modules/react-native-status/android/src/main/java/im/status/ethereum/module/RNSelectableTextInputViewManager.java b/modules/react-native-status/android/src/main/java/im/status/ethereum/module/RNSelectableTextInputViewManager.java deleted file mode 100644 index 1716ccdb289..00000000000 --- a/modules/react-native-status/android/src/main/java/im/status/ethereum/module/RNSelectableTextInputViewManager.java +++ /dev/null @@ -1,102 +0,0 @@ -package im.status.ethereum.module; - -import android.view.ActionMode; -import android.view.ActionMode.Callback; -import android.view.Menu; -import android.view.MenuItem; -import com.facebook.react.bridge.Arguments; -import com.facebook.react.bridge.ReactContext; -import com.facebook.react.bridge.ReadableArray; -import com.facebook.react.bridge.WritableMap; -import com.facebook.react.common.MapBuilder; -import com.facebook.react.uimanager.ThemedReactContext; -import com.facebook.react.uimanager.annotations.ReactProp; -import com.facebook.react.uimanager.events.RCTEventEmitter; -import com.facebook.react.views.textinput.ReactEditText; -import com.facebook.react.views.view.ReactViewGroup; -import com.facebook.react.views.view.ReactViewManager; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -public class RNSelectableTextInputViewManager extends ReactViewManager { - public static final String REACT_CLASS = "RNSelectableTextInput"; - private String[] _menuItems = new String[0]; - - @Override - public String getName() { - return REACT_CLASS; - } - - @Override - public ReactViewGroup createViewInstance(ThemedReactContext context) { - return new ReactViewGroup(context); - } - - @ReactProp(name = "menuItems") - public void setMenuItems(ReactViewGroup reactViewGroup, ReadableArray items) { - if(items != null) { - List result = new ArrayList(items.size()); - for (int i = 0; i < items.size(); i++) { - result.add(items.getString(i)); - } - this._menuItems = result.toArray(new String[items.size()]); - } - } - - public void registerSelectionListener(final ReactEditText view) { - view.setCustomSelectionActionModeCallback(new Callback() { - @Override - public boolean onPrepareActionMode(ActionMode mode, Menu menu) { - menu.clear(); - for (int i = 0; i < _menuItems.length; i++) { - menu.add(0, i, 0, _menuItems[i]); - } - return true; - } - - @Override - public boolean onCreateActionMode(ActionMode mode, Menu menu) { - return true; - } - - @Override - public void onDestroyActionMode(ActionMode mode) { - } - - @Override - public boolean onActionItemClicked(ActionMode mode, MenuItem item) { - int selectionStart = view.getSelectionStart(); - int selectionEnd = view.getSelectionEnd(); - String selectedText = view.getText().toString().substring(selectionStart, selectionEnd); - - // Dispatch event - onSelectNativeEvent(view, item.getItemId(), selectedText, selectionStart, selectionEnd); - - mode.finish(); - - return true; - } - - }); - } - - public void onSelectNativeEvent(ReactEditText view, int eventType, String content, int selectionStart, int selectionEnd) { - WritableMap event = Arguments.createMap(); - event.putInt("eventType", eventType); - event.putString("content", content); - event.putInt("selectionStart", selectionStart); - event.putInt("selectionEnd", selectionEnd); - - // Dispatch - ReactContext reactContext = (ReactContext) view.getContext(); - reactContext.getJSModule(RCTEventEmitter.class).receiveEvent(view.getId(), "topSelection", event); - } - - @Override - public Map getExportedCustomDirectEventTypeConstants() { - return MapBuilder.builder() - .put("topSelection", MapBuilder.of("registrationName","onSelection")) - .build(); - } -} diff --git a/modules/react-native-status/android/src/main/java/im/status/ethereum/module/RNSelectableTextInputViewManager.kt b/modules/react-native-status/android/src/main/java/im/status/ethereum/module/RNSelectableTextInputViewManager.kt new file mode 100644 index 00000000000..6ffe4f54d4f --- /dev/null +++ b/modules/react-native-status/android/src/main/java/im/status/ethereum/module/RNSelectableTextInputViewManager.kt @@ -0,0 +1,85 @@ +package im.status.ethereum.module + +import android.view.ActionMode +import android.view.Menu +import android.view.MenuItem +import com.facebook.react.bridge.Arguments +import com.facebook.react.bridge.ReactContext +import com.facebook.react.bridge.ReadableArray +import com.facebook.react.bridge.WritableMap +import com.facebook.react.common.MapBuilder +import com.facebook.react.uimanager.ThemedReactContext +import com.facebook.react.uimanager.annotations.ReactProp +import com.facebook.react.uimanager.events.RCTEventEmitter +import com.facebook.react.views.textinput.ReactEditText +import com.facebook.react.views.view.ReactViewGroup +import com.facebook.react.views.view.ReactViewManager + +class RNSelectableTextInputViewManager : ReactViewManager() { + companion object { + const val REACT_CLASS = "RNSelectableTextInput" + } + + private var _menuItems = arrayOf() + + override fun getName(): String { + return REACT_CLASS + } + + override fun createViewInstance(context: ThemedReactContext): ReactViewGroup { + return ReactViewGroup(context) + } + + @ReactProp(name = "menuItems") + fun setMenuItems(reactViewGroup: ReactViewGroup, items: ReadableArray?) { + _menuItems = items?.let { + Array(items.size()) { i -> items.getString(i) } + } ?: arrayOf() + } + + fun registerSelectionListener(view: ReactEditText) { + view.customSelectionActionModeCallback = object : ActionMode.Callback { + override fun onPrepareActionMode(mode: ActionMode, menu: Menu): Boolean { + menu.clear() + _menuItems.forEachIndexed { i, item -> + menu.add(0, i, 0, item) + } + return true + } + + override fun onCreateActionMode(mode: ActionMode, menu: Menu): Boolean { + return true + } + + override fun onDestroyActionMode(mode: ActionMode) {} + + override fun onActionItemClicked(mode: ActionMode, item: MenuItem): Boolean { + val selectionStart = view.selectionStart + val selectionEnd = view.selectionEnd + val selectedText = view.text.toString().substring(selectionStart, selectionEnd) + + onSelectNativeEvent(view, item.itemId, selectedText, selectionStart, selectionEnd) + mode.finish() + return true + } + } + } + + private fun onSelectNativeEvent(view: ReactEditText, eventType: Int, content: String, selectionStart: Int, selectionEnd: Int) { + val event: WritableMap = Arguments.createMap().apply { + putInt("eventType", eventType) + putString("content", content) + putInt("selectionStart", selectionStart) + putInt("selectionEnd", selectionEnd) + } + + val reactContext = view.context as ReactContext + reactContext.getJSModule(RCTEventEmitter::class.java).receiveEvent(view.id, "topSelection", event) + } + + override fun getExportedCustomDirectEventTypeConstants(): Map? { + return MapBuilder.builder() + .put("topSelection", MapBuilder.of("registrationName", "onSelection")) + .build() + } +} From 205962f5823587132523ebad2e8c38e890470230 Mon Sep 17 00:00:00 2001 From: Brian Sztamfater Date: Thu, 4 Jan 2024 11:58:35 -0300 Subject: [PATCH 10/28] fix: error is shown when asset is selected on select assets screen (#18326) Signed-off-by: Brian Sztamfater --- src/status_im/contexts/wallet/send/input_amount/view.cljs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/status_im/contexts/wallet/send/input_amount/view.cljs b/src/status_im/contexts/wallet/send/input_amount/view.cljs index fe7452808b7..5507959cf31 100644 --- a/src/status_im/contexts/wallet/send/input_amount/view.cljs +++ b/src/status_im/contexts/wallet/send/input_amount/view.cljs @@ -16,7 +16,11 @@ (defn- make-limit-label [{:keys [amount currency]}] - (str amount " " (string/upper-case (name currency)))) + (str amount + " " + (some-> currency + name + string/upper-case))) (def not-digits-or-dot-pattern #"[^0-9+\.]") From 5a832871fec0de8e5cb2fcf9f4385c108abcb0fd Mon Sep 17 00:00:00 2001 From: Yevheniia Berdnyk Date: Thu, 4 Jan 2024 19:14:49 +0200 Subject: [PATCH 11/28] e2e: added checks for non-token gated community channels --- .../chats/test_public_chat_browsing.py | 45 +++++++++++++++++-- 1 file changed, 41 insertions(+), 4 deletions(-) diff --git a/test/appium/tests/critical/chats/test_public_chat_browsing.py b/test/appium/tests/critical/chats/test_public_chat_browsing.py index 62df30e80cc..1f8fc336779 100644 --- a/test/appium/tests/critical/chats/test_public_chat_browsing.py +++ b/test/appium/tests/critical/chats/test_public_chat_browsing.py @@ -990,8 +990,6 @@ def test_community_leave(self): self.errors.verify_no_errors() @marks.testrail_id(702948) - @marks.xfail( - reason="Can't navigate to a channel by hashtag link, https://github.com/status-im/status-mobile/issues/18095") def test_community_hashtag_links_to_community_channels(self): for home in self.homes: home.navigate_back_to_home_view() @@ -1002,11 +1000,32 @@ def test_community_hashtag_links_to_community_channels(self): self.home_1.create_community(community_type="closed") community_name = "closed community" self.community_1.share_community(community_name, self.username_2) + self.community_1.get_to_community_channel_from_home(community_name, "general") + control_message_general_chat = "this message should be visible to the user before joining" + self.channel_1.send_message(control_message_general_chat) - self.home_2.just_fyi("Device 2 joins the community") + self.home_2.just_fyi("Device 2 checks the community channels and message inside") self.home_2.get_chat(self.username_1).click() control_message_1_1_chat = "it is just a message text" self.chat_2.send_message(control_message_1_1_chat) + self.chat_2.chat_element_by_text("https://status.app/c/").click_on_link_inside_message_body() + closed_com_channels = dogs_channel, cats_channel = "dogs", "cats" # not checking the last channel '# rules' to avoid scrolling + not_shown = list() + for chan_name in closed_com_channels: + if not self.community_2.get_channel(chan_name).is_element_displayed(): + not_shown.append(chan_name) + if not_shown: + self.errors.append("Not all channels are shown in community before joining: %s" % not_shown) + chan = self.community_2.get_channel("general") + if chan.is_element_displayed(): + chan.click() + if not self.channel_2.chat_element_by_text(control_message_general_chat).is_element_displayed(20): + self.errors.append("Message in community channel is not visible for user before join") + else: + not_shown.append("general") + + self.home_2.just_fyi("Device 2 joins the community") + self.home_2.jump_to_card_by_text(self.username_1) self.community_2.join_community(open_community=False) self.home_1.just_fyi("Device 1 accepts the community request") @@ -1021,7 +1040,6 @@ def test_community_hashtag_links_to_community_channels(self): self.home_1.activity_notification_swipe_button.click() self.home_1.close_activity_centre.click() - dogs_channel, cats_channel = "dogs", "cats" cats_message = "Where is a cat?" self.home_1.just_fyi("Device 1 sends a message in the cats channel") @@ -1084,6 +1102,16 @@ def test_community_join_when_node_owner_offline(self): self.home_1.create_community(community_type="open") community_name = "open community" self.community_1.share_community(community_name, self.username_2) + self.community_1.get_to_community_channel_from_home(community_name, "general") + control_message_general_chat = "this message should be visible to the user before joining" + self.channel_1.send_message(control_message_general_chat) + try: + self.channel_1.chat_element_by_text(control_message_general_chat).wait_for_status_to_be( + expected_status='Delivered', + timeout=60) + message_sent = True + except TimeoutException: + message_sent = False self.home_1.just_fyi("Device 1 goes offline") app_package = self.device_1.driver.current_package @@ -1103,6 +1131,15 @@ def test_community_join_when_node_owner_offline(self): self.errors.append("Toast element with the text \"%s\" doesn't appear" % exp_text) if not self.community_2.community_status_pending.is_element_displayed(): self.errors.append("Pending status is not displayed") + general_channel = self.community_2.get_channel("general") + if general_channel.is_element_displayed(): + general_channel.click() + if not self.channel_2.chat_element_by_text(control_message_general_chat).is_element_displayed(30): + self.errors.append( + "Message in community channel is not visible for user before join, it was indicated as" \ + "%s sent for the sender before he went offline" % "" if message_sent else "not") + else: + self.errors.append("Community channel is not displayed for user before join") self.community_2.toast_content_element.wait_for_invisibility_of_element(30) self.community_2.close_community_view_button.click() self.home_2.pending_communities_tab.click() From c91b4339dcc73ae0ba45380f91055b846f787d99 Mon Sep 17 00:00:00 2001 From: Ajay Sivan Date: Fri, 5 Jan 2024 15:39:58 +0530 Subject: [PATCH 12/28] Use text-combinations/page-top component in request to join sheet. (#18384) --- .../actions/accounts_selection/view.cljs | 24 ++++++------------- 1 file changed, 7 insertions(+), 17 deletions(-) diff --git a/src/status_im/contexts/communities/actions/accounts_selection/view.cljs b/src/status_im/contexts/communities/actions/accounts_selection/view.cljs index a393b71fff5..8b3ac9010ae 100644 --- a/src/status_im/contexts/communities/actions/accounts_selection/view.cljs +++ b/src/status_im/contexts/communities/actions/accounts_selection/view.cljs @@ -18,20 +18,6 @@ {:community-id id :password %}])}]) (rf/dispatch [:navigate-back])) -(defn- page-top - [{:keys [community-name logo-uri]}] - [rn/view {:style style/page-top} - [quo/text - {:size :heading-1 - :weight :semi-bold} - (i18n/label :t/request-to-join)] - [quo/context-tag - {:type :community - :size 24 - :community-logo logo-uri - :community-name community-name - :container-style {:margin-top 8}}]]) - (defn view [] (let [{id :community-id} (rf/sub [:get-screen-params]) @@ -43,9 +29,13 @@ :icon-name :i/close :on-press #(rf/dispatch [:navigate-back]) :accessibility-label :back-button}] - [page-top - {:community-name name - :logo-uri (get-in images [:thumbnail :uri])}] + [quo/page-top + {:title (i18n/label :t/request-to-join) + :description :context-tag + :context-tag {:type :community + :size 24 + :community-logo (get-in images [:thumbnail :uri]) + :community-name name}}] [gesture/scroll-view [:<> [quo/text From be2d0feda3dcad48afa72976d7e37eb786bce9f8 Mon Sep 17 00:00:00 2001 From: yqrashawn Date: Fri, 5 Jan 2024 20:08:13 +0800 Subject: [PATCH 13/28] fix: generate_profile_url crash when login (#18364) * fix: generate_profile_url.cljs$core$IFn$_invoke$arity$2 crash when login 'status_im.common.universal_links.generate_profile_url.cljs$core$IFn$_invoke$arity$2' is undefined update the function to a fixed arity function * fix: schema/=> macro for :function schema Signed-off-by: yqrashawn --------- Signed-off-by: yqrashawn --- src/schema/core.clj | 10 ++- src/status_im/common/universal_links.cljs | 35 ++++----- .../common/universal_links_test.cljs | 78 ++++++++----------- .../chat/messages/link_preview/events.cljs | 14 ++-- .../messages/link_preview/events_test.cljs | 4 +- 5 files changed, 66 insertions(+), 75 deletions(-) diff --git a/src/schema/core.clj b/src/schema/core.clj index 1a4762cee35..c85323454b4 100644 --- a/src/schema/core.clj +++ b/src/schema/core.clj @@ -5,11 +5,17 @@ in non-debug environments. `value` is first transformed via `malli.core/schema` to make sure we fail fast - and only register valid schemas." + and only register valid schemas. + + Pass raw schema `value` instead of schema instance when it's `:function` schema + https://github.com/status-im/status-mobile/pull/18364#issuecomment-1875543794" [sym value] `(if ^boolean js/goog.DEBUG (try - (malli.core/=> ~sym (malli.core/schema ~value)) + (let [schema-instance# (malli.core/schema ~value)] + (if (and (seq ~value) (= :function (first ~value))) + (malli.core/=> ~sym ~value) + (malli.core/=> ~sym schema-instance#))) (catch js/Error e# (taoensso.timbre/error "Failed to instrument function" {:symbol ~sym :error e#}) diff --git a/src/status_im/common/universal_links.cljs b/src/status_im/common/universal_links.cljs index 2658be036d9..8fe8c78c99e 100644 --- a/src/status_im/common/universal_links.cljs +++ b/src/status_im/common/universal_links.cljs @@ -200,24 +200,23 @@ (handle-url url)))) (defn generate-profile-url - ([cofx] (generate-profile-url cofx nil)) - ([{:keys [db]} [{:keys [public-key cb]}]] - (let [profile-public-key (get-in db [:profile/profile :public-key]) - profile? (or (not public-key) (= public-key profile-public-key)) - ens-name? (if profile? - (get-in db [:profile/profile :ens-name?]) - (get-in db [:contacts/contacts public-key :ens-name])) - public-key (if profile? profile-public-key public-key)] - (when public-key - {:json-rpc/call - [{:method (if ens-name? "wakuext_shareUserURLWithENS" "wakuext_shareUserURLWithData") - :params [public-key] - :on-success (fn [url] - (rf/dispatch [:universal-links/save-profile-url public-key url]) - (when (fn? cb) (cb))) - :on-error #(log/error "failed to wakuext_shareUserURLWithData" - {:error % - :public-key public-key})}]})))) + [{:keys [db]} [{:keys [public-key cb]}]] + (let [profile-public-key (get-in db [:profile/profile :public-key]) + profile? (or (not public-key) (= public-key profile-public-key)) + ens-name? (if profile? + (get-in db [:profile/profile :ens-name?]) + (get-in db [:contacts/contacts public-key :ens-name])) + public-key (if profile? profile-public-key public-key)] + (when public-key + {:json-rpc/call + [{:method (if ens-name? "wakuext_shareUserURLWithENS" "wakuext_shareUserURLWithData") + :params [public-key] + :on-success (fn [url] + (rf/dispatch [:universal-links/save-profile-url public-key url]) + (when (fn? cb) (cb))) + :on-error #(log/error "failed to wakuext_shareUserURLWithData" + {:error % + :public-key public-key})}]}))) (schema/=> generate-profile-url [:=> diff --git a/src/status_im/common/universal_links_test.cljs b/src/status_im/common/universal_links_test.cljs index b1ae8fee38f..a337395badc 100644 --- a/src/status_im/common/universal_links_test.cljs +++ b/src/status_im/common/universal_links_test.cljs @@ -5,11 +5,14 @@ [re-frame.core :as re-frame] [status-im.common.universal-links :as links])) +(def pubkey + "0x04fbce10971e1cd7253b98c7b7e54de3729ca57ce41a2bfb0d1c4e0a26f72c4b6913c3487fa1b4bb86125770f1743fb4459da05c1cbe31d938814cfaf36e252073") + (deftest handle-url-test (testing "the user is not logged in" (testing "it stores the url for later processing" - (is (= {:db {:universal-links/url "some-url"}} - (links/handle-url {:db {}} "some-url"))))) + (is (match? {:db {:universal-links/url "some-url"}} + (links/handle-url {:db {}} "some-url"))))) (testing "the user is logged in" (let [db {:profile/profile {:public-key "pk"} :app-state "active" @@ -18,9 +21,9 @@ (is (nil? (get-in (links/handle-url {:db db} "some-url") [:db :universal-links/url])))) (testing "Handle a custom string" - (is (= (get-in (links/handle-url {:db db} "https://status.app/u#statuse2e") - [:router/handle-uri :uri]) - "https://status.app/u#statuse2e")))))) + (is (match? (get-in (links/handle-url {:db db} "https://status.app/u#statuse2e") + [:router/handle-uri :uri]) + "https://status.app/u#statuse2e")))))) (deftest url-event-listener (testing "the url is not nil" @@ -28,77 +31,58 @@ (let [actual (atom nil)] (with-redefs [re-frame/dispatch #(reset! actual %)] (links/url-event-listener #js {:url "some-url"}) - (is (= [:universal-links/handle-url "some-url"] @actual)))))) + (is (match? [:universal-links/handle-url "some-url"] @actual)))))) (testing "the url is nil" (testing "it does not dispatches the url" (let [actual (atom nil)] (with-redefs [re-frame/dispatch #(reset! actual %)] (links/url-event-listener #js {}) - (is (= nil @actual))))))) + (is (match? nil @actual))))))) (deftest generate-profile-url (testing "user has ens name" (testing "it calls the ens rpc method with ens name as param" - (let [pubkey "pubkey" - db {:profile/profile {:ens-name? true :public-key pubkey}} - rst (links/generate-profile-url {:db db})] - (are [result expected] (= result expected) + (let [db {:profile/profile {:ens-name? true :public-key pubkey}} + rst (links/generate-profile-url {:db db} [])] + (are [result expected] (match? result expected) "wakuext_shareUserURLWithENS" (-> rst :json-rpc/call first :method) pubkey (-> rst :json-rpc/call first :params first))))) (testing "user has no ens name" (testing "it calls the ens rpc method with public keyas param" - (let [pubkey "pubkey" - db {:profile/profile {:public-key pubkey}} - rst (links/generate-profile-url {:db db})] - (are [result expected] (= result expected) + (let [db {:profile/profile {:public-key pubkey}} + rst (links/generate-profile-url {:db db} [])] + (are [result expected] (match? result expected) "wakuext_shareUserURLWithData" (-> rst :json-rpc/call first :method) pubkey (-> rst :json-rpc/call first :params first))))) (testing "contact has ens name" (testing "it calls the ens rpc method with ens name as param" - (let [pubkey "pubkey" - ens "ensname.eth" - db {:contacts/contacts {pubkey {:ens-name ens}}} - rst (links/generate-profile-url {:db db} [{:public-key pubkey}])] - (are [result expected] (= result expected) + (let [ens "ensname.eth" + db {:contacts/contacts {pubkey {:ens-name ens}}} + rst (links/generate-profile-url {:db db} [{:public-key pubkey}])] + (are [result expected] (match? result expected) "wakuext_shareUserURLWithENS" (-> rst :json-rpc/call first :method) pubkey (-> rst :json-rpc/call first :params first))))) (testing "contact has no ens name" (testing "it calls the ens rpc method with public keyas param" - (let [pubkey "pubkey" - db {:contacts/contacts {pubkey {:public-key pubkey}}} - rst (links/generate-profile-url {:db db} [{:public-key pubkey}])] - (are [result expected] (= result expected) + (let [db {:contacts/contacts {pubkey {:public-key pubkey}}} + rst (links/generate-profile-url {:db db} [{:public-key pubkey}])] + (are [result expected] (match? result expected) "wakuext_shareUserURLWithData" (-> rst :json-rpc/call first :method) pubkey (-> rst :json-rpc/call first :params first)))))) (deftest save-profile-url (testing "given a contact public key and profile url" (testing "it updates the contact in db" - (let [pubkey "pubkey" - url "url" - db {:contacts/contacts {pubkey {:public-key pubkey}}} - rst (links/save-profile-url {:db db} [pubkey url])] - (is (= (get-in rst [:db :contacts/contacts pubkey :universal-profile-url]) url))))) + (let [url "url" + db {:contacts/contacts {pubkey {:public-key pubkey}}} + rst (links/save-profile-url {:db db} [pubkey url])] + (is (match? (get-in rst [:db :contacts/contacts pubkey :universal-profile-url]) url))))) (testing "given a user public key and profile url" (testing "it updates the user profile in db" - (let [pubkey "pubkey" - url "url" - db {:profile/profile {:public-key pubkey}} - rst (links/save-profile-url {:db db} [pubkey url])] - (is (= (get-in rst [:db :profile/profile :universal-profile-url]) url))))) - (testing "given a invalid url" - (testing "it returns the db untouched" - (let [pubkey "pubkey" - url "url" - db {:profile/profile {:public-key pubkey}} - rst (links/save-profile-url {:db db} ["invalid pubkey" url])] - (is (= (:db rst) db))))) - (testing "given a nil as url" - (testing "it returns nil" - (let [pubkey "pubkey" - db {:profile/profile {:public-key pubkey}} - rst (links/save-profile-url {:db db} ["invalid pubkey"])] - (is (nil? rst)))))) + (let [url "url" + db {:profile/profile {:public-key pubkey}} + rst (links/save-profile-url {:db db} [pubkey url])] + (is (match? (get-in rst [:db :profile/profile :universal-profile-url]) url)))))) (deftest universal-link-test (testing "universal-link?" diff --git a/src/status_im/contexts/chat/messages/link_preview/events.cljs b/src/status_im/contexts/chat/messages/link_preview/events.cljs index cf8af4377ed..c4a705bb30c 100644 --- a/src/status_im/contexts/chat/messages/link_preview/events.cljs +++ b/src/status_im/contexts/chat/messages/link_preview/events.cljs @@ -80,9 +80,10 @@ [:cofx :schema.re-frame/cofx] [:args [:schema [:catn [:community-id [:? :string]]]]]] - [:map - [:db map?] - [:json-rpc/call :schema.common/rpc-call]]]) + [:maybe + [:map + [:db map?] + [:json-rpc/call :schema.common/rpc-call]]]]) (rf/reg-event-fx :chat.ui/fetch-community fetch-community) @@ -124,9 +125,10 @@ [:cofx :schema.re-frame/cofx] [:args [:schema [:catn [:community-id [:? :string]]]]]] - [:map - [:db map?] - [:json-rpc/call :schema.common/rpc-call]]]) + [:maybe + [:map + [:db map?] + [:json-rpc/call :schema.common/rpc-call]]]]) (rf/reg-event-fx :chat.ui/spectate-community spectate-community) diff --git a/src/status_im/contexts/chat/messages/link_preview/events_test.cljs b/src/status_im/contexts/chat/messages/link_preview/events_test.cljs index e34de49b290..e4f0564c2fb 100644 --- a/src/status_im/contexts/chat/messages/link_preview/events_test.cljs +++ b/src/status_im/contexts/chat/messages/link_preview/events_test.cljs @@ -17,11 +17,11 @@ :TryDatabase true :WaitForResponse true}]}]} (sut/fetch-community {} ["community-id"]))))) - (t/testing "with nil community id" + (t/testing "with no community id" (t/testing "do nothing" (t/is (match? nil - (sut/fetch-community {} nil)))))) + (sut/fetch-community {} [])))))) (t/deftest community-failed-to-resolve (t/testing "given a community id" From c6a780804932dbef5337cea4b48b4d5a93fb4479 Mon Sep 17 00:00:00 2001 From: Omar Basem Date: Fri, 5 Jan 2024 16:29:26 +0400 Subject: [PATCH 14/28] Wallet: Utility Tests (#18371) * Wallet: utility tests --- .../contexts/wallet/common/utils.cljs | 20 ++- .../contexts/wallet/common/utils_test.cljs | 118 ++++++++++++++++-- 2 files changed, 121 insertions(+), 17 deletions(-) diff --git a/src/status_im/contexts/wallet/common/utils.cljs b/src/status_im/contexts/wallet/common/utils.cljs index 60119b80a15..44a12d42d49 100644 --- a/src/status_im/contexts/wallet/common/utils.cljs +++ b/src/status_im/contexts/wallet/common/utils.cljs @@ -31,7 +31,7 @@ (let [path (get-derivation-path number-of-accounts)] (format-derivation-path path))) -(defn- total-raw-balance-in-all-chains +(defn total-raw-balance-in-all-chains [balances-per-chain] (->> balances-per-chain (map (comp :raw-balance val)) @@ -55,15 +55,27 @@ (inc max-decimals) max-decimals))) +(defn remove-trailing-zeroes + [num] + (let [parts (clojure.string/split (str num) #"\.")] + (str (first parts) + (if-let [decimals (second parts)] + (if (seq (clojure.string/replace decimals #"0+$" "")) + (str "." (clojure.string/replace decimals #"0+$" "")) + "") + "")))) + (defn get-standard-crypto-format "For full details: https://github.com/status-im/status-mobile/issues/18225" [{:keys [market-values-per-currency]} token-units] (let [price (get-in market-values-per-currency [:usd :price]) one-cent-value (if (pos? price) (/ 0.01 price) 0) decimals-count (calc-max-crypto-decimals one-cent-value)] - (if (< token-units one-cent-value) - (str "<" (.toFixed one-cent-value decimals-count)) - (.toFixed token-units decimals-count)))) + (if (money/equal-to token-units 0) + "0" + (if (< token-units one-cent-value) + (str "<" (remove-trailing-zeroes (.toFixed one-cent-value decimals-count))) + (remove-trailing-zeroes (.toFixed token-units decimals-count)))))) (defn total-token-units-in-all-chains [{:keys [balances-per-chain decimals] :as _token}] diff --git a/src/status_im/contexts/wallet/common/utils_test.cljs b/src/status_im/contexts/wallet/common/utils_test.cljs index e33aa0a15e4..6fa47f3c666 100644 --- a/src/status_im/contexts/wallet/common/utils_test.cljs +++ b/src/status_im/contexts/wallet/common/utils_test.cljs @@ -1,21 +1,48 @@ (ns status-im.contexts.wallet.common.utils-test (:require [cljs.test :refer [deftest is testing]] - [status-im.contexts.wallet.common.utils :as utils])) + [status-im.contexts.wallet.common.utils :as utils] + [utils.money :as money])) -(deftest test-get-wallet-qr - (testing "Test get-wallet-qr function" - (let [wallet-multichain {:wallet-type :wallet-multichain - :selected-networks [:ethereum :optimism] - :address "x000"} - wallet-singlechain {:wallet-type :wallet-singlechain - :selected-networks [:ethereum :optimism] - :address "x000"}] - (is (= (utils/get-wallet-qr wallet-multichain) - "eth:opt:x000")) +(deftest test-get-first-name + (testing "get-first-name function" + (is (= (utils/get-first-name "John Doe") "John")) + (is (= (utils/get-first-name "Jane Smith xyz") "Jane")))) + +(deftest test-prettify-balance + (testing "prettify-balance function" + (is (= (utils/prettify-balance "$" 100) "$100.00")) + (is (= (utils/prettify-balance "$" 0.5) "$0.50")) + (is (= (utils/prettify-balance "$" 0) "$0.00")) + (is (= (utils/prettify-balance "$" nil) "$0.00")) + (is (= (utils/prettify-balance "$" "invalid input") "$0.00")))) + +(deftest test-get-derivation-path + (testing "get-derivation-path function" + (is (= (utils/get-derivation-path 5) "m/44'/60'/0'/0/5")) + (is (= (utils/get-derivation-path 0) "m/44'/60'/0'/0/0")) + (is (= (utils/get-derivation-path 123) "m/44'/60'/0'/0/123")))) + +(deftest test-format-derivation-path + (testing "format-derivation-path function" + (is (= (utils/format-derivation-path "m/44'/60'/0'/0/5") "m / 44' / 60' / 0' / 0 / 5")) + (is (= (utils/format-derivation-path "m/44'/60'/0'/0/0") "m / 44' / 60' / 0' / 0 / 0")) + (is (= (utils/format-derivation-path "m/44'/60'/0'/0/123") "m / 44' / 60' / 0' / 0 / 123")))) - (is (= (utils/get-wallet-qr wallet-singlechain) - "x000"))))) + +(deftest test-get-formatted-derivation-path + (testing "get-formatted-derivation-path function" + (is (= (utils/get-formatted-derivation-path 5) "m / 44' / 60' / 0' / 0 / 5")) + (is (= (utils/get-formatted-derivation-path 0) "m / 44' / 60' / 0' / 0 / 0")) + (is (= (utils/get-formatted-derivation-path 123) "m / 44' / 60' / 0' / 0 / 123")))) + +(deftest test-total-raw-balance-in-all-chains + (testing "total-raw-balance-in-all-chains function" + (let [balances-per-chain {1 {:raw-balance (money/bignumber 100)} + 10 {:raw-balance (money/bignumber 200)} + 42161 {:raw-balance (money/bignumber 300)}}] + (is (money/equal-to (utils/total-raw-balance-in-all-chains balances-per-chain) + (money/bignumber 600)))))) (deftest test-extract-exponent (testing "extract-exponent function" @@ -31,3 +58,68 @@ (is (= (utils/calc-max-crypto-decimals 2.23e-6) 5)) (is (= (utils/calc-max-crypto-decimals 1.13e-6) 6)))) +(deftest test-get-standard-crypto-format + (testing "get-standard-crypto-format function" + (let [market-values-per-currency {:usd {:price 100}} + token-units (money/bignumber 0.005)] + (is (= (utils/get-standard-crypto-format {:market-values-per-currency market-values-per-currency} + token-units) + "0.005"))) + (let [market-values-per-currency {:usd {:price 0.005}} + token-units (money/bignumber 0.01)] + (is (= (utils/get-standard-crypto-format {:market-values-per-currency market-values-per-currency} + token-units) + "<2"))))) + +(deftest test-total-token-units-in-all-chains + (testing "total-token-units-in-all-chains function" + (let [token {:balances-per-chain {1 {:raw-balance (money/bignumber 100)} + 10 {:raw-balance (money/bignumber 200)} + 42161 {:raw-balance (money/bignumber 300)}} + :decimals 2}] + (is (money/equal-to (utils/total-token-units-in-all-chains token) 6.0))))) + +(deftest test-get-account-by-address + (testing "get-account-by-address function" + (let [accounts [{:address "0x123"} + {:address "0x456"} + {:address "0x789"}] + address-to-find "0x456"] + (is (= (utils/get-account-by-address accounts address-to-find) {:address "0x456"}))) + + (let [accounts [{:address "0x123"} + {:address "0x456"} + {:address "0x789"}] + address-to-find "0x999"] + (is (= (utils/get-account-by-address accounts address-to-find) nil))))) + +(deftest test-calculate-raw-balance + (testing "calculate-raw-balance function" + (is (= (utils/calculate-raw-balance "100000000" "8") 1.0)) + (is (= (utils/calculate-raw-balance "50000000" "8") 0.5)) + (is (= (utils/calculate-raw-balance "123456789" "2") 1234567.89)) + (is (= (utils/calculate-raw-balance "0" "4") 0.0)))) + +(deftest test-token-value-in-chain + (testing "token-value-in-chain function" + (let [token {:balances-per-chain {1 {:raw-balance (money/bignumber 100000000)} + 2 {:raw-balance (money/bignumber 50000000)} + 3 {:raw-balance (money/bignumber 123456789)}} + :decimals 8}] + (is (= (utils/token-value-in-chain token 1) 1.0))))) + + +(deftest test-get-wallet-qr + (testing "Test get-wallet-qr function" + (let [wallet-multichain {:wallet-type :wallet-multichain + :selected-networks [:ethereum :optimism] + :address "x000"} + wallet-singlechain {:wallet-type :wallet-singlechain + :selected-networks [:ethereum :optimism] + :address "x000"}] + + (is (= (utils/get-wallet-qr wallet-multichain) + "eth:opt:x000")) + + (is (= (utils/get-wallet-qr wallet-singlechain) + "x000"))))) From 4edb14bb5fe256223347ac44a503373b5ac6a96c Mon Sep 17 00:00:00 2001 From: Ajay Sivan Date: Fri, 5 Jan 2024 19:04:43 +0530 Subject: [PATCH 15/28] Communities: Share Selective Account (#18382) --- .../wallet/account_permissions/view.cljs | 5 +- .../actions/accounts_selection/view.cljs | 26 +++-- .../addresses_for_permissions/style.cljs | 21 ++-- .../addresses_for_permissions/view.cljs | 97 +++++++++++-------- .../contexts/communities/events.cljs | 4 + .../contexts/communities/overview/events.cljs | 7 +- src/status_im/subs/root.cljs | 1 + translations/en.json | 1 + 8 files changed, 99 insertions(+), 63 deletions(-) diff --git a/src/quo/components/wallet/account_permissions/view.cljs b/src/quo/components/wallet/account_permissions/view.cljs index 89496bbd276..9adc035434e 100644 --- a/src/quo/components/wallet/account_permissions/view.cljs +++ b/src/quo/components/wallet/account_permissions/view.cljs @@ -29,6 +29,7 @@ [:checked? {:optional true} [:maybe :boolean]] [:disabled? {:optional true} [:maybe :boolean]] [:on-change {:optional true} [:maybe fn?]] + [:container-style {:optional true} [:maybe :map]] [:theme :schema.common/theme]]]] :any]) @@ -58,11 +59,11 @@ (defn- view-internal [{:keys - [checked? disabled? on-change token-details keycard? theme] + [checked? disabled? on-change token-details keycard? theme container-style] {:keys [name address emoji customization-color]} :account}] [rn/view - {:style (style/container theme) + {:style (merge (style/container theme) container-style) :accessibility-label :wallet-account-permissions} [rn/view {:style style/row1} [account-avatar/view diff --git a/src/status_im/contexts/communities/actions/accounts_selection/view.cljs b/src/status_im/contexts/communities/actions/accounts_selection/view.cljs index 8b3ac9010ae..29df348ae7a 100644 --- a/src/status_im/contexts/communities/actions/accounts_selection/view.cljs +++ b/src/status_im/contexts/communities/actions/accounts_selection/view.cljs @@ -10,19 +10,29 @@ [utils.re-frame :as rf])) (defn- join-community-and-navigate-back - [id] + [id addresses-for-permissions] (rf/dispatch [:password-authentication/show {:content (fn [] [password-authentication/view])} {:label (i18n/label :t/join-open-community) :on-press #(rf/dispatch [:communities/request-to-join - {:community-id id :password %}])}]) + {:community-id id + :password % + :addresses-to-reveal addresses-for-permissions}])}]) (rf/dispatch [:navigate-back])) -(defn view +(defn f-view-internal [] (let [{id :community-id} (rf/sub [:get-screen-params]) {:keys [name color images]} (rf/sub [:communities/community id]) - accounts (rf/sub [:wallet/accounts-with-customization-color])] + accounts (rf/sub [:wallet/accounts-with-customization-color]) + addresses-for-permissions (rf/sub [:communities/addresses-for-permissions]) + selected-accounts (filter #(contains? addresses-for-permissions + (:address %)) + accounts)] + (rn/use-effect (fn [] + (rf/dispatch [:communities/set-addresses-for-permissions + (set (map :address accounts))])) + []) [rn/view {:style style/container} [quo/page-nav {:text-align :left @@ -53,7 +63,7 @@ :action :arrow :label :preview :label-props {:type :accounts - :data accounts} + :data selected-accounts} :description-props {:text (i18n/label :t/all-addresses)}} {:title (i18n/label :t/for-airdrops) :on-press #(rf/dispatch [:open-modal :airdrop-addresses @@ -77,4 +87,8 @@ :track-text (i18n/label :t/slide-to-request-to-join) :track-icon :i/face-id :customization-color color - :on-complete #(join-community-and-navigate-back id)}]]])) + :on-complete #(join-community-and-navigate-back id addresses-for-permissions)}]]])) + +(defn view + [] + [:f> f-view-internal]) diff --git a/src/status_im/contexts/communities/actions/addresses_for_permissions/style.cljs b/src/status_im/contexts/communities/actions/addresses_for_permissions/style.cljs index feb29be3716..f226945c26a 100644 --- a/src/status_im/contexts/communities/actions/addresses_for_permissions/style.cljs +++ b/src/status_im/contexts/communities/actions/addresses_for_permissions/style.cljs @@ -1,22 +1,15 @@ -(ns status-im.contexts.communities.actions.addresses-for-permissions.style - (:require [quo.foundations.colors :as colors])) +(ns status-im.contexts.communities.actions.addresses-for-permissions.style) (def container {:flex 1}) -(def account-item-container - {:font-size 30 - :border-radius 16 - :flex-direction :row - :border-width 1 - :height 56 - :padding-horizontal 12 - :align-items :center - :margin-bottom 8 - :gap 8 - :border-color colors/neutral-90}) - (def buttons {:flex-direction :row :gap 12 :padding-horizontal 20 :padding-vertical 12}) + +(def error-message + {:flex-direction :row + :gap 4 + :justify-content :center + :margin-bottom 8}) diff --git a/src/status_im/contexts/communities/actions/addresses_for_permissions/view.cljs b/src/status_im/contexts/communities/actions/addresses_for_permissions/view.cljs index 414da13b7e1..a137fab4007 100644 --- a/src/status_im/contexts/communities/actions/addresses_for_permissions/view.cljs +++ b/src/status_im/contexts/communities/actions/addresses_for_permissions/view.cljs @@ -1,55 +1,76 @@ (ns status-im.contexts.communities.actions.addresses-for-permissions.view (:require [quo.core :as quo] + [quo.foundations.colors :as colors] [react-native.core :as rn] + [reagent.core :as reagent] [status-im.common.not-implemented :as not-implemented] [status-im.contexts.communities.actions.addresses-for-permissions.style :as style] [utils.i18n :as i18n] [utils.re-frame :as rf])) (defn- account-item - [item] - [rn/view - {:style style/account-item-container} - [quo/account-avatar (assoc item :size 32)] - [rn/view - [quo/text - {:size :paragraph-1 - :weight :semi-bold} - (:name item)] - [quo/address-text - {:address (:address item) - :format :short}]]]) + [item _ _ selected-addresses] + [quo/account-permissions + {:account {:name (:name item) + :address (:address item) + :emoji (:emoji item) + :customization-color (:customization-color item)} + :token-details [] + :checked? (contains? @selected-addresses (:address item)) + :on-change (fn [checked?] + (if checked? + (swap! selected-addresses conj (:address item)) + (swap! selected-addresses disj (:address item)))) + :container-style {:margin-bottom 8}}]) (defn view [] (let [{id :community-id} (rf/sub [:get-screen-params]) {:keys [name color images]} (rf/sub [:communities/community id]) - accounts (rf/sub [:wallet/accounts-with-customization-color])] - [rn/safe-area-view {:style style/container} + accounts (rf/sub [:wallet/accounts-with-customization-color]) + selected-addresses (reagent/atom (rf/sub [:communities/addresses-for-permissions]))] + (fn [] + [rn/safe-area-view {:style style/container} + [quo/drawer-top + {:type :context-tag + :title (i18n/label :t/addresses-for-permissions) + :community-name name + :button-icon :i/info + :on-button-press not-implemented/alert + :community-logo (get-in images [:thumbnail :uri]) + :customization-color color}] - [quo/drawer-top - {:type :context-tag - :title (i18n/label :t/addresses-for-permissions) - :community-name name - :button-icon :i/info - :on-button-press not-implemented/alert - :community-logo (get-in images [:thumbnail :uri]) - :customization-color color}] + [rn/flat-list + {:render-fn account-item + :render-data selected-addresses + :content-container-style {:padding 20} + :key-fn :address + :data accounts}] - [rn/flat-list - {:render-fn account-item - :content-container-style {:padding 20} - :key-fn :address - :data accounts}] + (when (empty? @selected-addresses) + [rn/view + {:style style/error-message} + [quo/icon + :i/info + {:color colors/danger-50 + :size 16}] + [quo/text + {:size :paragraph-2 + :style {:color colors/danger-50}} + (i18n/label :t/no-addresses-selected)]]) - [rn/view {:style style/buttons} - [quo/button - {:type :grey - :container-style {:flex 1} - :on-press #(rf/dispatch [:navigate-back])} - (i18n/label :t/cancel)] - [quo/button - {:container-style {:flex 1} - :customization-color color - :on-press #(rf/dispatch [:navigate-back])} - (i18n/label :t/confirm-changes)]]])) + [rn/view {:style style/buttons} + [quo/button + {:type :grey + :container-style {:flex 1} + :on-press #(rf/dispatch [:navigate-back])} + (i18n/label :t/cancel)] + [quo/button + {:container-style {:flex 1} + :customization-color color + :disabled? (empty? @selected-addresses) + :on-press (fn [] + (rf/dispatch [:communities/set-addresses-for-permissions + @selected-addresses]) + (rf/dispatch [:navigate-back]))} + (i18n/label :t/confirm-changes)]]]))) diff --git a/src/status_im/contexts/communities/events.cljs b/src/status_im/contexts/communities/events.cljs index 50d60c78303..acc74faa0c4 100644 --- a/src/status_im/contexts/communities/events.cljs +++ b/src/status_im/contexts/communities/events.cljs @@ -184,3 +184,7 @@ :params [] :on-success #(rf/dispatch [:communities/fetched-collapsed-categories-success %]) :on-error #(log/error "failed to fetch collapsed community categories" %)}]})) + +(rf/reg-event-fx :communities/set-addresses-for-permissions + (fn [{:keys [db]} [addresses]] + {:db (assoc-in db [:communities/addresses-for-permissions] addresses)})) diff --git a/src/status_im/contexts/communities/overview/events.cljs b/src/status_im/contexts/communities/overview/events.cljs index c54308c8abe..70d3ea17eaf 100644 --- a/src/status_im/contexts/communities/overview/events.cljs +++ b/src/status_im/contexts/communities/overview/events.cljs @@ -63,9 +63,10 @@ err))}]})))) (defn request-to-join - [{:keys [db]} [{:keys [community-id password]}]] - (let [pub-key (get-in db [:profile/profile :public-key]) - addresses-to-reveal []] + [{:keys [db]} + [{:keys [community-id password addresses-to-reveal] + :or {addresses-to-reveal []}}]] + (let [pub-key (get-in db [:profile/profile :public-key])] {:fx [[:json-rpc/call [{:method "wakuext_generateJoiningCommunityRequestsForSigning" :params [pub-key community-id addresses-to-reveal] diff --git a/src/status_im/subs/root.cljs b/src/status_im/subs/root.cljs index 9802a479314..54594a61c51 100644 --- a/src/status_im/subs/root.cljs +++ b/src/status_im/subs/root.cljs @@ -145,6 +145,7 @@ (reg-root-key-sub :communities/collapsed-categories :communities/collapsed-categories) (reg-root-key-sub :communities/selected-tab :communities/selected-tab) (reg-root-key-sub :contract-communities :contract-communities) +(reg-root-key-sub :communities/addresses-for-permissions :communities/addresses-for-permissions) ;;activity center (reg-root-key-sub :activity-center :activity-center) diff --git a/translations/en.json b/translations/en.json index 7af4a4d75e7..4f8513aa728 100644 --- a/translations/en.json +++ b/translations/en.json @@ -179,6 +179,7 @@ "community-rules": "Community rules", "address-to-share": "Addresses to share", "addresses-for-permissions": "Addresses for permissions", + "no-addresses-selected": "At least 1 address must be shared with community", "confirm-changes": "Confirm changes", "airdrop-addresses": "Address for airdrops", "join-as-a-member": "Join as a Member", From 947a1ef29cfe53f7f313be3de4a6f295122ec79a Mon Sep 17 00:00:00 2001 From: Jamie Caprani Date: Fri, 5 Jan 2024 15:04:39 +0000 Subject: [PATCH 16/28] feat(wallet): add ability to send a token (#18242) --- src/quo/components/utilities/token/view.cljs | 15 +- .../components/wallet/summary_info/view.cljs | 45 +-- .../standard_auth/slide_button/view.cljs | 6 +- .../wallet/data_store.cljs} | 2 +- src/status_im/contexts/wallet/events.cljs | 2 +- .../contexts/wallet/send/events.cljs | 89 +++++- .../send/transaction_confirmation/style.cljs | 18 +- .../send/transaction_confirmation/view.cljs | 268 +++++++++--------- .../send/transaction_progress/view.cljs | 9 +- src/status_im/contexts/wallet/send/utils.cljs | 6 + .../contexts/wallet/send/utils_test.cljs | 10 + src/status_im/navigation/screens.cljs | 1 - src/status_im/subs/wallet/send.cljs | 5 + src/status_im/subs/wallet/wallet.cljs | 5 - src/utils/money.cljs | 3 - translations/en.json | 4 +- 16 files changed, 293 insertions(+), 195 deletions(-) rename src/status_im/{common/data_store/wallet.cljs => contexts/wallet/data_store.cljs} (98%) create mode 100644 src/status_im/contexts/wallet/send/utils.cljs create mode 100644 src/status_im/contexts/wallet/send/utils_test.cljs diff --git a/src/quo/components/utilities/token/view.cljs b/src/quo/components/utilities/token/view.cljs index 741aa83fe29..fb6c94e8e44 100644 --- a/src/quo/components/utilities/token/view.cljs +++ b/src/quo/components/utilities/token/view.cljs @@ -37,13 +37,14 @@ (def ^:private b64-png-image-prefix "data:image/png;base64,") (defn temp-empty-symbol - [token size] + [token size style] [rn/view - {:style (token-style {:justify-content :center - :align-items :center - :border-radius 20 - :border-width 1 - :border-color :grey} + {:style (token-style (merge {:justify-content :center + :align-items :center + :border-radius 20 + :border-width 1 + :border-color :grey} + style) size)} [quo/text {:style {:color :grey}} (some-> token @@ -73,6 +74,6 @@ [rn/image {:style (token-style style size) :source source}] - [temp-empty-symbol token size]))) + [temp-empty-symbol token size style]))) (def view (schema/instrument #'view-internal ?schema)) diff --git a/src/quo/components/wallet/summary_info/view.cljs b/src/quo/components/wallet/summary_info/view.cljs index 94a3ff97529..654ba65db39 100644 --- a/src/quo/components/wallet/summary_info/view.cljs +++ b/src/quo/components/wallet/summary_info/view.cljs @@ -2,6 +2,7 @@ (:require [quo.components.avatars.account-avatar.view :as account-avatar] [quo.components.avatars.user-avatar.view :as user-avatar] + [quo.components.avatars.wallet-user-avatar.view :as wallet-user-avatar] [quo.components.markdown.text :as text] [quo.components.wallet.summary-info.style :as style] [quo.foundations.colors :as colors] @@ -26,24 +27,29 @@ (defn networks [values theme] - (let [{:keys [ethereum optimism arbitrum]} values] + (let [{:keys [ethereum optimism arbitrum]} values + show-optimism? (pos? optimism) + show-arbitrum? (pos? arbitrum)] [rn/view {:style style/networks-container :accessibility-label :networks} - [network-amount - {:network :ethereum - :amount (str ethereum " ETH") - :divider? true - :theme theme}] - [network-amount - {:network :optimism - :amount (str optimism " ETH") - :divider? true - :theme theme}] - [network-amount - {:network :arbitrum - :amount (str arbitrum " ETH") - :theme theme}]])) + (when (pos? ethereum) + [network-amount + {:network :ethereum + :amount (str ethereum " ETH") + :divider? (or show-arbitrum? show-optimism?) + :theme theme}]) + (when show-optimism? + [network-amount + {:network :optimism + :amount (str optimism " OPT") + :divider? show-arbitrum? + :theme theme}]) + (when show-arbitrum? + [network-amount + {:network :arbitrum + :amount (str arbitrum " ARB") + :theme theme}])])) (defn- view-internal [{:keys [theme type account-props networks? values]}] @@ -51,8 +57,13 @@ {:style (style/container networks? theme)} [rn/view {:style style/info-container} - (if (= type :status-account) - [account-avatar/view account-props] + (case type + :status-account [account-avatar/view account-props] + :saved-account [wallet-user-avatar/wallet-user-avatar (assoc account-props :size :size-32)] + :account [wallet-user-avatar/wallet-user-avatar + (assoc account-props + :size :size-32 + :neutral? true)] [user-avatar/user-avatar account-props]) [rn/view {:style {:margin-left 8}} (when (not= type :account) [text/text {:weight :semi-bold} (:name account-props)]) diff --git a/src/status_im/common/standard_authentication/standard_auth/slide_button/view.cljs b/src/status_im/common/standard_authentication/standard_auth/slide_button/view.cljs index f64ae926c66..1ff8abc1384 100644 --- a/src/status_im/common/standard_authentication/standard_auth/slide_button/view.cljs +++ b/src/status_im/common/standard_authentication/standard_auth/slide_button/view.cljs @@ -25,11 +25,11 @@ size theme blur? - container-style]}] - [rn/view {:style {:flex 1}} + container-style] + :or {container-style {:flex 1}}}] + [rn/view {:style container-style} [quo/slide-button {:size size - :container-style container-style :customization-color customization-color :on-reset (when @reset-slider? #(reset! reset-slider? false)) :on-complete #(authorize/authorize {:on-close on-close diff --git a/src/status_im/common/data_store/wallet.cljs b/src/status_im/contexts/wallet/data_store.cljs similarity index 98% rename from src/status_im/common/data_store/wallet.cljs rename to src/status_im/contexts/wallet/data_store.cljs index 936a2106684..6ff91148ba4 100644 --- a/src/status_im/common/data_store/wallet.cljs +++ b/src/status_im/contexts/wallet/data_store.cljs @@ -1,4 +1,4 @@ -(ns status-im.common.data-store.wallet +(ns status-im.contexts.wallet.data-store (:require [clojure.set :as set] [clojure.string :as string] diff --git a/src/status_im/contexts/wallet/events.cljs b/src/status_im/contexts/wallet/events.cljs index 9d5e4f7840b..cf48b9f4ced 100644 --- a/src/status_im/contexts/wallet/events.cljs +++ b/src/status_im/contexts/wallet/events.cljs @@ -4,7 +4,7 @@ [camel-snake-kebab.extras :as cske] [clojure.string :as string] [react-native.background-timer :as background-timer] - [status-im.common.data-store.wallet :as data-store] + [status-im.contexts.wallet.data-store :as data-store] [status-im.contexts.wallet.events.collectibles] [status-im.contexts.wallet.item-types :as item-types] [status-im.contexts.wallet.temp :as temp] diff --git a/src/status_im/contexts/wallet/send/events.cljs b/src/status_im/contexts/wallet/send/events.cljs index f966a04c453..3b7c1b1a566 100644 --- a/src/status_im/contexts/wallet/send/events.cljs +++ b/src/status_im/contexts/wallet/send/events.cljs @@ -1,6 +1,9 @@ (ns status-im.contexts.wallet.send.events (:require + [camel-snake-kebab.core :as csk] + [camel-snake-kebab.extras :as cske] [status-im.constants :as constants] + [status-im.contexts.wallet.send.utils :as send-utils] [taoensso.timbre :as log] [utils.money :as money] [utils.number] @@ -8,6 +11,7 @@ (rf/reg-event-fx :wallet/select-address-tab (fn [{:keys [db]} [tab]] + {:db (assoc-in db [:wallet :ui :send :select-address-tab] tab)})) (rf/reg-event-fx :wallet/select-send-account-address @@ -17,10 +21,14 @@ (rf/reg-event-fx :wallet/suggested-routes-success (fn [{:keys [db]} [suggested-routes timestamp]] (when (= (get-in db [:wallet :ui :send :suggested-routes-call-timestamp]) timestamp) - {:db (-> db - (assoc-in [:wallet :ui :send :suggested-routes] suggested-routes) - (assoc-in [:wallet :ui :send :route] (first (:Best suggested-routes))) - (assoc-in [:wallet :ui :send :loading-suggested-routes?] false))}))) + (let [suggested-routes-data (cske/transform-keys csk/->kebab-case suggested-routes) + chosen-route (->> suggested-routes-data + :best + first)] + {:db (-> db + (assoc-in [:wallet :ui :send :suggested-routes] suggested-routes-data) + (assoc-in [:wallet :ui :send :route] chosen-route) + (assoc-in [:wallet :ui :send :loading-suggested-routes?] false))})))) (rf/reg-event-fx :wallet/suggested-routes-error (fn [{:keys [db]} [_error]] @@ -47,8 +55,9 @@ :fx [[:navigate-to-within-stack [:wallet-send-input-amount stack-id]]]})) (rf/reg-event-fx :wallet/send-select-amount - (fn [{:keys [db]} [{:keys [amount]}]] - {:db (assoc-in db [:wallet :ui :send :amount] amount)})) + (fn [{:keys [db]} [{:keys [amount stack-id]}]] + {:db (assoc-in db [:wallet :ui :send :amount] amount) + :fx [[:navigate-to-within-stack [:wallet-transaction-confirmation stack-id]]]})) (rf/reg-event-fx :wallet/get-suggested-routes (fn [{:keys [db now]} [amount]] @@ -59,7 +68,7 @@ token-id (:symbol token) network-preferences [] gas-rates constants/gas-rate-medium - amount-in (money/amount-in-hex amount token-decimal) + amount-in (send-utils/amount-in-hex amount token-decimal) from-address wallet-address disabled-from-chain-ids [] disabled-to-chain-ids [] @@ -88,3 +97,69 @@ {:event :wallet/get-suggested-routes :error error :params request-params}))}]}))) + +(rf/reg-event-fx :wallet/add-authorized-transaction + (fn [{:keys [db]} [transaction]] + (let [transaction-hashes (:hashes transaction) + chain-id (key (first transaction-hashes)) + tx-id (first (val (first transaction-hashes))) + transaction-detes {:status :pending + :id (:id transaction) + :chain-id chain-id}] + {:db (assoc-in db [:wallet :transactions tx-id] transaction-detes) + :fx [[:dispatch [:navigate-to :wallet-transaction-progress]]]}))) + +(defn- transaction-bridge + [{:keys [from-address to-address route]}] + (let [{:keys [from bridge-name amount-out gas-amount gas-fees]} route + {:keys [gas-price max-fee-per-gas-medium max-priority-fee-per-gas]} gas-fees] + [{:BridgeName bridge-name + :ChainID (:chain-id from) + :TransferTx {:From from-address + :To to-address + :Gas (money/to-hex gas-amount) + :GasPrice (money/to-hex (money/->wei :gwei gas-price)) + :Value amount-out + :Nonce nil + :MaxFeePerGas (money/to-hex (money/->wei :gwei max-fee-per-gas-medium)) + :MaxPriorityFeePerGas (money/to-hex (money/->wei :gwei max-priority-fee-per-gas)) + :Input "" + :Data "0x"}}])) + +(defn- multi-transaction-command + [{:keys [from-address to-address from-asset to-asset amount-out transfer-type] + :or {transfer-type constants/send-type-transfer}}] + {:fromAddress from-address + :toAddress to-address + :fromAsset from-asset + :toAsset to-asset + :fromAmount amount-out + :type transfer-type}) + +(rf/reg-event-fx :wallet/send-transaction + (fn [{:keys [db]} [sha3-pwd]] + (let [route (get-in db [:wallet :ui :send :route]) + from-address (get-in db [:wallet :current-viewing-account-address]) + to-address (get-in db [:wallet :ui :send :to-address]) + token (get-in db [:wallet :ui :send :token]) + token-id (:symbol token) + request-params [(multi-transaction-command {:from-address from-address + :to-address to-address + :from-asset token-id + :to-asset token-id + :amount-out (:amount-out route)}) + (transaction-bridge {:to-address to-address + :from-address from-address + :route route}) + sha3-pwd]] + {:json-rpc/call [{:method "wallet_createMultiTransaction" + :params request-params + :on-success (fn [result] + (rf/dispatch [:hide-bottom-sheet]) + (rf/dispatch [:wallet/add-authorized-transaction result])) + :on-error (fn [error] + (log/error "failed to send transaction" + {:event :wallet/send-transaction + :error error + :params request-params}))}]}))) + diff --git a/src/status_im/contexts/wallet/send/transaction_confirmation/style.cljs b/src/status_im/contexts/wallet/send/transaction_confirmation/style.cljs index 799e98c0fc5..3e6aac09ed5 100644 --- a/src/status_im/contexts/wallet/send/transaction_confirmation/style.cljs +++ b/src/status_im/contexts/wallet/send/transaction_confirmation/style.cljs @@ -1,13 +1,9 @@ (ns status-im.contexts.wallet.send.transaction-confirmation.style (:require [quo.foundations.colors :as colors])) -(defn container - [margin-top] - {:position :absolute - :top margin-top - :right 0 - :left 0 - :bottom 0}) +(def detail-item + {:flex 1 + :height 36}) (def content-container {:padding-top 12 @@ -29,11 +25,9 @@ :border-width 1 :border-color (colors/theme-colors colors/neutral-10 colors/neutral-90 theme)}) -(def slide-button-container - {:position :absolute - :right 20 - :left 20 - :bottom 20}) +(def details-title-container + {:padding-horizontal 20 + :padding-bottom 16}) (defn section-label [theme] diff --git a/src/status_im/contexts/wallet/send/transaction_confirmation/view.cljs b/src/status_im/contexts/wallet/send/transaction_confirmation/view.cljs index 5f8ce268cc8..fd7f852486e 100644 --- a/src/status_im/contexts/wallet/send/transaction_confirmation/view.cljs +++ b/src/status_im/contexts/wallet/send/transaction_confirmation/view.cljs @@ -1,17 +1,18 @@ (ns status-im.contexts.wallet.send.transaction-confirmation.view (:require + [legacy.status-im.utils.utils :as utils] [quo.core :as quo] [quo.theme :as quo.theme] [react-native.core :as rn] [react-native.safe-area :as safe-area] - [reagent.core :as reagent] - [status-im.common.resources :as resources] + [status-im.common.floating-button-page.view :as floating-button-page] + [status-im.common.standard-authentication.core :as standard-auth] [status-im.contexts.wallet.send.transaction-confirmation.style :as style] [utils.i18n :as i18n] [utils.re-frame :as rf])) (defn- transaction-title - [] + [{:keys [token-symbol amount account to-address]}] [rn/view {:style style/content-container} [rn/view {:style {:flex-direction :row}} [quo/text @@ -21,7 +22,8 @@ :accessibility-label :send-label} (i18n/label :t/send)] [quo/summary-tag - {:label "150 ETH" + {:token token-symbol + :label (str amount " " token-symbol) :type :token :image-source :eth}]] [rn/view @@ -34,10 +36,10 @@ :accessibility-label :send-label} (i18n/label :t/from)] [quo/summary-tag - {:label "Collectibles vault" + {:label (:name account) :type :account - :emoji "🍑" - :customization-color :purple}]] + :emoji (:emoji account) + :customization-color (:color account)}]] [rn/view {:style {:flex-direction :row :margin-top 4}} @@ -48,13 +50,11 @@ :accessibility-label :send-label} (i18n/label :t/to)] [quo/summary-tag - {:label "Mark Libot" - :type :user - :image-source (resources/get-mock-image :user-picture-male4) - :customization-color :magenta}]]]) + {:type :address + :label (utils/get-shortened-address to-address)}]]]) -(defn- transaction-from - [status-account-props theme] +(defn- user-summary + [{:keys [amount account-props theme label accessibility-label summary-type]}] [rn/view {:style {:padding-horizontal 20 :padding-bottom 16}} @@ -62,134 +62,134 @@ {:size :paragraph-2 :weight :medium :style (style/section-label theme) - :accessibility-label :summary-from-label} - (i18n/label :t/from-capitalized)] + :accessibility-label accessibility-label} + label] [quo/summary-info - {:type :status-account + {:type summary-type :networks? true - :values {:ethereum 150 - :optimism 50 - :arbitrum 25} - :account-props status-account-props}]]) - -(defn- transaction-to - [user-props theme] - [rn/view - {:style {:padding-horizontal 20 - :padding-bottom 16}} - [quo/text - {:size :paragraph-2 - :weight :medium - :style (style/section-label theme) - :accessibility-label :summary-from-label} - (i18n/label :t/to-capitalized)] - [quo/summary-info - {:type :user - :networks? true - :values {:ethereum 150 - :optimism 50 - :arbitrum 25} - :account-props user-props}]]) + :values {:ethereum amount} + :account-props account-props}]]) (defn- transaction-details - [theme] - [rn/view - {:style {:padding-horizontal 20 - :padding-bottom 16}} - [quo/text - {:size :paragraph-2 - :weight :medium - :style (style/section-label theme) - :accessibility-label :summary-from-label} - (i18n/label :t/details)] - [rn/view - {:style (style/details-container theme)} - [quo/data-item - {:container-style {:flex 1 - :height 36} - :blur? false - :description :default - :icon-right? false - :card? false - :label :none - :status :default - :size :small - :title (i18n/label :t/est-time) - :subtitle "3-5 min"}] - [quo/data-item - {:container-style {:flex 1 - :height 36} - :blur? false - :description :default - :icon-right? false - :card? false - :label :none - :status :default - :size :small - :title (i18n/label :t/max-fees) - :subtitle "€188,70"}] - [quo/data-item - {:container-style {:flex 1 - :height 36} - :blur? false - :description :default - :icon-right? false - :card? false - :label :none - :status :default - :size :small - :title (i18n/label :t/user-gets {:name "Mark"}) - :subtitle "149.99 ETH"}]]]) + [{:keys [estimated-time-min max-fees token amount to-address theme]}] + (let [currency-symbol (rf/sub [:profile/currency-symbol])] + [rn/view + {:style style/details-title-container} + [quo/text + {:size :paragraph-2 + :weight :medium + :style (style/section-label theme) + :accessibility-label :summary-from-label} + (i18n/label :t/details)] + [rn/view + {:style (style/details-container theme)} + [quo/data-item + {:container-style style/detail-item + :blur? false + :description :default + :icon-right? false + :card? false + :label :none + :status :default + :size :small + :title (i18n/label :t/est-time) + :subtitle (i18n/label :t/time-in-mins {:minutes (str estimated-time-min)})}] + [quo/data-item + {:container-style style/detail-item + :blur? false + :description :default + :icon-right? false + :card? false + :label :none + :status :default + :size :small + :title (i18n/label :t/max-fees) + :subtitle (i18n/label :t/amount-with-currency-symbol + {:amount (str max-fees) + :symbol currency-symbol})}] + [quo/data-item + {:container-style style/detail-item + :blur? false + :description :default + :icon-right? false + :card? false + :label :none + :status :default + :size :small + :title (i18n/label :t/user-gets {:name (utils/get-shortened-address to-address)}) + :subtitle (str amount " " (:symbol token))}]]])) -(defn- f-view-internal +(defn- view-internal [_] - (let [reset-slider? (reagent/atom false) - margin-top (safe-area/get-top) - biometric-auth? true - on-close #(rf/dispatch [:navigate-back-within-stack :wallet-select-asset]) - status-account-props {:customization-color :purple - :size 32 - :emoji "🍑" - :type :default - :name "Collectibles vault" - :address "0x0ah...78b"} - user-props {:full-name "M L" - :status-indicator? false - :size :small - :ring-background (resources/get-mock-image :ring) - :customization-color :blue - :name "Mark Libot" - :address "0x0ah...78b" - :status-account (merge status-account-props - {:size 16 - :name "New house" - :emoji "🍔"})}] + (let [on-close #(rf/dispatch [:navigate-back-within-stack :wallet-select-asset]) + send-transaction-data (rf/sub [:wallet/wallet-send]) + token (:token send-transaction-data) + token-symbol (:symbol token) + amount (:amount send-transaction-data) + route (:route send-transaction-data) + estimated-time-min (:estimated-time route) + max-fees "-" + to-address (:to-address send-transaction-data) + account (rf/sub [:wallet/current-viewing-account]) + account-color (:color account) + from-account-props {:customization-color account-color + :size 32 + :emoji (:emoji account) + :type :default + :name (:name account) + :address (utils/get-shortened-address (:address account))} + user-props {:full-name to-address + :address (utils/get-shortened-address to-address)}] + (prn route) + (fn [{:keys [theme]}] [rn/view {:style {:flex 1}} - [quo/gradient-cover {:customization-color :purple}] - [rn/view {:style (style/container margin-top)} - [quo/page-nav - {:icon-name :i/arrow-left - :on-press on-close - :accessibility-label :top-bar - :right-side [{:icon-name :i/advanced - :on-press (fn callback [] nil) - :accessibility-label "Advanced"}]}] - [transaction-title] - [transaction-from status-account-props theme] - [transaction-to user-props theme] - [transaction-details theme] - [rn/view {:style style/slide-button-container} - [quo/slide-button - {:size :size/s-48 - :customization-color :purple - :on-reset (when @reset-slider? #(reset! reset-slider? false)) - :on-complete #(js/alert "Not implemented yet") - :track-icon (if biometric-auth? :i/face-id :password) - :track-text (i18n/label :t/slide-to-send)}]]]]))) - -(defn view-internal - [props] - [:f> f-view-internal props]) + [floating-button-page/view + {:header [quo/page-nav + {:icon-name :i/arrow-left + :on-press on-close + :margin-top (safe-area/get-top) + :background :blur + :accessibility-label :top-bar + :right-side [{:icon-name :i/advanced + :on-press #(js/alert + "to be implemented") + :accessibility-label :advanced-options}]}] + :footer [standard-auth/slide-button + {:size :size-48 + :track-text (i18n/label :t/slide-to-send) + :container-style {:z-index 2} + :customization-color account-color + :on-auth-success #(rf/dispatch [:wallet/send-transaction %]) + :auth-button-label (i18n/label :t/confirm)}] + :gradient-cover? true + :customization-color (:color account)} + [rn/view + [transaction-title + {:token-symbol token-symbol + :amount amount + :account account + :to-address to-address}] + [user-summary + {:amount amount + :summary-type :status-account + :accessibility-label :summary-from-label + :label (i18n/label :t/from-capitalized) + :account-props from-account-props + :theme theme}] + [user-summary + {:amount amount + :summary-type :account + :accessibility-label :summary-to-label + :label (i18n/label :t/to-capitalized) + :account-props user-props + :theme theme}] + [transaction-details + {:estimated-time-min estimated-time-min + :max-fees max-fees + :token token + :amount amount + :to-address to-address + :theme theme}]]]]))) (def view (quo.theme/with-theme view-internal)) diff --git a/src/status_im/contexts/wallet/send/transaction_progress/view.cljs b/src/status_im/contexts/wallet/send/transaction_progress/view.cljs index cc940aec38c..b712c65586b 100644 --- a/src/status_im/contexts/wallet/send/transaction_progress/view.cljs +++ b/src/status_im/contexts/wallet/send/transaction_progress/view.cljs @@ -20,7 +20,10 @@ (defn view [] - (let [status (reagent/atom :sending) + (let [current-address (rf/sub [:wallet/current-viewing-account-address]) + leave-page (fn [] + (rf/dispatch [:navigate-to :wallet-accounts current-address])) + status (reagent/atom :sending) {:keys [color]} (rf/sub [:wallet/current-viewing-account])] [floating-button-page/view {:header [quo/page-nav @@ -28,11 +31,11 @@ :background :blur :icon-name :i/close :margin-top (safe-area/get-top) - :on-press #(rf/dispatch [:navigate-back]) + :on-press leave-page :accessibility-label :top-bar}] :footer [quo/button {:customization-color color - :on-press #(rf/dispatch [:navigate-back])} + :on-press leave-page} (i18n/label :t/done)] :customization-color color :gradient-cover? true} diff --git a/src/status_im/contexts/wallet/send/utils.cljs b/src/status_im/contexts/wallet/send/utils.cljs new file mode 100644 index 00000000000..adfb5e8c394 --- /dev/null +++ b/src/status_im/contexts/wallet/send/utils.cljs @@ -0,0 +1,6 @@ +(ns status-im.contexts.wallet.send.utils + (:require [utils.money :as money])) + +(defn amount-in-hex + [amount token-decimal] + (money/to-hex (money/mul (money/bignumber amount) (money/from-decimal token-decimal)))) diff --git a/src/status_im/contexts/wallet/send/utils_test.cljs b/src/status_im/contexts/wallet/send/utils_test.cljs new file mode 100644 index 00000000000..f11502b9779 --- /dev/null +++ b/src/status_im/contexts/wallet/send/utils_test.cljs @@ -0,0 +1,10 @@ +(ns status-im.contexts.wallet.send.utils-test + (:require [cljs.test :refer [deftest is testing]] + [status-im.contexts.wallet.send.utils :as utils])) + +(deftest test-amount-in-hex + (testing "Test amount-in-hex function" + (let [amount 1 + decimal 18] + (is (= (utils/amount-in-hex amount decimal) + "0xde0b6b3a7640000"))))) diff --git a/src/status_im/navigation/screens.cljs b/src/status_im/navigation/screens.cljs index 02977951e28..4c6f64c5e94 100644 --- a/src/status_im/navigation/screens.cljs +++ b/src/status_im/navigation/screens.cljs @@ -338,7 +338,6 @@ :component wallet-select-asset/view} {:name :wallet-transaction-confirmation - :options {:insets {:bottom? true}} :component wallet-transaction-confirmation/view} {:name :wallet-transaction-progress diff --git a/src/status_im/subs/wallet/send.cljs b/src/status_im/subs/wallet/send.cljs index 7cddd0f6ec8..54928416c1b 100644 --- a/src/status_im/subs/wallet/send.cljs +++ b/src/status_im/subs/wallet/send.cljs @@ -8,3 +8,8 @@ :<- [:wallet/ui] (fn [ui] (get-in ui [:send :select-address-tab]))) + +(rf/reg-sub + :wallet/wallet-send + :<- [:wallet/ui] + :-> :send) diff --git a/src/status_im/subs/wallet/wallet.cljs b/src/status_im/subs/wallet/wallet.cljs index e44eff87dc1..1feb8684b0e 100644 --- a/src/status_im/subs/wallet/wallet.cljs +++ b/src/status_im/subs/wallet/wallet.cljs @@ -29,11 +29,6 @@ :<- [:wallet] :-> :ui) -(rf/reg-sub - :wallet/wallet-send - :<- [:wallet/ui] - :-> :send) - (rf/reg-sub :wallet/tokens-loading? :<- [:wallet/ui] diff --git a/src/utils/money.cljs b/src/utils/money.cljs index b874c9f64d9..c704b991894 100644 --- a/src/utils/money.cljs +++ b/src/utils/money.cljs @@ -247,6 +247,3 @@ [:=> [:cat [:maybe :int]] [:maybe :string]]) -(defn amount-in-hex - [amount token-decimal] - (to-hex (mul (bignumber amount) (from-decimal token-decimal)))) diff --git a/translations/en.json b/translations/en.json index 4f8513aa728..cc5b19510e0 100644 --- a/translations/en.json +++ b/translations/en.json @@ -2447,5 +2447,7 @@ "no-relevant-tokens": "No relevant tokens", "from-label": "From", "to-label": "To", - "oops-wrong-word": "Oops! Wrong word" + "oops-wrong-word": "Oops! Wrong word", + "time-in-mins": "{{minutes}} min", + "amount-with-currency-symbol": "{{symbol}} {{amount}}" } From 4b3bc73239b1f87dff19b4e4aef2d41729ef6d09 Mon Sep 17 00:00:00 2001 From: Brian Sztamfater Date: Fri, 5 Jan 2024 12:38:58 -0300 Subject: [PATCH 17/28] fix: always navigate back to shell stack when closing watch account screen (#18324) Signed-off-by: Brian Sztamfater --- src/status_im/contexts/wallet/events.cljs | 10 ++-------- src/status_im/navigation/screens.cljs | 5 ++++- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/src/status_im/contexts/wallet/events.cljs b/src/status_im/contexts/wallet/events.cljs index cf48b9f4ced..aeb11628339 100644 --- a/src/status_im/contexts/wallet/events.cljs +++ b/src/status_im/contexts/wallet/events.cljs @@ -35,13 +35,7 @@ (fn [{:keys [db]} [address]] {:db (assoc-in db [:wallet :current-viewing-account-address] address) :fx [[:dispatch [:hide-bottom-sheet]] - [:dispatch-later - [{:dispatch [:navigate-back] - :ms 100} - {:dispatch [:navigate-back] - :ms 100} - {:dispatch [:navigate-to :wallet-accounts address] - :ms 300}]] + [:dispatch [:navigate-to :wallet-accounts address]] [:dispatch [:wallet/show-account-created-toast address]]]})) (rf/reg-event-fx :wallet/switch-current-viewing-account @@ -51,7 +45,7 @@ (rf/reg-event-fx :wallet/close-account-page (fn [{:keys [db]}] {:db (update db :wallet dissoc :current-viewing-account-address) - :fx [[:dispatch [:navigate-back]]]})) + :fx [[:dispatch [:pop-to-root :shell-stack]]]})) (rf/reg-event-fx :wallet/get-accounts-success diff --git a/src/status_im/navigation/screens.cljs b/src/status_im/navigation/screens.cljs index 4c6f64c5e94..1ad3a8192e0 100644 --- a/src/status_im/navigation/screens.cljs +++ b/src/status_im/navigation/screens.cljs @@ -280,7 +280,10 @@ :component emoji-picker/view} {:name :wallet-accounts - :options {:insets {:top? true}} + :options {:insets {:top? true} + :popGesture false + :hardwareBackButton {:dismissModalOnPress false + :popStackOnPress false}} :component wallet-accounts/view} {:name :wallet-edit-account From e7b92dcf25bf312999debdeb9634d4ab10783b87 Mon Sep 17 00:00:00 2001 From: Brian Sztamfater Date: Fri, 5 Jan 2024 12:55:23 -0300 Subject: [PATCH 18/28] fix: increase numbered keyboard touchable area (#18330) Signed-off-by: Brian Sztamfater --- src/quo/components/numbered_keyboard/keyboard_key/view.cljs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/quo/components/numbered_keyboard/keyboard_key/view.cljs b/src/quo/components/numbered_keyboard/keyboard_key/view.cljs index b36d4a44a08..795eb84f99a 100644 --- a/src/quo/components/numbered_keyboard/keyboard_key/view.cljs +++ b/src/quo/components/numbered_keyboard/keyboard_key/view.cljs @@ -26,6 +26,7 @@ (on-press label))) :on-press-in #(reset! pressed? true) :on-press-out #(reset! pressed? false) + :hit-slop {:top 8 :bottom 8 :left 25 :right 25} :style (style/container background-color)} (case type :key [icons/icon From 1919094b46f68b080d4117133a13053486248905 Mon Sep 17 00:00:00 2001 From: BalogunofAfrica <45393944+BalogunofAfrica@users.noreply.github.com> Date: Fri, 5 Jan 2024 17:17:51 +0100 Subject: [PATCH 19/28] fix: community buttons (#18392) --- .../actions/community_rules_list/style.cljs | 5 +- .../actions/community_rules_list/view.cljs | 3 +- .../actions/request_to_join/style.cljs | 33 ++++++----- .../actions/request_to_join/view.cljs | 56 ++++++++++--------- src/status_im/navigation/screens.cljs | 2 +- 5 files changed, 52 insertions(+), 47 deletions(-) diff --git a/src/status_im/contexts/communities/actions/community_rules_list/style.cljs b/src/status_im/contexts/communities/actions/community_rules_list/style.cljs index f656d64b7a4..3428630a762 100644 --- a/src/status_im/contexts/communities/actions/community_rules_list/style.cljs +++ b/src/status_im/contexts/communities/actions/community_rules_list/style.cljs @@ -7,8 +7,7 @@ :margin-top 16}) (def community-rule-index - {:margin-left 5}) + {:margin-left 4}) (def community-rule-text - {:margin-left 6 - :flex 1}) + {:flex 1}) diff --git a/src/status_im/contexts/communities/actions/community_rules_list/view.cljs b/src/status_im/contexts/communities/actions/community_rules_list/view.cljs index 722f076defb..b26fba10be8 100644 --- a/src/status_im/contexts/communities/actions/community_rules_list/view.cljs +++ b/src/status_im/contexts/communities/actions/community_rules_list/view.cljs @@ -44,9 +44,10 @@ (str title ": " content)]]) (defn view - [rules] + [rules scroll-enabled?] [rn/flat-list {:shows-horizontal-scroll-indicator false + :scroll-enabled scroll-enabled? :data rules :separator [rn/view {:margin-top 1}] :render-fn community-rule-item}]) diff --git a/src/status_im/contexts/communities/actions/request_to_join/style.cljs b/src/status_im/contexts/communities/actions/request_to_join/style.cljs index a235d901746..9b32861e045 100644 --- a/src/status_im/contexts/communities/actions/request_to_join/style.cljs +++ b/src/status_im/contexts/communities/actions/request_to_join/style.cljs @@ -11,32 +11,31 @@ :align-items :center :justify-content :space-between}) -(def request-icon - {:height 32 - :width 32 - :align-items :center - :background-color colors/white - :border-color colors/neutral-20 - :border-width 1 - :border-radius 8 - :display :flex - :justify-content :center}) +(def container + {:flex 1}) + +(def community-icon + {:margin-right :auto :margin-top 4}) (def cancel-button {:flex 1 :margin-right 12}) -(defn bottom-container - [] - {:padding-top 32 - :flex-direction :row - :align-items :center - :justify-content :space-evenly}) +(def bottom-container + {:padding-top 32 + :flex-direction :row + :align-items :center + :margin-horizontal 20 + :justify-content :space-evenly}) (def final-disclaimer-container - {:margin-top 12 + {:margin-bottom 7 + :margin-top 12 :padding-horizontal 40}) (def final-disclaimer-text {:color colors/neutral-50 :text-align :center}) + +(def rules-text + {:margin-top 24}) diff --git a/src/status_im/contexts/communities/actions/request_to_join/view.cljs b/src/status_im/contexts/communities/actions/request_to_join/view.cljs index f79040b1755..3dfde1dc901 100644 --- a/src/status_im/contexts/communities/actions/request_to_join/view.cljs +++ b/src/status_im/contexts/communities/actions/request_to_join/view.cljs @@ -1,6 +1,8 @@ (ns status-im.contexts.communities.actions.request-to-join.view (:require [quo.core :as quo] + [quo.foundations.colors :as colors] + [quo.theme] [react-native.core :as rn] [react-native.gesture :as gesture] [status-im.common.password-authentication.view :as password-authentication] @@ -18,14 +20,15 @@ {:community-id id :password %}])}]) (rf/dispatch [:navigate-back])) -(defn request-to-join - [] +(defn- view-internal + [{:keys [theme]}] (fn [] (let [{:keys [name id - images]} (rf/sub [:get-screen-params])] - [rn/view {:flex 1} - [gesture/scroll-view {:style {:flex 1}} + images]} (rf/sub [:get-screen-params]) + {:keys [color]} (rf/sub [:communities/community id])] + [rn/safe-area-view {:flex 1} + [gesture/scroll-view {:style style/container} [rn/view style/page-container [rn/view {:style style/title-container} [quo/text @@ -33,33 +36,36 @@ :weight :semi-bold :size :heading-2} (i18n/label :t/request-to-join)]] - [rn/view {:style {:margin-right :auto :margin-top 8}} + [rn/view {:style style/community-icon} [quo/context-tag {:type :community :size 24 :community-logo (:thumbnail images) :community-name name}]] [quo/text - {:style {:margin-top 24} + {:style style/rules-text :accessibility-label :communities-rules-title :weight :semi-bold :size :paragraph-1} (i18n/label :t/community-rules)] - [community-rules/view community-rules/standard-rules] - [rn/view {:style (style/bottom-container)} - [quo/button - {:accessibility-label :cancel - :on-press #(rf/dispatch [:navigate-back]) - :type :grey - :container-style style/cancel-button} - (i18n/label :t/cancel)] - [quo/button - {:accessibility-label :join-community-button - :on-press #(join-community-and-navigate-back id) - :container-style {:flex 1}} - (i18n/label :t/request-to-join)]] - [rn/view {:style style/final-disclaimer-container} - [quo/text - {:size :paragraph-2 - :style style/final-disclaimer-text} - (i18n/label :t/request-to-join-disclaimer)]]]]]))) + [community-rules/view community-rules/standard-rules false]]] + [rn/view {:style style/bottom-container} + [quo/button + {:accessibility-label :cancel + :on-press #(rf/dispatch [:navigate-back]) + :type :grey + :container-style style/cancel-button} + (i18n/label :t/cancel)] + [quo/button + {:accessibility-label :join-community-button + :on-press #(join-community-and-navigate-back id) + :container-style {:flex 1} + :inner-style {:background-color (colors/resolve-color color theme)}} + (i18n/label :t/request-to-join)]] + [rn/view {:style style/final-disclaimer-container} + [quo/text + {:size :paragraph-2 + :style style/final-disclaimer-text} + (i18n/label :t/request-to-join-disclaimer)]]]))) + +(def view (quo.theme/with-theme view-internal)) diff --git a/src/status_im/navigation/screens.cljs b/src/status_im/navigation/screens.cljs index 1ad3a8192e0..c80c9ec81d5 100644 --- a/src/status_im/navigation/screens.cljs +++ b/src/status_im/navigation/screens.cljs @@ -97,7 +97,7 @@ {:name :community-requests-to-join :options {:sheet? true} - :component join-menu/request-to-join} + :component join-menu/view} {:name :community-account-selection :options {:sheet? true} From fc72ba6a1eda46395063f3cdba67ddddf9b4472b Mon Sep 17 00:00:00 2001 From: Brian Sztamfater Date: Fri, 5 Jan 2024 14:11:11 -0300 Subject: [PATCH 20/28] fix: fix height on account card component (#18329) Signed-off-by: Brian Sztamfater --- src/quo/components/wallet/account_card/style.cljs | 5 +++-- src/quo/components/wallet/account_card/view.cljs | 6 ++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/quo/components/wallet/account_card/style.cljs b/src/quo/components/wallet/account_card/style.cljs index a65ad4dddc4..bcfb1018ef6 100644 --- a/src/quo/components/wallet/account_card/style.cljs +++ b/src/quo/components/wallet/account_card/style.cljs @@ -11,8 +11,9 @@ colors/white)) (defn card - [{:keys [customization-color type theme pressed?]}] - {:width 162 + [{:keys [customization-color type theme pressed? metrics?]}] + {:width 161 + :height (if metrics? 88 68) :background-color (when (not= :watch-only type) (colors/theme-colors (colors/resolve-color customization-color diff --git a/src/quo/components/wallet/account_card/view.cljs b/src/quo/components/wallet/account_card/view.cljs index ed2b819fd96..652438b9781 100644 --- a/src/quo/components/wallet/account_card/view.cljs +++ b/src/quo/components/wallet/account_card/view.cljs @@ -21,7 +21,8 @@ :style (style/card {:customization-color customization-color :type type :theme theme - :pressed? false})} + :pressed? false + :metrics? metrics?})} [rn/view {:style style/loader-container} [rn/view {:style (assoc (style/loader-view {:width 16 @@ -113,7 +114,8 @@ :style (style/card {:customization-color customization-color :type type :theme theme - :pressed? @pressed?}) + :pressed? @pressed? + :metrics? metrics?}) :on-press on-press} (when (and customization-color (and (not watch-only?) (not missing-keypair?))) [customization-colors/overlay From 9c62e63035827cd5db9a1594bd9d75fcd4dbc5ff Mon Sep 17 00:00:00 2001 From: Jamie Caprani Date: Fri, 5 Jan 2024 17:39:01 +0000 Subject: [PATCH 21/28] chore: organise chats context (#18373) --- src/legacy/status_im/chat/models/loading.cljs | 2 +- src/legacy/status_im/chat/models/message.cljs | 6 ++-- .../status_im/chat/models/message_test.cljs | 2 +- src/legacy/status_im/contact/block.cljs | 2 +- .../ui/screens/chat/message/legacy_view.cljs | 4 +-- .../screens/link_previews_settings/views.cljs | 2 +- src/status_im/common/signals/events.cljs | 4 +-- src/status_im/contexts/chat/events.cljs | 12 +++---- .../chat/{ => home}/new_chat/styles.cljs | 2 +- .../chat/{ => home}/new_chat/view.cljs | 4 +-- .../chat/{ => messenger}/camera/style.cljs | 2 +- .../chat/{ => messenger}/camera/view.cljs | 4 +-- .../composer/actions/style.cljs | 4 +-- .../composer/actions/view.cljs | 6 ++-- .../{ => messenger}/composer/constants.cljs | 2 +- .../{ => messenger}/composer/edit/style.cljs | 2 +- .../{ => messenger}/composer/edit/view.cljs | 8 ++--- .../{ => messenger}/composer/effects.cljs | 8 ++--- .../chat/{ => messenger}/composer/events.cljs | 6 ++-- .../{ => messenger}/composer/gesture.cljs | 6 ++-- .../composer/gradients/style.cljs | 4 +-- .../composer/gradients/view.cljs | 4 +-- .../{ => messenger}/composer/handlers.cljs | 10 +++--- .../composer/images/style.cljs | 4 +-- .../{ => messenger}/composer/images/view.cljs | 6 ++-- .../{ => messenger}/composer/keyboard.cljs | 4 +-- .../composer/link_preview/events.cljs | 2 +- .../composer/link_preview/events_test.cljs | 4 +-- .../composer/link_preview/style.cljs | 4 +-- .../composer/link_preview/view.cljs | 8 ++--- .../composer/mentions/style.cljs | 4 +-- .../composer/mentions/view.cljs | 6 ++-- .../{ => messenger}/composer/reply/style.cljs | 2 +- .../{ => messenger}/composer/reply/view.cljs | 8 ++--- .../{ => messenger}/composer/selection.cljs | 2 +- .../chat/{ => messenger}/composer/style.cljs | 4 +-- .../{ => messenger}/composer/sub_view.cljs | 4 +-- .../chat/{ => messenger}/composer/utils.cljs | 6 ++-- .../chat/{ => messenger}/composer/view.cljs | 34 +++++++++---------- .../{ => messenger}/lightbox/animations.cljs | 2 +- .../{ => messenger}/lightbox/bottom_view.cljs | 10 +++--- .../{ => messenger}/lightbox/constants.cljs | 2 +- .../{ => messenger}/lightbox/effects.cljs | 2 +- .../chat/{ => messenger}/lightbox/events.cljs | 4 +-- .../chat/{ => messenger}/lightbox/style.cljs | 4 +-- .../lightbox/text_sheet/style.cljs | 4 +-- .../lightbox/text_sheet/utils.cljs | 4 +-- .../lightbox/text_sheet/view.cljs | 10 +++--- .../{ => messenger}/lightbox/top_view.cljs | 8 ++--- .../chat/{ => messenger}/lightbox/utils.cljs | 8 ++--- .../chat/{ => messenger}/lightbox/view.cljs | 16 ++++----- .../lightbox/zoomable_image/constants.cljs | 2 +- .../lightbox/zoomable_image/style.cljs | 2 +- .../lightbox/zoomable_image/utils.cljs | 6 ++-- .../lightbox/zoomable_image/view.cljs | 10 +++--- .../menus/pinned_messages/style.cljs | 2 +- .../menus/pinned_messages/view.cljs | 6 ++-- .../{ => messenger}/messages/avatar/view.cljs | 2 +- .../{ => messenger}/messages/constants.cljs | 2 +- .../contact_requests/bottom_drawer/style.cljs | 2 +- .../contact_requests/bottom_drawer/view.cljs | 4 +-- .../messages/content/album/style.cljs | 2 +- .../messages/content/album/view.cljs | 8 ++--- .../content/audio/component_spec.cljs | 4 +-- .../messages/content/audio/style.cljs | 2 +- .../messages/content/audio/view.cljs | 4 +-- .../messages/content/deleted/view.cljs | 2 +- .../messages/content/image/view.cljs | 4 +-- .../messages/content/link_preview/view.cljs | 2 +- .../content/link_preview/view_test.cljs | 4 +-- .../messages/content/pin/style.cljs | 2 +- .../messages/content/pin/view.cljs | 6 ++-- .../messages/content/reactions/events.cljs | 2 +- .../messages/content/reactions/view.cljs | 4 +-- .../messages/content/status/style.cljs | 2 +- .../messages/content/status/view.cljs | 4 +-- .../messages/content/style.cljs | 2 +- .../messages/content/system/text/view.cljs | 2 +- .../messages/content/text/style.cljs | 2 +- .../messages/content/text/view.cljs | 6 ++-- .../messages/content/unknown/view.cljs | 2 +- .../messages/content/view.cljs | 30 ++++++++-------- .../messages/delete_message/events.cljs | 4 +-- .../messages/delete_message/events_test.cljs | 4 +-- .../delete_message_for_me/events.cljs | 4 +-- .../delete_message_for_me/events_test.cljs | 4 +-- .../messages/drawers/style.cljs | 2 +- .../messages/drawers/view.cljs | 6 ++-- .../messages/link_preview/events.cljs | 2 +- .../messages/link_preview/events_test.cljs | 4 +-- .../messages/link_preview/style.cljs | 2 +- .../messages/link_preview/view.cljs | 6 ++-- .../{ => messenger}/messages/list/events.cljs | 2 +- .../messages/list/events_test.cljs | 4 +-- .../{ => messenger}/messages/list/state.cljs | 2 +- .../{ => messenger}/messages/list/style.cljs | 4 +-- .../{ => messenger}/messages/list/view.cljs | 12 +++---- .../messages/navigation/style.cljs | 2 +- .../messages/navigation/view.cljs | 8 ++--- .../messages/pin/banner/style.cljs | 4 +-- .../messages/pin/banner/view.cljs | 4 +-- .../{ => messenger}/messages/pin/events.cljs | 6 ++-- .../messages/pin/events_test.cljs | 4 +-- .../messages/resolver/message_resolver.cljs | 2 +- .../resolver/message_resolver_test.cljs | 4 +-- .../messages/transport/events.cljs | 6 ++-- .../chat/{ => messenger}/messages/view.cljs | 12 +++---- .../photo_selector/album_selector/style.cljs | 2 +- .../photo_selector/album_selector/view.cljs | 4 +-- .../photo_selector/effects.cljs | 2 +- .../photo_selector/events.cljs | 4 +-- .../{ => messenger}/photo_selector/style.cljs | 2 +- .../{ => messenger}/photo_selector/view.cljs | 6 ++-- .../{ => messenger}/placeholder/style.cljs | 2 +- .../{ => messenger}/placeholder/view.cljs | 4 +-- .../contexts/profile/login/events.cljs | 2 +- .../components/floating_screens/view.cljs | 2 +- .../components/switcher_cards/view.cljs | 2 +- src/status_im/core_spec.cljs | 2 +- src/status_im/events.cljs | 4 +-- src/status_im/navigation/screens.cljs | 10 +++--- src/status_im/subs/chats.cljs | 2 +- src/status_im/subs/messages.cljs | 4 +-- 123 files changed, 292 insertions(+), 292 deletions(-) rename src/status_im/contexts/chat/{ => home}/new_chat/styles.cljs (91%) rename src/status_im/contexts/chat/{ => home}/new_chat/view.cljs (97%) rename src/status_im/contexts/chat/{ => messenger}/camera/style.cljs (98%) rename src/status_im/contexts/chat/{ => messenger}/camera/view.cljs (98%) rename src/status_im/contexts/chat/{ => messenger}/composer/actions/style.cljs (85%) rename src/status_im/contexts/chat/{ => messenger}/composer/actions/view.cljs (98%) rename src/status_im/contexts/chat/{ => messenger}/composer/constants.cljs (96%) rename src/status_im/contexts/chat/{ => messenger}/composer/edit/style.cljs (86%) rename src/status_im/contexts/chat/{ => messenger}/composer/edit/view.cljs (84%) rename src/status_im/contexts/chat/{ => messenger}/composer/effects.cljs (97%) rename src/status_im/contexts/chat/{ => messenger}/composer/events.cljs (97%) rename src/status_im/contexts/chat/{ => messenger}/composer/gesture.cljs (96%) rename src/status_im/contexts/chat/{ => messenger}/composer/gradients/style.cljs (89%) rename src/status_im/contexts/chat/{ => messenger}/composer/gradients/view.cljs (87%) rename src/status_im/contexts/chat/{ => messenger}/composer/handlers.cljs (96%) rename src/status_im/contexts/chat/{ => messenger}/composer/images/style.cljs (85%) rename src/status_im/contexts/chat/{ => messenger}/composer/images/view.cljs (90%) rename src/status_im/contexts/chat/{ => messenger}/composer/keyboard.cljs (97%) rename src/status_im/contexts/chat/{ => messenger}/composer/link_preview/events.cljs (98%) rename src/status_im/contexts/chat/{ => messenger}/composer/link_preview/events_test.cljs (98%) rename src/status_im/contexts/chat/{ => messenger}/composer/link_preview/style.cljs (71%) rename src/status_im/contexts/chat/{ => messenger}/composer/link_preview/view.cljs (85%) rename src/status_im/contexts/chat/{ => messenger}/composer/mentions/style.cljs (85%) rename src/status_im/contexts/chat/{ => messenger}/composer/mentions/view.cljs (93%) rename src/status_im/contexts/chat/{ => messenger}/composer/reply/style.cljs (94%) rename src/status_im/contexts/chat/{ => messenger}/composer/reply/view.cljs (95%) rename src/status_im/contexts/chat/{ => messenger}/composer/selection.cljs (98%) rename src/status_im/contexts/chat/{ => messenger}/composer/style.cljs (96%) rename src/status_im/contexts/chat/{ => messenger}/composer/sub_view.cljs (94%) rename src/status_im/contexts/chat/{ => messenger}/composer/utils.cljs (97%) rename src/status_im/contexts/chat/{ => messenger}/composer/view.cljs (88%) rename src/status_im/contexts/chat/{ => messenger}/lightbox/animations.cljs (92%) rename src/status_im/contexts/chat/{ => messenger}/lightbox/bottom_view.cljs (91%) rename src/status_im/contexts/chat/{ => messenger}/lightbox/constants.cljs (89%) rename src/status_im/contexts/chat/{ => messenger}/lightbox/effects.cljs (94%) rename src/status_im/contexts/chat/{ => messenger}/lightbox/events.cljs (86%) rename src/status_im/contexts/chat/{ => messenger}/lightbox/style.cljs (96%) rename src/status_im/contexts/chat/{ => messenger}/lightbox/text_sheet/style.cljs (93%) rename src/status_im/contexts/chat/{ => messenger}/lightbox/text_sheet/utils.cljs (96%) rename src/status_im/contexts/chat/{ => messenger}/lightbox/text_sheet/view.cljs (92%) rename src/status_im/contexts/chat/{ => messenger}/lightbox/top_view.cljs (95%) rename src/status_im/contexts/chat/{ => messenger}/lightbox/utils.cljs (96%) rename src/status_im/contexts/chat/{ => messenger}/lightbox/view.cljs (92%) rename src/status_im/contexts/chat/{ => messenger}/lightbox/zoomable_image/constants.cljs (79%) rename src/status_im/contexts/chat/{ => messenger}/lightbox/zoomable_image/style.cljs (94%) rename src/status_im/contexts/chat/{ => messenger}/lightbox/zoomable_image/utils.cljs (97%) rename src/status_im/contexts/chat/{ => messenger}/lightbox/zoomable_image/view.cljs (97%) rename src/status_im/contexts/chat/{ => messenger}/menus/pinned_messages/style.cljs (95%) rename src/status_im/contexts/chat/{ => messenger}/menus/pinned_messages/view.cljs (93%) rename src/status_im/contexts/chat/{ => messenger}/messages/avatar/view.cljs (92%) rename src/status_im/contexts/chat/{ => messenger}/messages/constants.cljs (90%) rename src/status_im/contexts/chat/{ => messenger}/messages/contact_requests/bottom_drawer/style.cljs (50%) rename src/status_im/contexts/chat/{ => messenger}/messages/contact_requests/bottom_drawer/view.cljs (90%) rename src/status_im/contexts/chat/{ => messenger}/messages/content/album/style.cljs (93%) rename src/status_im/contexts/chat/{ => messenger}/messages/content/album/view.cljs (92%) rename src/status_im/contexts/chat/{ => messenger}/messages/content/audio/component_spec.cljs (92%) rename src/status_im/contexts/chat/{ => messenger}/messages/content/audio/style.cljs (93%) rename src/status_im/contexts/chat/{ => messenger}/messages/content/audio/view.cljs (98%) rename src/status_im/contexts/chat/{ => messenger}/messages/content/deleted/view.cljs (98%) rename src/status_im/contexts/chat/{ => messenger}/messages/content/image/view.cljs (95%) rename src/status_im/contexts/chat/{ => messenger}/messages/content/link_preview/view.cljs (91%) rename src/status_im/contexts/chat/{ => messenger}/messages/content/link_preview/view_test.cljs (67%) rename src/status_im/contexts/chat/{ => messenger}/messages/content/pin/style.cljs (94%) rename src/status_im/contexts/chat/{ => messenger}/messages/content/pin/view.cljs (86%) rename src/status_im/contexts/chat/{ => messenger}/messages/content/reactions/events.cljs (98%) rename src/status_im/contexts/chat/{ => messenger}/messages/content/reactions/view.cljs (95%) rename src/status_im/contexts/chat/{ => messenger}/messages/content/status/style.cljs (79%) rename src/status_im/contexts/chat/{ => messenger}/messages/content/status/view.cljs (80%) rename src/status_im/contexts/chat/{ => messenger}/messages/content/style.cljs (92%) rename src/status_im/contexts/chat/{ => messenger}/messages/content/system/text/view.cljs (77%) rename src/status_im/contexts/chat/{ => messenger}/messages/content/text/style.cljs (94%) rename src/status_im/contexts/chat/{ => messenger}/messages/content/text/view.cljs (95%) rename src/status_im/contexts/chat/{ => messenger}/messages/content/unknown/view.cljs (76%) rename src/status_im/contexts/chat/{ => messenger}/messages/content/view.cljs (90%) rename src/status_im/contexts/chat/{ => messenger}/messages/delete_message/events.cljs (98%) rename src/status_im/contexts/chat/{ => messenger}/messages/delete_message/events_test.cljs (97%) rename src/status_im/contexts/chat/{ => messenger}/messages/delete_message_for_me/events.cljs (97%) rename src/status_im/contexts/chat/{ => messenger}/messages/delete_message_for_me/events_test.cljs (97%) rename src/status_im/contexts/chat/{ => messenger}/messages/drawers/style.cljs (89%) rename src/status_im/contexts/chat/{ => messenger}/messages/drawers/view.cljs (98%) rename src/status_im/contexts/chat/{ => messenger}/messages/link_preview/events.cljs (99%) rename src/status_im/contexts/chat/{ => messenger}/messages/link_preview/events_test.cljs (97%) rename src/status_im/contexts/chat/{ => messenger}/messages/link_preview/style.cljs (96%) rename src/status_im/contexts/chat/{ => messenger}/messages/link_preview/view.cljs (96%) rename src/status_im/contexts/chat/{ => messenger}/messages/list/events.cljs (99%) rename src/status_im/contexts/chat/{ => messenger}/messages/list/events_test.cljs (98%) rename src/status_im/contexts/chat/{ => messenger}/messages/list/state.cljs (81%) rename src/status_im/contexts/chat/{ => messenger}/messages/list/style.cljs (89%) rename src/status_im/contexts/chat/{ => messenger}/messages/list/view.cljs (97%) rename src/status_im/contexts/chat/{ => messenger}/messages/navigation/style.cljs (95%) rename src/status_im/contexts/chat/{ => messenger}/messages/navigation/view.cljs (95%) rename src/status_im/contexts/chat/{ => messenger}/messages/pin/banner/style.cljs (71%) rename src/status_im/contexts/chat/{ => messenger}/messages/pin/banner/view.cljs (88%) rename src/status_im/contexts/chat/{ => messenger}/messages/pin/events.cljs (96%) rename src/status_im/contexts/chat/{ => messenger}/messages/pin/events_test.cljs (93%) rename src/status_im/contexts/chat/{ => messenger}/messages/resolver/message_resolver.cljs (87%) rename src/status_im/contexts/chat/{ => messenger}/messages/resolver/message_resolver_test.cljs (82%) rename src/status_im/contexts/chat/{ => messenger}/messages/transport/events.cljs (98%) rename src/status_im/contexts/chat/{ => messenger}/messages/view.cljs (85%) rename src/status_im/contexts/chat/{ => messenger}/photo_selector/album_selector/style.cljs (93%) rename src/status_im/contexts/chat/{ => messenger}/photo_selector/album_selector/view.cljs (96%) rename src/status_im/contexts/chat/{ => messenger}/photo_selector/effects.cljs (98%) rename src/status_im/contexts/chat/{ => messenger}/photo_selector/events.cljs (95%) rename src/status_im/contexts/chat/{ => messenger}/photo_selector/style.cljs (97%) rename src/status_im/contexts/chat/{ => messenger}/photo_selector/view.cljs (96%) rename src/status_im/contexts/chat/{ => messenger}/placeholder/style.cljs (89%) rename src/status_im/contexts/chat/{ => messenger}/placeholder/view.cljs (84%) diff --git a/src/legacy/status_im/chat/models/loading.cljs b/src/legacy/status_im/chat/models/loading.cljs index 43878c0a48b..e98a6220a85 100644 --- a/src/legacy/status_im/chat/models/loading.cljs +++ b/src/legacy/status_im/chat/models/loading.cljs @@ -4,7 +4,7 @@ [legacy.status-im.data-store.messages :as data-store.messages] [re-frame.core :as re-frame] [status-im.constants :as constants] - [status-im.contexts.chat.messages.list.events :as message-list] + [status-im.contexts.chat.messenger.messages.list.events :as message-list] [taoensso.timbre :as log] [utils.re-frame :as rf])) diff --git a/src/legacy/status_im/chat/models/message.cljs b/src/legacy/status_im/chat/models/message.cljs index 19ac79e78d9..8031c9beb89 100644 --- a/src/legacy/status_im/chat/models/message.cljs +++ b/src/legacy/status_im/chat/models/message.cljs @@ -6,9 +6,9 @@ [legacy.status-im.utils.deprecated-types :as types] [re-frame.core :as re-frame] [react-native.platform :as platform] - [status-im.contexts.chat.messages.delete-message.events :as delete-message] - [status-im.contexts.chat.messages.list.events :as message-list] - [status-im.contexts.chat.messages.list.state :as view.state] + [status-im.contexts.chat.messenger.messages.delete-message.events :as delete-message] + [status-im.contexts.chat.messenger.messages.list.events :as message-list] + [status-im.contexts.chat.messenger.messages.list.state :as view.state] [utils.re-frame :as rf])) (defn- message-loaded? diff --git a/src/legacy/status_im/chat/models/message_test.cljs b/src/legacy/status_im/chat/models/message_test.cljs index d2049f4c3c3..dd0f994c76c 100644 --- a/src/legacy/status_im/chat/models/message_test.cljs +++ b/src/legacy/status_im/chat/models/message_test.cljs @@ -3,7 +3,7 @@ [cljs.test :refer-macros [deftest is testing]] [legacy.status-im.chat.models.loading :as loading] [legacy.status-im.chat.models.message :as message] - [status-im.contexts.chat.messages.list.state :as list.state])) + [status-im.contexts.chat.messenger.messages.list.state :as list.state])) (deftest add-received-message-test (with-redefs [message/add-message #(identity %1)] diff --git a/src/legacy/status_im/contact/block.cljs b/src/legacy/status_im/contact/block.cljs index 613ff26467d..7b130377cf4 100644 --- a/src/legacy/status_im/contact/block.cljs +++ b/src/legacy/status_im/contact/block.cljs @@ -5,7 +5,7 @@ [legacy.status-im.utils.deprecated-types :as types] [re-frame.core :as re-frame] [status-im.contexts.chat.contacts.events :as contacts-store] - [status-im.contexts.chat.messages.list.events :as message-list] + [status-im.contexts.chat.messenger.messages.list.events :as message-list] [status-im.contexts.shell.activity-center.events :as activity-center] [status-im.navigation.events :as navigation] [utils.re-frame :as rf])) diff --git a/src/legacy/status_im/ui/screens/chat/message/legacy_view.cljs b/src/legacy/status_im/ui/screens/chat/message/legacy_view.cljs index cd35bd4ee58..55df7b578b9 100644 --- a/src/legacy/status_im/ui/screens/chat/message/legacy_view.cljs +++ b/src/legacy/status_im/ui/screens/chat/message/legacy_view.cljs @@ -9,8 +9,8 @@ [quo.foundations.typography :as typography] [react-native.core :as rn] [status-im.constants :as constants] - [status-im.contexts.chat.messages.delete-message-for-me.events] - [status-im.contexts.chat.messages.delete-message.events] + [status-im.contexts.chat.messenger.messages.delete-message-for-me.events] + [status-im.contexts.chat.messenger.messages.delete-message.events] [utils.i18n :as i18n] [utils.re-frame :as rf]) (:require-macros [legacy.status-im.utils.views :refer [defview letsubs]])) diff --git a/src/legacy/status_im/ui/screens/link_previews_settings/views.cljs b/src/legacy/status_im/ui/screens/link_previews_settings/views.cljs index a1efcafa57a..ba3961fe6f2 100644 --- a/src/legacy/status_im/ui/screens/link_previews_settings/views.cljs +++ b/src/legacy/status_im/ui/screens/link_previews_settings/views.cljs @@ -8,7 +8,7 @@ [legacy.status-im.ui.components.react :as react] [legacy.status-im.ui.screens.link-previews-settings.styles :as styles] [re-frame.core :as re-frame] - [status-im.contexts.chat.messages.link-preview.events] + [status-im.contexts.chat.messenger.messages.link-preview.events] [utils.i18n :as i18n])) (defn prepare-urls-items-data diff --git a/src/status_im/common/signals/events.cljs b/src/status_im/common/signals/events.cljs index 18599b2b4f8..a0099996837 100644 --- a/src/status_im/common/signals/events.cljs +++ b/src/status_im/common/signals/events.cljs @@ -5,8 +5,8 @@ [legacy.status-im.mailserver.core :as mailserver] [legacy.status-im.visibility-status-updates.core :as visibility-status-updates] [status-im.common.pairing.events :as pairing] - [status-im.contexts.chat.messages.link-preview.events :as link-preview] - [status-im.contexts.chat.messages.transport.events :as messages.transport] + [status-im.contexts.chat.messenger.messages.link-preview.events :as link-preview] + [status-im.contexts.chat.messenger.messages.transport.events :as messages.transport] [status-im.contexts.communities.discover.events] [status-im.contexts.profile.login.events :as profile.login] [status-im.contexts.profile.push-notifications.local.events :as local-notifications] diff --git a/src/status_im/contexts/chat/events.cljs b/src/status_im/contexts/chat/events.cljs index b66ea731a84..42fe059c8a6 100644 --- a/src/status_im/contexts/chat/events.cljs +++ b/src/status_im/contexts/chat/events.cljs @@ -7,14 +7,14 @@ [reagent.core :as reagent] [status-im.common.muting.helpers :refer [format-mute-till]] [status-im.constants :as constants] - [status-im.contexts.chat.composer.link-preview.events :as link-preview] [status-im.contexts.chat.contacts.events :as contacts-store] status-im.contexts.chat.effects - status-im.contexts.chat.lightbox.events - status-im.contexts.chat.messages.content.reactions.events - [status-im.contexts.chat.messages.delete-message-for-me.events :as delete-for-me] - [status-im.contexts.chat.messages.delete-message.events :as delete-message] - [status-im.contexts.chat.messages.list.state :as chat.state] + [status-im.contexts.chat.messenger.composer.link-preview.events :as link-preview] + status-im.contexts.chat.messenger.lightbox.events + status-im.contexts.chat.messenger.messages.content.reactions.events + [status-im.contexts.chat.messenger.messages.delete-message-for-me.events :as delete-for-me] + [status-im.contexts.chat.messenger.messages.delete-message.events :as delete-message] + [status-im.contexts.chat.messenger.messages.list.state :as chat.state] [status-im.navigation.events :as navigation] [taoensso.timbre :as log] [utils.datetime :as datetime] diff --git a/src/status_im/contexts/chat/new_chat/styles.cljs b/src/status_im/contexts/chat/home/new_chat/styles.cljs similarity index 91% rename from src/status_im/contexts/chat/new_chat/styles.cljs rename to src/status_im/contexts/chat/home/new_chat/styles.cljs index 2697d939382..89ed5aab11c 100644 --- a/src/status_im/contexts/chat/new_chat/styles.cljs +++ b/src/status_im/contexts/chat/home/new_chat/styles.cljs @@ -1,4 +1,4 @@ -(ns status-im.contexts.chat.new-chat.styles +(ns status-im.contexts.chat.home.new-chat.styles (:require [react-native.safe-area :as safe-area])) diff --git a/src/status_im/contexts/chat/new_chat/view.cljs b/src/status_im/contexts/chat/home/new_chat/view.cljs similarity index 97% rename from src/status_im/contexts/chat/new_chat/view.cljs rename to src/status_im/contexts/chat/home/new_chat/view.cljs index 2cb6f3c2901..77bbabb2875 100644 --- a/src/status_im/contexts/chat/new_chat/view.cljs +++ b/src/status_im/contexts/chat/home/new_chat/view.cljs @@ -1,4 +1,4 @@ -(ns status-im.contexts.chat.new-chat.view +(ns status-im.contexts.chat.home.new-chat.view (:require [quo.core :as quo] [quo.foundations.colors :as colors] @@ -10,7 +10,7 @@ [status-im.common.contact-list.view :as contact-list] [status-im.common.resources :as resources] [status-im.constants :as constants] - [status-im.contexts.chat.new-chat.styles :as style] + [status-im.contexts.chat.home.new-chat.styles :as style] [utils.i18n :as i18n] [utils.re-frame :as rf])) diff --git a/src/status_im/contexts/chat/camera/style.cljs b/src/status_im/contexts/chat/messenger/camera/style.cljs similarity index 98% rename from src/status_im/contexts/chat/camera/style.cljs rename to src/status_im/contexts/chat/messenger/camera/style.cljs index 89758afd8b2..88dab1192ca 100644 --- a/src/status_im/contexts/chat/camera/style.cljs +++ b/src/status_im/contexts/chat/messenger/camera/style.cljs @@ -1,4 +1,4 @@ -(ns status-im.contexts.chat.camera.style +(ns status-im.contexts.chat.messenger.camera.style (:require [quo.foundations.colors :as colors] [react-native.platform :as platform] diff --git a/src/status_im/contexts/chat/camera/view.cljs b/src/status_im/contexts/chat/messenger/camera/view.cljs similarity index 98% rename from src/status_im/contexts/chat/camera/view.cljs rename to src/status_im/contexts/chat/messenger/camera/view.cljs index 842491df980..8b10e7632df 100644 --- a/src/status_im/contexts/chat/camera/view.cljs +++ b/src/status_im/contexts/chat/messenger/camera/view.cljs @@ -1,4 +1,4 @@ -(ns status-im.contexts.chat.camera.view +(ns status-im.contexts.chat.messenger.camera.view (:require [oops.core :refer [oget]] [quo.core :as quo] @@ -11,7 +11,7 @@ [react-native.reanimated :as reanimated] [react-native.safe-area :as safe-area] [reagent.core :as reagent] - [status-im.contexts.chat.camera.style :as style] + [status-im.contexts.chat.messenger.camera.style :as style] [utils.i18n :as i18n] [utils.re-frame :as rf])) diff --git a/src/status_im/contexts/chat/composer/actions/style.cljs b/src/status_im/contexts/chat/messenger/composer/actions/style.cljs similarity index 85% rename from src/status_im/contexts/chat/composer/actions/style.cljs rename to src/status_im/contexts/chat/messenger/composer/actions/style.cljs index a49030edd11..705d7343900 100644 --- a/src/status_im/contexts/chat/composer/actions/style.cljs +++ b/src/status_im/contexts/chat/messenger/composer/actions/style.cljs @@ -1,7 +1,7 @@ -(ns status-im.contexts.chat.composer.actions.style +(ns status-im.contexts.chat.messenger.composer.actions.style (:require [react-native.reanimated :as reanimated] - [status-im.contexts.chat.composer.constants :as constants])) + [status-im.contexts.chat.messenger.composer.constants :as constants])) (def actions-container {:height constants/actions-container-height diff --git a/src/status_im/contexts/chat/composer/actions/view.cljs b/src/status_im/contexts/chat/messenger/composer/actions/view.cljs similarity index 98% rename from src/status_im/contexts/chat/composer/actions/view.cljs rename to src/status_im/contexts/chat/messenger/composer/actions/view.cljs index bef56efa054..f157cca6a80 100644 --- a/src/status_im/contexts/chat/composer/actions/view.cljs +++ b/src/status_im/contexts/chat/messenger/composer/actions/view.cljs @@ -1,4 +1,4 @@ -(ns status-im.contexts.chat.composer.actions.view +(ns status-im.contexts.chat.messenger.composer.actions.view (:require [quo.core :as quo] [react-native.core :as rn] @@ -9,8 +9,8 @@ [status-im.common.alert.effects :as alert.effects] [status-im.common.device-permissions :as device-permissions] [status-im.constants :as constants] - [status-im.contexts.chat.composer.actions.style :as style] - [status-im.contexts.chat.composer.constants :as comp-constants] + [status-im.contexts.chat.messenger.composer.actions.style :as style] + [status-im.contexts.chat.messenger.composer.constants :as comp-constants] [utils.i18n :as i18n] [utils.re-frame :as rf])) diff --git a/src/status_im/contexts/chat/composer/constants.cljs b/src/status_im/contexts/chat/messenger/composer/constants.cljs similarity index 96% rename from src/status_im/contexts/chat/composer/constants.cljs rename to src/status_im/contexts/chat/messenger/composer/constants.cljs index 6b593ea3160..4195575776c 100644 --- a/src/status_im/contexts/chat/composer/constants.cljs +++ b/src/status_im/contexts/chat/messenger/composer/constants.cljs @@ -1,4 +1,4 @@ -(ns status-im.contexts.chat.composer.constants +(ns status-im.contexts.chat.messenger.composer.constants (:require [quo.foundations.typography :as typography] [react-native.platform :as platform])) diff --git a/src/status_im/contexts/chat/composer/edit/style.cljs b/src/status_im/contexts/chat/messenger/composer/edit/style.cljs similarity index 86% rename from src/status_im/contexts/chat/composer/edit/style.cljs rename to src/status_im/contexts/chat/messenger/composer/edit/style.cljs index 3ae9becee4f..c20b1562ed3 100644 --- a/src/status_im/contexts/chat/composer/edit/style.cljs +++ b/src/status_im/contexts/chat/messenger/composer/edit/style.cljs @@ -1,4 +1,4 @@ -(ns status-im.contexts.chat.composer.edit.style) +(ns status-im.contexts.chat.messenger.composer.edit.style) (def container {:flex-direction :row diff --git a/src/status_im/contexts/chat/composer/edit/view.cljs b/src/status_im/contexts/chat/messenger/composer/edit/view.cljs similarity index 84% rename from src/status_im/contexts/chat/composer/edit/view.cljs rename to src/status_im/contexts/chat/messenger/composer/edit/view.cljs index d2ef69982f3..0b33024b3ba 100644 --- a/src/status_im/contexts/chat/composer/edit/view.cljs +++ b/src/status_im/contexts/chat/messenger/composer/edit/view.cljs @@ -1,12 +1,12 @@ -(ns status-im.contexts.chat.composer.edit.view +(ns status-im.contexts.chat.messenger.composer.edit.view (:require [quo.core :as quo] [quo.foundations.colors :as colors] [react-native.core :as rn] [react-native.reanimated :as reanimated] - [status-im.contexts.chat.composer.constants :as constants] - [status-im.contexts.chat.composer.edit.style :as style] - [status-im.contexts.chat.composer.utils :as utils] + [status-im.contexts.chat.messenger.composer.constants :as constants] + [status-im.contexts.chat.messenger.composer.edit.style :as style] + [status-im.contexts.chat.messenger.composer.utils :as utils] [utils.i18n :as i18n] [utils.re-frame :as rf])) diff --git a/src/status_im/contexts/chat/composer/effects.cljs b/src/status_im/contexts/chat/messenger/composer/effects.cljs similarity index 97% rename from src/status_im/contexts/chat/composer/effects.cljs rename to src/status_im/contexts/chat/messenger/composer/effects.cljs index 110c1ef926b..f9b3d270d41 100644 --- a/src/status_im/contexts/chat/composer/effects.cljs +++ b/src/status_im/contexts/chat/messenger/composer/effects.cljs @@ -1,4 +1,4 @@ -(ns status-im.contexts.chat.composer.effects +(ns status-im.contexts.chat.messenger.composer.effects (:require [clojure.string :as string] [oops.core :as oops] @@ -7,9 +7,9 @@ [react-native.platform :as platform] [react-native.reanimated :as reanimated] [reagent.core :as reagent] - [status-im.contexts.chat.composer.constants :as constants] - [status-im.contexts.chat.composer.keyboard :as kb] - [status-im.contexts.chat.composer.utils :as utils] + [status-im.contexts.chat.messenger.composer.constants :as constants] + [status-im.contexts.chat.messenger.composer.keyboard :as kb] + [status-im.contexts.chat.messenger.composer.utils :as utils] [utils.number] [utils.re-frame :as rf])) diff --git a/src/status_im/contexts/chat/composer/events.cljs b/src/status_im/contexts/chat/messenger/composer/events.cljs similarity index 97% rename from src/status_im/contexts/chat/composer/events.cljs rename to src/status_im/contexts/chat/messenger/composer/events.cljs index 0cd274bf84e..0e7d392469d 100644 --- a/src/status_im/contexts/chat/composer/events.cljs +++ b/src/status_im/contexts/chat/messenger/composer/events.cljs @@ -1,10 +1,10 @@ -(ns status-im.contexts.chat.composer.events +(ns status-im.contexts.chat.messenger.composer.events (:require [clojure.string :as string] [legacy.status-im.chat.models.mentions :as mentions] [legacy.status-im.data-store.messages :as data-store-messages] [status-im.constants :as constants] - [status-im.contexts.chat.composer.link-preview.events :as link-preview] - [status-im.contexts.chat.messages.transport.events :as messages.transport] + [status-im.contexts.chat.messenger.composer.link-preview.events :as link-preview] + [status-im.contexts.chat.messenger.messages.transport.events :as messages.transport] [taoensso.timbre :as log] [utils.emojilib :as emoji] [utils.i18n :as i18n] diff --git a/src/status_im/contexts/chat/composer/gesture.cljs b/src/status_im/contexts/chat/messenger/composer/gesture.cljs similarity index 96% rename from src/status_im/contexts/chat/composer/gesture.cljs rename to src/status_im/contexts/chat/messenger/composer/gesture.cljs index 1a861849925..ea8f93cae2e 100644 --- a/src/status_im/contexts/chat/composer/gesture.cljs +++ b/src/status_im/contexts/chat/messenger/composer/gesture.cljs @@ -1,10 +1,10 @@ -(ns status-im.contexts.chat.composer.gesture +(ns status-im.contexts.chat.messenger.composer.gesture (:require [oops.core :as oops] [react-native.gesture :as gesture] [react-native.reanimated :as reanimated] - [status-im.contexts.chat.composer.constants :as constants] - [status-im.contexts.chat.composer.utils :as utils] + [status-im.contexts.chat.messenger.composer.constants :as constants] + [status-im.contexts.chat.messenger.composer.utils :as utils] [utils.number] [utils.re-frame :as rf])) diff --git a/src/status_im/contexts/chat/composer/gradients/style.cljs b/src/status_im/contexts/chat/messenger/composer/gradients/style.cljs similarity index 89% rename from src/status_im/contexts/chat/composer/gradients/style.cljs rename to src/status_im/contexts/chat/messenger/composer/gradients/style.cljs index 71cd12dccf6..fa038d2e137 100644 --- a/src/status_im/contexts/chat/composer/gradients/style.cljs +++ b/src/status_im/contexts/chat/messenger/composer/gradients/style.cljs @@ -1,8 +1,8 @@ -(ns status-im.contexts.chat.composer.gradients.style +(ns status-im.contexts.chat.messenger.composer.gradients.style (:require [quo.foundations.colors :as colors] [react-native.reanimated :as reanimated] - [status-im.contexts.chat.composer.constants :as constants])) + [status-im.contexts.chat.messenger.composer.constants :as constants])) (defn- top-gradient-style [opacity z-index showing-extra-space?] diff --git a/src/status_im/contexts/chat/composer/gradients/view.cljs b/src/status_im/contexts/chat/messenger/composer/gradients/view.cljs similarity index 87% rename from src/status_im/contexts/chat/composer/gradients/view.cljs rename to src/status_im/contexts/chat/messenger/composer/gradients/view.cljs index e7be37926bc..599b35aeb57 100644 --- a/src/status_im/contexts/chat/composer/gradients/view.cljs +++ b/src/status_im/contexts/chat/messenger/composer/gradients/view.cljs @@ -1,9 +1,9 @@ -(ns status-im.contexts.chat.composer.gradients.view +(ns status-im.contexts.chat.messenger.composer.gradients.view (:require [react-native.core :as rn] [react-native.linear-gradient :as linear-gradient] [react-native.reanimated :as reanimated] - [status-im.contexts.chat.composer.gradients.style :as style] + [status-im.contexts.chat.messenger.composer.gradients.style :as style] [utils.re-frame :as rf])) (defn f-view diff --git a/src/status_im/contexts/chat/composer/handlers.cljs b/src/status_im/contexts/chat/messenger/composer/handlers.cljs similarity index 96% rename from src/status_im/contexts/chat/composer/handlers.cljs rename to src/status_im/contexts/chat/messenger/composer/handlers.cljs index 733a62326f4..3e7de2b80f1 100644 --- a/src/status_im/contexts/chat/composer/handlers.cljs +++ b/src/status_im/contexts/chat/messenger/composer/handlers.cljs @@ -1,14 +1,14 @@ -(ns status-im.contexts.chat.composer.handlers +(ns status-im.contexts.chat.messenger.composer.handlers (:require [clojure.string :as string] [oops.core :as oops] [react-native.core :as rn] [react-native.reanimated :as reanimated] [reagent.core :as reagent] - [status-im.contexts.chat.composer.constants :as constants] - [status-im.contexts.chat.composer.keyboard :as kb] - [status-im.contexts.chat.composer.selection :as selection] - [status-im.contexts.chat.composer.utils :as utils] + [status-im.contexts.chat.messenger.composer.constants :as constants] + [status-im.contexts.chat.messenger.composer.keyboard :as kb] + [status-im.contexts.chat.messenger.composer.selection :as selection] + [status-im.contexts.chat.messenger.composer.utils :as utils] [utils.debounce :as debounce] [utils.number] [utils.re-frame :as rf])) diff --git a/src/status_im/contexts/chat/composer/images/style.cljs b/src/status_im/contexts/chat/messenger/composer/images/style.cljs similarity index 85% rename from src/status_im/contexts/chat/composer/images/style.cljs rename to src/status_im/contexts/chat/messenger/composer/images/style.cljs index 1a8330066a6..26cb831d780 100644 --- a/src/status_im/contexts/chat/composer/images/style.cljs +++ b/src/status_im/contexts/chat/messenger/composer/images/style.cljs @@ -1,7 +1,7 @@ -(ns status-im.contexts.chat.composer.images.style +(ns status-im.contexts.chat.messenger.composer.images.style (:require [quo.foundations.colors :as colors] - [status-im.contexts.chat.composer.constants :as constants])) + [status-im.contexts.chat.messenger.composer.constants :as constants])) (def image-container {:padding-top constants/images-padding-top diff --git a/src/status_im/contexts/chat/composer/images/view.cljs b/src/status_im/contexts/chat/messenger/composer/images/view.cljs similarity index 90% rename from src/status_im/contexts/chat/composer/images/view.cljs rename to src/status_im/contexts/chat/messenger/composer/images/view.cljs index 0ffbdf44820..efc667bdac6 100644 --- a/src/status_im/contexts/chat/composer/images/view.cljs +++ b/src/status_im/contexts/chat/messenger/composer/images/view.cljs @@ -1,4 +1,4 @@ -(ns status-im.contexts.chat.composer.images.view +(ns status-im.contexts.chat.messenger.composer.images.view (:require [quo.core :as quo] [quo.foundations.colors :as colors] @@ -6,8 +6,8 @@ [react-native.core :as rn] [react-native.gesture :as gesture] [react-native.reanimated :as reanimated] - [status-im.contexts.chat.composer.constants :as constants] - [status-im.contexts.chat.composer.images.style :as style] + [status-im.contexts.chat.messenger.composer.constants :as constants] + [status-im.contexts.chat.messenger.composer.images.style :as style] [utils.re-frame :as rf])) (defn image diff --git a/src/status_im/contexts/chat/composer/keyboard.cljs b/src/status_im/contexts/chat/messenger/composer/keyboard.cljs similarity index 97% rename from src/status_im/contexts/chat/composer/keyboard.cljs rename to src/status_im/contexts/chat/messenger/composer/keyboard.cljs index 9359cfe6bf8..3339287893f 100644 --- a/src/status_im/contexts/chat/composer/keyboard.cljs +++ b/src/status_im/contexts/chat/messenger/composer/keyboard.cljs @@ -1,11 +1,11 @@ -(ns status-im.contexts.chat.composer.keyboard +(ns status-im.contexts.chat.messenger.composer.keyboard (:require [oops.core :as oops] [react-native.async-storage :as async-storage] [react-native.core :as rn] [react-native.platform :as platform] [react-native.reanimated :as reanimated] - [status-im.contexts.chat.composer.utils :as utils])) + [status-im.contexts.chat.messenger.composer.utils :as utils])) (defn get-kb-height [curr-height default-height] diff --git a/src/status_im/contexts/chat/composer/link_preview/events.cljs b/src/status_im/contexts/chat/messenger/composer/link_preview/events.cljs similarity index 98% rename from src/status_im/contexts/chat/composer/link_preview/events.cljs rename to src/status_im/contexts/chat/messenger/composer/link_preview/events.cljs index 3c3af767f60..2c67867c6b0 100644 --- a/src/status_im/contexts/chat/composer/link_preview/events.cljs +++ b/src/status_im/contexts/chat/messenger/composer/link_preview/events.cljs @@ -1,4 +1,4 @@ -(ns status-im.contexts.chat.composer.link-preview.events +(ns status-im.contexts.chat.messenger.composer.link-preview.events (:require [clojure.set :as set] [clojure.string :as string] diff --git a/src/status_im/contexts/chat/composer/link_preview/events_test.cljs b/src/status_im/contexts/chat/messenger/composer/link_preview/events_test.cljs similarity index 98% rename from src/status_im/contexts/chat/composer/link_preview/events_test.cljs rename to src/status_im/contexts/chat/messenger/composer/link_preview/events_test.cljs index 04d629df441..a20aeeee067 100644 --- a/src/status_im/contexts/chat/composer/link_preview/events_test.cljs +++ b/src/status_im/contexts/chat/messenger/composer/link_preview/events_test.cljs @@ -1,8 +1,8 @@ -(ns status-im.contexts.chat.composer.link-preview.events-test +(ns status-im.contexts.chat.messenger.composer.link-preview.events-test (:require [cljs.test :refer [deftest is testing]] matcher-combinators.test - [status-im.contexts.chat.composer.link-preview.events :as events])) + [status-im.contexts.chat.messenger.composer.link-preview.events :as events])) (def url-github "https://github.com") (def url-gitlab "https://gitlab.com") diff --git a/src/status_im/contexts/chat/composer/link_preview/style.cljs b/src/status_im/contexts/chat/messenger/composer/link_preview/style.cljs similarity index 71% rename from src/status_im/contexts/chat/composer/link_preview/style.cljs rename to src/status_im/contexts/chat/messenger/composer/link_preview/style.cljs index 11ca462ef64..9564af255d8 100644 --- a/src/status_im/contexts/chat/composer/link_preview/style.cljs +++ b/src/status_im/contexts/chat/messenger/composer/link_preview/style.cljs @@ -1,5 +1,5 @@ -(ns status-im.contexts.chat.composer.link-preview.style - (:require [status-im.contexts.chat.composer.constants :as constants])) +(ns status-im.contexts.chat.messenger.composer.link-preview.style + (:require [status-im.contexts.chat.messenger.composer.constants :as constants])) (def padding-horizontal 20) (def preview-height 56) diff --git a/src/status_im/contexts/chat/composer/link_preview/view.cljs b/src/status_im/contexts/chat/messenger/composer/link_preview/view.cljs similarity index 85% rename from src/status_im/contexts/chat/composer/link_preview/view.cljs rename to src/status_im/contexts/chat/messenger/composer/link_preview/view.cljs index c802357f652..84c61a67542 100644 --- a/src/status_im/contexts/chat/composer/link_preview/view.cljs +++ b/src/status_im/contexts/chat/messenger/composer/link_preview/view.cljs @@ -1,11 +1,11 @@ -(ns status-im.contexts.chat.composer.link-preview.view +(ns status-im.contexts.chat.messenger.composer.link-preview.view (:require [quo.core :as quo] [react-native.core :as rn] [react-native.reanimated :as reanimated] - [status-im.contexts.chat.composer.constants :as constants] - [status-im.contexts.chat.composer.link-preview.events] - [status-im.contexts.chat.composer.link-preview.style :as style] + [status-im.contexts.chat.messenger.composer.constants :as constants] + [status-im.contexts.chat.messenger.composer.link-preview.events] + [status-im.contexts.chat.messenger.composer.link-preview.style :as style] [utils.i18n :as i18n] [utils.re-frame :as rf])) diff --git a/src/status_im/contexts/chat/composer/mentions/style.cljs b/src/status_im/contexts/chat/messenger/composer/mentions/style.cljs similarity index 85% rename from src/status_im/contexts/chat/composer/mentions/style.cljs rename to src/status_im/contexts/chat/messenger/composer/mentions/style.cljs index 287be0f2615..fd5c1e57f9b 100644 --- a/src/status_im/contexts/chat/composer/mentions/style.cljs +++ b/src/status_im/contexts/chat/messenger/composer/mentions/style.cljs @@ -1,9 +1,9 @@ -(ns status-im.contexts.chat.composer.mentions.style +(ns status-im.contexts.chat.messenger.composer.mentions.style (:require [quo.foundations.colors :as colors] [react-native.platform :as platform] [react-native.reanimated :as reanimated] - [status-im.contexts.chat.composer.constants :as constants])) + [status-im.contexts.chat.messenger.composer.constants :as constants])) (defn shadow diff --git a/src/status_im/contexts/chat/composer/mentions/view.cljs b/src/status_im/contexts/chat/messenger/composer/mentions/view.cljs similarity index 93% rename from src/status_im/contexts/chat/composer/mentions/view.cljs rename to src/status_im/contexts/chat/messenger/composer/mentions/view.cljs index f20131a6d34..4f96cb17326 100644 --- a/src/status_im/contexts/chat/composer/mentions/view.cljs +++ b/src/status_im/contexts/chat/messenger/composer/mentions/view.cljs @@ -1,4 +1,4 @@ -(ns status-im.contexts.chat.composer.mentions.view +(ns status-im.contexts.chat.messenger.composer.mentions.view (:require [react-native.core :as rn] [react-native.platform :as platform] @@ -6,8 +6,8 @@ [react-native.safe-area :as safe-area] [reagent.core :as reagent] [status-im.common.contact-list-item.view :as contact-list-item] - [status-im.contexts.chat.composer.mentions.style :as style] - [status-im.contexts.chat.composer.utils :as utils] + [status-im.contexts.chat.messenger.composer.mentions.style :as style] + [status-im.contexts.chat.messenger.composer.utils :as utils] [utils.re-frame :as rf])) (defn update-cursor diff --git a/src/status_im/contexts/chat/composer/reply/style.cljs b/src/status_im/contexts/chat/messenger/composer/reply/style.cljs similarity index 94% rename from src/status_im/contexts/chat/composer/reply/style.cljs rename to src/status_im/contexts/chat/messenger/composer/reply/style.cljs index beb9640d7f9..01c268946fb 100644 --- a/src/status_im/contexts/chat/composer/reply/style.cljs +++ b/src/status_im/contexts/chat/messenger/composer/reply/style.cljs @@ -1,4 +1,4 @@ -(ns status-im.contexts.chat.composer.reply.style) +(ns status-im.contexts.chat.messenger.composer.reply.style) (defn container diff --git a/src/status_im/contexts/chat/composer/reply/view.cljs b/src/status_im/contexts/chat/messenger/composer/reply/view.cljs similarity index 95% rename from src/status_im/contexts/chat/composer/reply/view.cljs rename to src/status_im/contexts/chat/messenger/composer/reply/view.cljs index da4022ea24b..68272c6e37f 100644 --- a/src/status_im/contexts/chat/composer/reply/view.cljs +++ b/src/status_im/contexts/chat/messenger/composer/reply/view.cljs @@ -1,4 +1,4 @@ -(ns status-im.contexts.chat.composer.reply.view +(ns status-im.contexts.chat.messenger.composer.reply.view (:require [clojure.string :as string] [quo.core :as quo] @@ -7,9 +7,9 @@ [react-native.linear-gradient :as linear-gradient] [react-native.reanimated :as reanimated] [status-im.constants :as constant] - [status-im.contexts.chat.composer.constants :as constants] - [status-im.contexts.chat.composer.reply.style :as style] - [status-im.contexts.chat.composer.utils :as utils] + [status-im.contexts.chat.messenger.composer.constants :as constants] + [status-im.contexts.chat.messenger.composer.reply.style :as style] + [status-im.contexts.chat.messenger.composer.utils :as utils] [utils.ens.stateofus :as stateofus] [utils.i18n :as i18n] [utils.re-frame :as rf])) diff --git a/src/status_im/contexts/chat/composer/selection.cljs b/src/status_im/contexts/chat/messenger/composer/selection.cljs similarity index 98% rename from src/status_im/contexts/chat/composer/selection.cljs rename to src/status_im/contexts/chat/messenger/composer/selection.cljs index 9b675bd2f63..5da37319192 100644 --- a/src/status_im/contexts/chat/composer/selection.cljs +++ b/src/status_im/contexts/chat/messenger/composer/selection.cljs @@ -1,4 +1,4 @@ -(ns status-im.contexts.chat.composer.selection +(ns status-im.contexts.chat.messenger.composer.selection (:require [clojure.string :as string] [oops.core :as oops] diff --git a/src/status_im/contexts/chat/composer/style.cljs b/src/status_im/contexts/chat/messenger/composer/style.cljs similarity index 96% rename from src/status_im/contexts/chat/composer/style.cljs rename to src/status_im/contexts/chat/messenger/composer/style.cljs index ce39ec1a2d8..c2e42f7743b 100644 --- a/src/status_im/contexts/chat/composer/style.cljs +++ b/src/status_im/contexts/chat/messenger/composer/style.cljs @@ -1,11 +1,11 @@ -(ns status-im.contexts.chat.composer.style +(ns status-im.contexts.chat.messenger.composer.style (:require [quo.foundations.colors :as colors] [quo.foundations.typography :as typography] [quo.theme :as quo.theme] [react-native.platform :as platform] [react-native.reanimated :as reanimated] - [status-im.contexts.chat.composer.constants :as constants])) + [status-im.contexts.chat.messenger.composer.constants :as constants])) (def border-top-radius 20) diff --git a/src/status_im/contexts/chat/composer/sub_view.cljs b/src/status_im/contexts/chat/messenger/composer/sub_view.cljs similarity index 94% rename from src/status_im/contexts/chat/composer/sub_view.cljs rename to src/status_im/contexts/chat/messenger/composer/sub_view.cljs index 63adb2e654d..b0c603116ae 100644 --- a/src/status_im/contexts/chat/composer/sub_view.cljs +++ b/src/status_im/contexts/chat/messenger/composer/sub_view.cljs @@ -1,10 +1,10 @@ -(ns status-im.contexts.chat.composer.sub-view +(ns status-im.contexts.chat.messenger.composer.sub-view (:require [quo.core :as quo] [react-native.blur :as blur] [react-native.core :as rn] [react-native.reanimated :as reanimated] - [status-im.contexts.chat.composer.style :as style] + [status-im.contexts.chat.messenger.composer.style :as style] [utils.i18n :as i18n] [utils.re-frame :as rf])) diff --git a/src/status_im/contexts/chat/composer/utils.cljs b/src/status_im/contexts/chat/messenger/composer/utils.cljs similarity index 97% rename from src/status_im/contexts/chat/composer/utils.cljs rename to src/status_im/contexts/chat/messenger/composer/utils.cljs index 1fef9d28c7f..c816f82f24c 100644 --- a/src/status_im/contexts/chat/composer/utils.cljs +++ b/src/status_im/contexts/chat/messenger/composer/utils.cljs @@ -1,4 +1,4 @@ -(ns status-im.contexts.chat.composer.utils +(ns status-im.contexts.chat.messenger.composer.utils (:require [clojure.string :as string] [oops.core :as oops] @@ -6,8 +6,8 @@ [react-native.platform :as platform] [react-native.reanimated :as reanimated] [reagent.core :as reagent] - [status-im.contexts.chat.composer.constants :as constants] - [status-im.contexts.chat.composer.selection :as selection] + [status-im.contexts.chat.messenger.composer.constants :as constants] + [status-im.contexts.chat.messenger.composer.selection :as selection] [utils.number] [utils.re-frame :as rf])) diff --git a/src/status_im/contexts/chat/composer/view.cljs b/src/status_im/contexts/chat/messenger/composer/view.cljs similarity index 88% rename from src/status_im/contexts/chat/composer/view.cljs rename to src/status_im/contexts/chat/messenger/composer/view.cljs index 02ca1cb20ad..77bac655052 100644 --- a/src/status_im/contexts/chat/composer/view.cljs +++ b/src/status_im/contexts/chat/messenger/composer/view.cljs @@ -1,4 +1,4 @@ -(ns status-im.contexts.chat.composer.view +(ns status-im.contexts.chat.messenger.composer.view (:require [quo.foundations.colors :as colors] [quo.theme :as quo.theme] @@ -8,22 +8,22 @@ [react-native.platform :as platform] [react-native.reanimated :as reanimated] [reagent.core :as reagent] - [status-im.contexts.chat.composer.actions.view :as actions] - [status-im.contexts.chat.composer.constants :as constants] - [status-im.contexts.chat.composer.edit.view :as edit] - [status-im.contexts.chat.composer.effects :as effects] - [status-im.contexts.chat.composer.gesture :as drag-gesture] - [status-im.contexts.chat.composer.gradients.view :as gradients] - [status-im.contexts.chat.composer.handlers :as handler] - [status-im.contexts.chat.composer.images.view :as images] - [status-im.contexts.chat.composer.link-preview.view :as link-preview] - [status-im.contexts.chat.composer.mentions.view :as mentions] - [status-im.contexts.chat.composer.reply.view :as reply] - [status-im.contexts.chat.composer.selection :as selection] - [status-im.contexts.chat.composer.style :as style] - [status-im.contexts.chat.composer.sub-view :as sub-view] - [status-im.contexts.chat.composer.utils :as utils] - [status-im.contexts.chat.messages.contact-requests.bottom-drawer.view :as + [status-im.contexts.chat.messenger.composer.actions.view :as actions] + [status-im.contexts.chat.messenger.composer.constants :as constants] + [status-im.contexts.chat.messenger.composer.edit.view :as edit] + [status-im.contexts.chat.messenger.composer.effects :as effects] + [status-im.contexts.chat.messenger.composer.gesture :as drag-gesture] + [status-im.contexts.chat.messenger.composer.gradients.view :as gradients] + [status-im.contexts.chat.messenger.composer.handlers :as handler] + [status-im.contexts.chat.messenger.composer.images.view :as images] + [status-im.contexts.chat.messenger.composer.link-preview.view :as link-preview] + [status-im.contexts.chat.messenger.composer.mentions.view :as mentions] + [status-im.contexts.chat.messenger.composer.reply.view :as reply] + [status-im.contexts.chat.messenger.composer.selection :as selection] + [status-im.contexts.chat.messenger.composer.style :as style] + [status-im.contexts.chat.messenger.composer.sub-view :as sub-view] + [status-im.contexts.chat.messenger.composer.utils :as utils] + [status-im.contexts.chat.messenger.messages.contact-requests.bottom-drawer.view :as contact-requests.bottom-drawer] [utils.i18n :as i18n] [utils.re-frame :as rf])) diff --git a/src/status_im/contexts/chat/lightbox/animations.cljs b/src/status_im/contexts/chat/messenger/lightbox/animations.cljs similarity index 92% rename from src/status_im/contexts/chat/lightbox/animations.cljs rename to src/status_im/contexts/chat/messenger/lightbox/animations.cljs index 4e3d29fccf0..0f06dde7adf 100644 --- a/src/status_im/contexts/chat/lightbox/animations.cljs +++ b/src/status_im/contexts/chat/messenger/lightbox/animations.cljs @@ -1,4 +1,4 @@ -(ns status-im.contexts.chat.lightbox.animations +(ns status-im.contexts.chat.messenger.lightbox.animations (:require [react-native.reanimated :as reanimated])) diff --git a/src/status_im/contexts/chat/lightbox/bottom_view.cljs b/src/status_im/contexts/chat/messenger/lightbox/bottom_view.cljs similarity index 91% rename from src/status_im/contexts/chat/lightbox/bottom_view.cljs rename to src/status_im/contexts/chat/messenger/lightbox/bottom_view.cljs index b24c8137ec7..3a01c1c0a44 100644 --- a/src/status_im/contexts/chat/lightbox/bottom_view.cljs +++ b/src/status_im/contexts/chat/messenger/lightbox/bottom_view.cljs @@ -1,13 +1,13 @@ -(ns status-im.contexts.chat.lightbox.bottom-view +(ns status-im.contexts.chat.messenger.lightbox.bottom-view (:require [quo.foundations.colors :as colors] [react-native.core :as rn] [react-native.platform :as platform] [react-native.reanimated :as reanimated] - [status-im.contexts.chat.lightbox.animations :as anim] - [status-im.contexts.chat.lightbox.constants :as c] - [status-im.contexts.chat.lightbox.style :as style] - [status-im.contexts.chat.lightbox.text-sheet.view :as text-sheet] + [status-im.contexts.chat.messenger.lightbox.animations :as anim] + [status-im.contexts.chat.messenger.lightbox.constants :as c] + [status-im.contexts.chat.messenger.lightbox.style :as style] + [status-im.contexts.chat.messenger.lightbox.text-sheet.view :as text-sheet] [utils.re-frame :as rf])) (defn get-small-item-layout diff --git a/src/status_im/contexts/chat/lightbox/constants.cljs b/src/status_im/contexts/chat/messenger/lightbox/constants.cljs similarity index 89% rename from src/status_im/contexts/chat/lightbox/constants.cljs rename to src/status_im/contexts/chat/messenger/lightbox/constants.cljs index f659e75467a..1af54b2c402 100644 --- a/src/status_im/contexts/chat/lightbox/constants.cljs +++ b/src/status_im/contexts/chat/messenger/lightbox/constants.cljs @@ -1,4 +1,4 @@ -(ns status-im.contexts.chat.lightbox.constants) +(ns status-im.contexts.chat.messenger.lightbox.constants) (def ^:const small-image-size 40) (def ^:const focused-extra-size 16) diff --git a/src/status_im/contexts/chat/lightbox/effects.cljs b/src/status_im/contexts/chat/messenger/lightbox/effects.cljs similarity index 94% rename from src/status_im/contexts/chat/lightbox/effects.cljs rename to src/status_im/contexts/chat/messenger/lightbox/effects.cljs index 0a0171648dd..6effa3d9cfa 100644 --- a/src/status_im/contexts/chat/lightbox/effects.cljs +++ b/src/status_im/contexts/chat/messenger/lightbox/effects.cljs @@ -1,4 +1,4 @@ -(ns status-im.contexts.chat.lightbox.effects +(ns status-im.contexts.chat.messenger.lightbox.effects (:require [react-native.blob :as blob] [react-native.cameraroll :as cameraroll] [react-native.fs :as fs] diff --git a/src/status_im/contexts/chat/lightbox/events.cljs b/src/status_im/contexts/chat/messenger/lightbox/events.cljs similarity index 86% rename from src/status_im/contexts/chat/lightbox/events.cljs rename to src/status_im/contexts/chat/messenger/lightbox/events.cljs index 3f23b53a116..765eead1f1b 100644 --- a/src/status_im/contexts/chat/lightbox/events.cljs +++ b/src/status_im/contexts/chat/messenger/lightbox/events.cljs @@ -1,5 +1,5 @@ -(ns status-im.contexts.chat.lightbox.events - (:require status-im.contexts.chat.lightbox.effects +(ns status-im.contexts.chat.messenger.lightbox.events + (:require status-im.contexts.chat.messenger.lightbox.effects [utils.re-frame :as rf])) (rf/reg-event-fx :chat.ui/clear-sending-images diff --git a/src/status_im/contexts/chat/lightbox/style.cljs b/src/status_im/contexts/chat/messenger/lightbox/style.cljs similarity index 96% rename from src/status_im/contexts/chat/lightbox/style.cljs rename to src/status_im/contexts/chat/messenger/lightbox/style.cljs index 9ef96aeb05a..ace3e743db1 100644 --- a/src/status_im/contexts/chat/lightbox/style.cljs +++ b/src/status_im/contexts/chat/messenger/lightbox/style.cljs @@ -1,9 +1,9 @@ -(ns status-im.contexts.chat.lightbox.style +(ns status-im.contexts.chat.messenger.lightbox.style (:require [quo.foundations.colors :as colors] [react-native.platform :as platform] [react-native.reanimated :as reanimated] - [status-im.contexts.chat.lightbox.constants :as c])) + [status-im.contexts.chat.messenger.lightbox.constants :as c])) ;;;; VIEW (defn image diff --git a/src/status_im/contexts/chat/lightbox/text_sheet/style.cljs b/src/status_im/contexts/chat/messenger/lightbox/text_sheet/style.cljs similarity index 93% rename from src/status_im/contexts/chat/lightbox/text_sheet/style.cljs rename to src/status_im/contexts/chat/messenger/lightbox/text_sheet/style.cljs index 45115fa3532..181b0dad019 100644 --- a/src/status_im/contexts/chat/lightbox/text_sheet/style.cljs +++ b/src/status_im/contexts/chat/messenger/lightbox/text_sheet/style.cljs @@ -1,8 +1,8 @@ -(ns status-im.contexts.chat.lightbox.text-sheet.style +(ns status-im.contexts.chat.messenger.lightbox.text-sheet.style (:require [quo.foundations.colors :as colors] [react-native.reanimated :as reanimated] - [status-im.contexts.chat.lightbox.constants :as constants])) + [status-im.contexts.chat.messenger.lightbox.constants :as constants])) (defn sheet-container [{:keys [height top]}] diff --git a/src/status_im/contexts/chat/lightbox/text_sheet/utils.cljs b/src/status_im/contexts/chat/messenger/lightbox/text_sheet/utils.cljs similarity index 96% rename from src/status_im/contexts/chat/lightbox/text_sheet/utils.cljs rename to src/status_im/contexts/chat/messenger/lightbox/text_sheet/utils.cljs index b5dde07a977..a1fa8e78707 100644 --- a/src/status_im/contexts/chat/lightbox/text_sheet/utils.cljs +++ b/src/status_im/contexts/chat/messenger/lightbox/text_sheet/utils.cljs @@ -1,10 +1,10 @@ -(ns status-im.contexts.chat.lightbox.text-sheet.utils +(ns status-im.contexts.chat.messenger.lightbox.text-sheet.utils (:require [oops.core :as oops] [react-native.gesture :as gesture] [react-native.reanimated :as reanimated] [reagent.core :as r] - [status-im.contexts.chat.lightbox.constants :as constants])) + [status-im.contexts.chat.messenger.lightbox.constants :as constants])) (defn- collapse-sheet [{:keys [derived-value overlay-opacity saved-top expanded? overlay-z-index]}] diff --git a/src/status_im/contexts/chat/lightbox/text_sheet/view.cljs b/src/status_im/contexts/chat/messenger/lightbox/text_sheet/view.cljs similarity index 92% rename from src/status_im/contexts/chat/lightbox/text_sheet/view.cljs rename to src/status_im/contexts/chat/messenger/lightbox/text_sheet/view.cljs index 2fef4ffdecf..16e5113a0b9 100644 --- a/src/status_im/contexts/chat/lightbox/text_sheet/view.cljs +++ b/src/status_im/contexts/chat/messenger/lightbox/text_sheet/view.cljs @@ -1,4 +1,4 @@ -(ns status-im.contexts.chat.lightbox.text-sheet.view +(ns status-im.contexts.chat.messenger.lightbox.text-sheet.view (:require [quo.foundations.colors :as colors] [react-native.core :as rn] @@ -8,10 +8,10 @@ [react-native.reanimated :as reanimated] [react-native.safe-area :as safe-area] [reagent.core :as reagent] - [status-im.contexts.chat.lightbox.constants :as constants] - [status-im.contexts.chat.lightbox.text-sheet.style :as style] - [status-im.contexts.chat.lightbox.text-sheet.utils :as utils] - [status-im.contexts.chat.messages.content.text.view :as message-view])) + [status-im.contexts.chat.messenger.lightbox.constants :as constants] + [status-im.contexts.chat.messenger.lightbox.text-sheet.style :as style] + [status-im.contexts.chat.messenger.lightbox.text-sheet.utils :as utils] + [status-im.contexts.chat.messenger.messages.content.text.view :as message-view])) (defn- text-sheet [messages overlay-opacity overlay-z-index text-sheet-lock?] diff --git a/src/status_im/contexts/chat/lightbox/top_view.cljs b/src/status_im/contexts/chat/messenger/lightbox/top_view.cljs similarity index 95% rename from src/status_im/contexts/chat/lightbox/top_view.cljs rename to src/status_im/contexts/chat/messenger/lightbox/top_view.cljs index 423b67cb5c1..5fb1fa2143b 100644 --- a/src/status_im/contexts/chat/lightbox/top_view.cljs +++ b/src/status_im/contexts/chat/messenger/lightbox/top_view.cljs @@ -1,4 +1,4 @@ -(ns status-im.contexts.chat.lightbox.top-view +(ns status-im.contexts.chat.messenger.lightbox.top-view (:require [quo.core :as quo] [quo.foundations.colors :as colors] @@ -6,9 +6,9 @@ [react-native.orientation :as orientation] [react-native.platform :as platform] [react-native.reanimated :as reanimated] - [status-im.contexts.chat.lightbox.animations :as anim] - [status-im.contexts.chat.lightbox.constants :as c] - [status-im.contexts.chat.lightbox.style :as style] + [status-im.contexts.chat.messenger.lightbox.animations :as anim] + [status-im.contexts.chat.messenger.lightbox.constants :as c] + [status-im.contexts.chat.messenger.lightbox.style :as style] [utils.datetime :as datetime] [utils.i18n :as i18n] [utils.re-frame :as rf] diff --git a/src/status_im/contexts/chat/lightbox/utils.cljs b/src/status_im/contexts/chat/messenger/lightbox/utils.cljs similarity index 96% rename from src/status_im/contexts/chat/lightbox/utils.cljs rename to src/status_im/contexts/chat/messenger/lightbox/utils.cljs index eb0ece41ba1..7040330b5bd 100644 --- a/src/status_im/contexts/chat/lightbox/utils.cljs +++ b/src/status_im/contexts/chat/messenger/lightbox/utils.cljs @@ -1,4 +1,4 @@ -(ns status-im.contexts.chat.lightbox.utils +(ns status-im.contexts.chat.messenger.lightbox.utils (:require [clojure.string :as string] [oops.core :as oops] @@ -9,9 +9,9 @@ [react-native.platform :as platform] [react-native.safe-area :as safe-area] [reagent.core :as reagent] - [status-im.contexts.chat.lightbox.animations :as anim] - [status-im.contexts.chat.lightbox.constants :as constants] - [status-im.contexts.chat.lightbox.top-view :as top-view] + [status-im.contexts.chat.messenger.lightbox.animations :as anim] + [status-im.contexts.chat.messenger.lightbox.constants :as constants] + [status-im.contexts.chat.messenger.lightbox.top-view :as top-view] [utils.re-frame :as rf] [utils.worklets.chat.lightbox :as worklet])) diff --git a/src/status_im/contexts/chat/lightbox/view.cljs b/src/status_im/contexts/chat/messenger/lightbox/view.cljs similarity index 92% rename from src/status_im/contexts/chat/lightbox/view.cljs rename to src/status_im/contexts/chat/messenger/lightbox/view.cljs index 81eb4b643a9..29af399328b 100644 --- a/src/status_im/contexts/chat/lightbox/view.cljs +++ b/src/status_im/contexts/chat/messenger/lightbox/view.cljs @@ -1,4 +1,4 @@ -(ns status-im.contexts.chat.lightbox.view +(ns status-im.contexts.chat.messenger.lightbox.view (:require [clojure.string :as string] [oops.core :as oops] @@ -9,13 +9,13 @@ [react-native.platform :as platform] [react-native.reanimated :as reanimated] [react-native.safe-area :as safe-area] - [status-im.contexts.chat.lightbox.animations :as anim] - [status-im.contexts.chat.lightbox.bottom-view :as bottom-view] - [status-im.contexts.chat.lightbox.constants :as constants] - [status-im.contexts.chat.lightbox.style :as style] - [status-im.contexts.chat.lightbox.top-view :as top-view] - [status-im.contexts.chat.lightbox.utils :as utils] - [status-im.contexts.chat.lightbox.zoomable-image.view :as zoomable-image] + [status-im.contexts.chat.messenger.lightbox.animations :as anim] + [status-im.contexts.chat.messenger.lightbox.bottom-view :as bottom-view] + [status-im.contexts.chat.messenger.lightbox.constants :as constants] + [status-im.contexts.chat.messenger.lightbox.style :as style] + [status-im.contexts.chat.messenger.lightbox.top-view :as top-view] + [status-im.contexts.chat.messenger.lightbox.utils :as utils] + [status-im.contexts.chat.messenger.lightbox.zoomable-image.view :as zoomable-image] [utils.re-frame :as rf])) (defn get-item-layout diff --git a/src/status_im/contexts/chat/lightbox/zoomable_image/constants.cljs b/src/status_im/contexts/chat/messenger/lightbox/zoomable_image/constants.cljs similarity index 79% rename from src/status_im/contexts/chat/lightbox/zoomable_image/constants.cljs rename to src/status_im/contexts/chat/messenger/lightbox/zoomable_image/constants.cljs index b297f92a8e1..8b1668e3a7a 100644 --- a/src/status_im/contexts/chat/lightbox/zoomable_image/constants.cljs +++ b/src/status_im/contexts/chat/messenger/lightbox/zoomable_image/constants.cljs @@ -1,4 +1,4 @@ -(ns status-im.contexts.chat.lightbox.zoomable-image.constants) +(ns status-im.contexts.chat.messenger.lightbox.zoomable-image.constants) (def ^:const min-scale 1) diff --git a/src/status_im/contexts/chat/lightbox/zoomable_image/style.cljs b/src/status_im/contexts/chat/messenger/lightbox/zoomable_image/style.cljs similarity index 94% rename from src/status_im/contexts/chat/lightbox/zoomable_image/style.cljs rename to src/status_im/contexts/chat/messenger/lightbox/zoomable_image/style.cljs index a228596d7d9..4280de76406 100644 --- a/src/status_im/contexts/chat/lightbox/zoomable_image/style.cljs +++ b/src/status_im/contexts/chat/messenger/lightbox/zoomable_image/style.cljs @@ -1,4 +1,4 @@ -(ns status-im.contexts.chat.lightbox.zoomable-image.style +(ns status-im.contexts.chat.messenger.lightbox.zoomable-image.style (:require [react-native.platform :as platform] [react-native.reanimated :as reanimated])) diff --git a/src/status_im/contexts/chat/lightbox/zoomable_image/utils.cljs b/src/status_im/contexts/chat/messenger/lightbox/zoomable_image/utils.cljs similarity index 97% rename from src/status_im/contexts/chat/lightbox/zoomable_image/utils.cljs rename to src/status_im/contexts/chat/messenger/lightbox/zoomable_image/utils.cljs index 510603d1200..46381459f6b 100644 --- a/src/status_im/contexts/chat/lightbox/zoomable_image/utils.cljs +++ b/src/status_im/contexts/chat/messenger/lightbox/zoomable_image/utils.cljs @@ -1,4 +1,4 @@ -(ns status-im.contexts.chat.lightbox.zoomable-image.utils +(ns status-im.contexts.chat.messenger.lightbox.zoomable-image.utils (:require [clojure.string :as string] [react-native.core :as rn] @@ -6,8 +6,8 @@ [react-native.orientation :as orientation] [react-native.platform :as platform] [reagent.core :as reagent] - [status-im.contexts.chat.lightbox.animations :as anim] - [status-im.contexts.chat.lightbox.zoomable-image.constants :as constants] + [status-im.contexts.chat.messenger.lightbox.animations :as anim] + [status-im.contexts.chat.messenger.lightbox.zoomable-image.constants :as constants] [utils.re-frame :as rf])) ;;; Helpers diff --git a/src/status_im/contexts/chat/lightbox/zoomable_image/view.cljs b/src/status_im/contexts/chat/messenger/lightbox/zoomable_image/view.cljs similarity index 97% rename from src/status_im/contexts/chat/lightbox/zoomable_image/view.cljs rename to src/status_im/contexts/chat/messenger/lightbox/zoomable_image/view.cljs index f6bb14cb4b3..49681ae5082 100644 --- a/src/status_im/contexts/chat/lightbox/zoomable_image/view.cljs +++ b/src/status_im/contexts/chat/messenger/lightbox/zoomable_image/view.cljs @@ -1,4 +1,4 @@ -(ns status-im.contexts.chat.lightbox.zoomable-image.view +(ns status-im.contexts.chat.messenger.lightbox.zoomable-image.view (:require [oops.core :refer [oget]] [react-native.core :as rn] @@ -7,10 +7,10 @@ [react-native.platform :as platform] [react-native.reanimated :as reanimated] [reagent.core :as r] - [status-im.contexts.chat.lightbox.animations :as anim] - [status-im.contexts.chat.lightbox.zoomable-image.constants :as c] - [status-im.contexts.chat.lightbox.zoomable-image.style :as style] - [status-im.contexts.chat.lightbox.zoomable-image.utils :as utils] + [status-im.contexts.chat.messenger.lightbox.animations :as anim] + [status-im.contexts.chat.messenger.lightbox.zoomable-image.constants :as c] + [status-im.contexts.chat.messenger.lightbox.zoomable-image.style :as style] + [status-im.contexts.chat.messenger.lightbox.zoomable-image.utils :as utils] [utils.re-frame :as rf] [utils.url :as url])) diff --git a/src/status_im/contexts/chat/menus/pinned_messages/style.cljs b/src/status_im/contexts/chat/messenger/menus/pinned_messages/style.cljs similarity index 95% rename from src/status_im/contexts/chat/menus/pinned_messages/style.cljs rename to src/status_im/contexts/chat/messenger/menus/pinned_messages/style.cljs index 13a98c22a65..b97d83f60eb 100644 --- a/src/status_im/contexts/chat/menus/pinned_messages/style.cljs +++ b/src/status_im/contexts/chat/messenger/menus/pinned_messages/style.cljs @@ -1,4 +1,4 @@ -(ns status-im.contexts.chat.menus.pinned-messages.style +(ns status-im.contexts.chat.messenger.menus.pinned-messages.style (:require [quo.foundations.colors :as colors] [react-native.platform :as platform])) diff --git a/src/status_im/contexts/chat/menus/pinned_messages/view.cljs b/src/status_im/contexts/chat/messenger/menus/pinned_messages/view.cljs similarity index 93% rename from src/status_im/contexts/chat/menus/pinned_messages/view.cljs rename to src/status_im/contexts/chat/messenger/menus/pinned_messages/view.cljs index 4c26c9f41d0..e3f05e4674b 100644 --- a/src/status_im/contexts/chat/menus/pinned_messages/view.cljs +++ b/src/status_im/contexts/chat/messenger/menus/pinned_messages/view.cljs @@ -1,12 +1,12 @@ -(ns status-im.contexts.chat.menus.pinned-messages.view +(ns status-im.contexts.chat.messenger.menus.pinned-messages.view (:require [quo.core :as quo] [quo.foundations.colors :as colors] [react-native.core :as rn] [react-native.fast-image :as fast-image] [react-native.gesture :as gesture] - [status-im.contexts.chat.menus.pinned-messages.style :as style] - [status-im.contexts.chat.messages.content.view :as message] + [status-im.contexts.chat.messenger.menus.pinned-messages.style :as style] + [status-im.contexts.chat.messenger.messages.content.view :as message] [utils.i18n :as i18n] [utils.re-frame :as rf])) diff --git a/src/status_im/contexts/chat/messages/avatar/view.cljs b/src/status_im/contexts/chat/messenger/messages/avatar/view.cljs similarity index 92% rename from src/status_im/contexts/chat/messages/avatar/view.cljs rename to src/status_im/contexts/chat/messenger/messages/avatar/view.cljs index 0fc187ae9b1..59f74440b8e 100644 --- a/src/status_im/contexts/chat/messages/avatar/view.cljs +++ b/src/status_im/contexts/chat/messenger/messages/avatar/view.cljs @@ -1,4 +1,4 @@ -(ns status-im.contexts.chat.messages.avatar.view +(ns status-im.contexts.chat.messenger.messages.avatar.view (:require [quo.core :as quo] [react-native.core :as rn] diff --git a/src/status_im/contexts/chat/messages/constants.cljs b/src/status_im/contexts/chat/messenger/messages/constants.cljs similarity index 90% rename from src/status_im/contexts/chat/messages/constants.cljs rename to src/status_im/contexts/chat/messenger/messages/constants.cljs index 0516eac7bfb..c7f81528677 100644 --- a/src/status_im/contexts/chat/messages/constants.cljs +++ b/src/status_im/contexts/chat/messenger/messages/constants.cljs @@ -1,4 +1,4 @@ -(ns status-im.contexts.chat.messages.constants) +(ns status-im.contexts.chat.messenger.messages.constants) ;;;; Navigation (def ^:const top-bar-height 56) diff --git a/src/status_im/contexts/chat/messages/contact_requests/bottom_drawer/style.cljs b/src/status_im/contexts/chat/messenger/messages/contact_requests/bottom_drawer/style.cljs similarity index 50% rename from src/status_im/contexts/chat/messages/contact_requests/bottom_drawer/style.cljs rename to src/status_im/contexts/chat/messenger/messages/contact_requests/bottom_drawer/style.cljs index 033c8c48187..751c0beb18e 100644 --- a/src/status_im/contexts/chat/messages/contact_requests/bottom_drawer/style.cljs +++ b/src/status_im/contexts/chat/messenger/messages/contact_requests/bottom_drawer/style.cljs @@ -1,4 +1,4 @@ -(ns status-im.contexts.chat.messages.contact-requests.bottom-drawer.style) +(ns status-im.contexts.chat.messenger.messages.contact-requests.bottom-drawer.style) (def container {:position :absolute diff --git a/src/status_im/contexts/chat/messages/contact_requests/bottom_drawer/view.cljs b/src/status_im/contexts/chat/messenger/messages/contact_requests/bottom_drawer/view.cljs similarity index 90% rename from src/status_im/contexts/chat/messages/contact_requests/bottom_drawer/view.cljs rename to src/status_im/contexts/chat/messenger/messages/contact_requests/bottom_drawer/view.cljs index e43207a223e..e19f17ae06c 100644 --- a/src/status_im/contexts/chat/messages/contact_requests/bottom_drawer/view.cljs +++ b/src/status_im/contexts/chat/messenger/messages/contact_requests/bottom_drawer/view.cljs @@ -1,9 +1,9 @@ -(ns status-im.contexts.chat.messages.contact-requests.bottom-drawer.view +(ns status-im.contexts.chat.messenger.messages.contact-requests.bottom-drawer.view (:require [quo.core :as quo] [react-native.core :as rn] [status-im.constants :as constants] - [status-im.contexts.chat.messages.contact-requests.bottom-drawer.style :as style] + [status-im.contexts.chat.messenger.messages.contact-requests.bottom-drawer.style :as style] [status-im.contexts.shell.jump-to.constants :as jump-to.constants] [utils.i18n :as i18n] [utils.re-frame :as rf])) diff --git a/src/status_im/contexts/chat/messages/content/album/style.cljs b/src/status_im/contexts/chat/messenger/messages/content/album/style.cljs similarity index 93% rename from src/status_im/contexts/chat/messages/content/album/style.cljs rename to src/status_im/contexts/chat/messenger/messages/content/album/style.cljs index 89b14337d0b..afe483a5ff8 100644 --- a/src/status_im/contexts/chat/messages/content/album/style.cljs +++ b/src/status_im/contexts/chat/messenger/messages/content/album/style.cljs @@ -1,4 +1,4 @@ -(ns status-im.contexts.chat.messages.content.album.style +(ns status-im.contexts.chat.messenger.messages.content.album.style (:require [quo.foundations.colors :as colors] [status-im.constants :as constants])) diff --git a/src/status_im/contexts/chat/messages/content/album/view.cljs b/src/status_im/contexts/chat/messenger/messages/content/album/view.cljs similarity index 92% rename from src/status_im/contexts/chat/messages/content/album/view.cljs rename to src/status_im/contexts/chat/messenger/messages/content/album/view.cljs index 0ab04e9b7d0..4dbca7ce76d 100644 --- a/src/status_im/contexts/chat/messages/content/album/view.cljs +++ b/src/status_im/contexts/chat/messenger/messages/content/album/view.cljs @@ -1,13 +1,13 @@ -(ns status-im.contexts.chat.messages.content.album.view +(ns status-im.contexts.chat.messenger.messages.content.album.view (:require [quo.core :as quo] [quo.foundations.colors :as colors] [react-native.core :as rn] [react-native.fast-image :as fast-image] [status-im.constants :as constants] - [status-im.contexts.chat.messages.content.album.style :as style] - [status-im.contexts.chat.messages.content.image.view :as image] - [status-im.contexts.chat.messages.content.text.view :as text] + [status-im.contexts.chat.messenger.messages.content.album.style :as style] + [status-im.contexts.chat.messenger.messages.content.image.view :as image] + [status-im.contexts.chat.messenger.messages.content.text.view :as text] [utils.re-frame :as rf] [utils.url :as url])) diff --git a/src/status_im/contexts/chat/messages/content/audio/component_spec.cljs b/src/status_im/contexts/chat/messenger/messages/content/audio/component_spec.cljs similarity index 92% rename from src/status_im/contexts/chat/messages/content/audio/component_spec.cljs rename to src/status_im/contexts/chat/messenger/messages/content/audio/component_spec.cljs index ec7fd7ad016..ffefe272d5c 100644 --- a/src/status_im/contexts/chat/messages/content/audio/component_spec.cljs +++ b/src/status_im/contexts/chat/messenger/messages/content/audio/component_spec.cljs @@ -1,7 +1,7 @@ -(ns status-im.contexts.chat.messages.content.audio.component-spec +(ns status-im.contexts.chat.messenger.messages.content.audio.component-spec (:require [react-native.audio-toolkit :as audio] - [status-im.contexts.chat.messages.content.audio.view :as audio-message] + [status-im.contexts.chat.messenger.messages.content.audio.view :as audio-message] [test-helpers.component :as h])) ;; We can't rely on `with-redefs` with async code. diff --git a/src/status_im/contexts/chat/messages/content/audio/style.cljs b/src/status_im/contexts/chat/messenger/messages/content/audio/style.cljs similarity index 93% rename from src/status_im/contexts/chat/messages/content/audio/style.cljs rename to src/status_im/contexts/chat/messenger/messages/content/audio/style.cljs index 53f3cf9dcea..31f772b5ab5 100644 --- a/src/status_im/contexts/chat/messages/content/audio/style.cljs +++ b/src/status_im/contexts/chat/messenger/messages/content/audio/style.cljs @@ -1,4 +1,4 @@ -(ns status-im.contexts.chat.messages.content.audio.style +(ns status-im.contexts.chat.messenger.messages.content.audio.style (:require [quo.foundations.colors :as colors] [quo.theme :as theme])) diff --git a/src/status_im/contexts/chat/messages/content/audio/view.cljs b/src/status_im/contexts/chat/messenger/messages/content/audio/view.cljs similarity index 98% rename from src/status_im/contexts/chat/messages/content/audio/view.cljs rename to src/status_im/contexts/chat/messenger/messages/content/audio/view.cljs index a27700dbe71..5de4163847c 100644 --- a/src/status_im/contexts/chat/messages/content/audio/view.cljs +++ b/src/status_im/contexts/chat/messenger/messages/content/audio/view.cljs @@ -1,4 +1,4 @@ -(ns status-im.contexts.chat.messages.content.audio.view +(ns status-im.contexts.chat.messenger.messages.content.audio.view (:require ["react-native-blob-util" :default ReactNativeBlobUtil] [goog.string :as gstring] @@ -9,7 +9,7 @@ [react-native.platform :as platform] [reagent.core :as reagent] [status-im.constants :as constants] - [status-im.contexts.chat.messages.content.audio.style :as style] + [status-im.contexts.chat.messenger.messages.content.audio.style :as style] [taoensso.timbre :as log] [utils.i18n :as i18n] [utils.re-frame :as rf])) diff --git a/src/status_im/contexts/chat/messages/content/deleted/view.cljs b/src/status_im/contexts/chat/messenger/messages/content/deleted/view.cljs similarity index 98% rename from src/status_im/contexts/chat/messages/content/deleted/view.cljs rename to src/status_im/contexts/chat/messenger/messages/content/deleted/view.cljs index 800b062901f..b4ac2901226 100644 --- a/src/status_im/contexts/chat/messages/content/deleted/view.cljs +++ b/src/status_im/contexts/chat/messenger/messages/content/deleted/view.cljs @@ -1,4 +1,4 @@ -(ns status-im.contexts.chat.messages.content.deleted.view +(ns status-im.contexts.chat.messenger.messages.content.deleted.view (:require [quo.core :as quo] [react-native.core :as rn] diff --git a/src/status_im/contexts/chat/messages/content/image/view.cljs b/src/status_im/contexts/chat/messenger/messages/content/image/view.cljs similarity index 95% rename from src/status_im/contexts/chat/messages/content/image/view.cljs rename to src/status_im/contexts/chat/messenger/messages/content/image/view.cljs index fbd8f2f5c71..d3cf723b55e 100644 --- a/src/status_im/contexts/chat/messages/content/image/view.cljs +++ b/src/status_im/contexts/chat/messenger/messages/content/image/view.cljs @@ -1,10 +1,10 @@ -(ns status-im.contexts.chat.messages.content.image.view +(ns status-im.contexts.chat.messenger.messages.content.image.view (:require [react-native.core :as rn] [react-native.fast-image :as fast-image] [react-native.safe-area :as safe-area] [status-im.constants :as constants] - [status-im.contexts.chat.messages.content.text.view :as text] + [status-im.contexts.chat.messenger.messages.content.text.view :as text] [utils.re-frame :as rf] [utils.url :as url])) diff --git a/src/status_im/contexts/chat/messages/content/link_preview/view.cljs b/src/status_im/contexts/chat/messenger/messages/content/link_preview/view.cljs similarity index 91% rename from src/status_im/contexts/chat/messages/content/link_preview/view.cljs rename to src/status_im/contexts/chat/messenger/messages/content/link_preview/view.cljs index 957c7f565df..e4397dc8d67 100644 --- a/src/status_im/contexts/chat/messages/content/link_preview/view.cljs +++ b/src/status_im/contexts/chat/messenger/messages/content/link_preview/view.cljs @@ -1,4 +1,4 @@ -(ns status-im.contexts.chat.messages.content.link-preview.view +(ns status-im.contexts.chat.messenger.messages.content.link-preview.view (:require [quo.core :as quo] [utils.re-frame :as rf])) diff --git a/src/status_im/contexts/chat/messages/content/link_preview/view_test.cljs b/src/status_im/contexts/chat/messenger/messages/content/link_preview/view_test.cljs similarity index 67% rename from src/status_im/contexts/chat/messages/content/link_preview/view_test.cljs rename to src/status_im/contexts/chat/messenger/messages/content/link_preview/view_test.cljs index b5e83140270..1c204dfe81f 100644 --- a/src/status_im/contexts/chat/messages/content/link_preview/view_test.cljs +++ b/src/status_im/contexts/chat/messenger/messages/content/link_preview/view_test.cljs @@ -1,7 +1,7 @@ -(ns status-im.contexts.chat.messages.content.link-preview.view-test +(ns status-im.contexts.chat.messenger.messages.content.link-preview.view-test (:require [cljs.test :refer [are deftest is]] - [status-im.contexts.chat.messages.content.link-preview.view :as view])) + [status-im.contexts.chat.messenger.messages.content.link-preview.view :as view])) (deftest nearly-square?-test (are [pred width height] (is (pred (view/nearly-square? {:width width :height height}))) diff --git a/src/status_im/contexts/chat/messages/content/pin/style.cljs b/src/status_im/contexts/chat/messenger/messages/content/pin/style.cljs similarity index 94% rename from src/status_im/contexts/chat/messages/content/pin/style.cljs rename to src/status_im/contexts/chat/messenger/messages/content/pin/style.cljs index abcb7a8eb23..e7159c0f2a1 100644 --- a/src/status_im/contexts/chat/messages/content/pin/style.cljs +++ b/src/status_im/contexts/chat/messenger/messages/content/pin/style.cljs @@ -1,4 +1,4 @@ -(ns status-im.contexts.chat.messages.content.pin.style +(ns status-im.contexts.chat.messenger.messages.content.pin.style (:require [quo.foundations.colors :as colors])) diff --git a/src/status_im/contexts/chat/messages/content/pin/view.cljs b/src/status_im/contexts/chat/messenger/messages/content/pin/view.cljs similarity index 86% rename from src/status_im/contexts/chat/messages/content/pin/view.cljs rename to src/status_im/contexts/chat/messenger/messages/content/pin/view.cljs index 9bb5c4a850d..95e7a5e59a7 100644 --- a/src/status_im/contexts/chat/messages/content/pin/view.cljs +++ b/src/status_im/contexts/chat/messenger/messages/content/pin/view.cljs @@ -1,10 +1,10 @@ -(ns status-im.contexts.chat.messages.content.pin.view +(ns status-im.contexts.chat.messenger.messages.content.pin.view (:require [quo.core :as quo] [quo.foundations.colors :as colors] [react-native.core :as rn] - [status-im.contexts.chat.composer.reply.view :as reply] - [status-im.contexts.chat.messages.content.pin.style :as style] + [status-im.contexts.chat.messenger.composer.reply.view :as reply] + [status-im.contexts.chat.messenger.messages.content.pin.style :as style] [utils.i18n :as i18n] [utils.re-frame :as rf])) diff --git a/src/status_im/contexts/chat/messages/content/reactions/events.cljs b/src/status_im/contexts/chat/messenger/messages/content/reactions/events.cljs similarity index 98% rename from src/status_im/contexts/chat/messages/content/reactions/events.cljs rename to src/status_im/contexts/chat/messenger/messages/content/reactions/events.cljs index aaaab2d0377..3368fe391c9 100644 --- a/src/status_im/contexts/chat/messages/content/reactions/events.cljs +++ b/src/status_im/contexts/chat/messenger/messages/content/reactions/events.cljs @@ -1,4 +1,4 @@ -(ns status-im.contexts.chat.messages.content.reactions.events +(ns status-im.contexts.chat.messenger.messages.content.reactions.events (:require [clojure.set :as set] [status-im.constants :as constants] [taoensso.timbre :as log] diff --git a/src/status_im/contexts/chat/messages/content/reactions/view.cljs b/src/status_im/contexts/chat/messenger/messages/content/reactions/view.cljs similarity index 95% rename from src/status_im/contexts/chat/messages/content/reactions/view.cljs rename to src/status_im/contexts/chat/messenger/messages/content/reactions/view.cljs index 6af8a5979a7..7e61ec4f490 100644 --- a/src/status_im/contexts/chat/messages/content/reactions/view.cljs +++ b/src/status_im/contexts/chat/messenger/messages/content/reactions/view.cljs @@ -1,9 +1,9 @@ -(ns status-im.contexts.chat.messages.content.reactions.view +(ns status-im.contexts.chat.messenger.messages.content.reactions.view (:require [quo.core :as quo] [quo.theme :as quo.theme] [status-im.constants :as constants] - [status-im.contexts.chat.messages.drawers.view :as drawers] + [status-im.contexts.chat.messenger.messages.drawers.view :as drawers] [utils.re-frame :as rf])) (defn- on-press diff --git a/src/status_im/contexts/chat/messages/content/status/style.cljs b/src/status_im/contexts/chat/messenger/messages/content/status/style.cljs similarity index 79% rename from src/status_im/contexts/chat/messages/content/status/style.cljs rename to src/status_im/contexts/chat/messenger/messages/content/status/style.cljs index 7eb1bb1ead0..15a829b7e80 100644 --- a/src/status_im/contexts/chat/messages/content/status/style.cljs +++ b/src/status_im/contexts/chat/messenger/messages/content/status/style.cljs @@ -1,4 +1,4 @@ -(ns status-im.contexts.chat.messages.content.status.style +(ns status-im.contexts.chat.messenger.messages.content.status.style (:require [quo.foundations.colors :as colors])) diff --git a/src/status_im/contexts/chat/messages/content/status/view.cljs b/src/status_im/contexts/chat/messenger/messages/content/status/view.cljs similarity index 80% rename from src/status_im/contexts/chat/messages/content/status/view.cljs rename to src/status_im/contexts/chat/messenger/messages/content/status/view.cljs index e219fbe93b9..4f2d4389b42 100644 --- a/src/status_im/contexts/chat/messages/content/status/view.cljs +++ b/src/status_im/contexts/chat/messenger/messages/content/status/view.cljs @@ -1,9 +1,9 @@ -(ns status-im.contexts.chat.messages.content.status.view +(ns status-im.contexts.chat.messenger.messages.content.status.view (:require [quo.core :as quo] [quo.foundations.colors :as colors] [react-native.core :as rn] - [status-im.contexts.chat.messages.content.status.style :as style] + [status-im.contexts.chat.messenger.messages.content.status.style :as style] [utils.i18n :as i18n])) (defn status diff --git a/src/status_im/contexts/chat/messages/content/style.cljs b/src/status_im/contexts/chat/messenger/messages/content/style.cljs similarity index 92% rename from src/status_im/contexts/chat/messages/content/style.cljs rename to src/status_im/contexts/chat/messenger/messages/content/style.cljs index 124c4cae7b7..59701b052fe 100644 --- a/src/status_im/contexts/chat/messages/content/style.cljs +++ b/src/status_im/contexts/chat/messenger/messages/content/style.cljs @@ -1,4 +1,4 @@ -(ns status-im.contexts.chat.messages.content.style +(ns status-im.contexts.chat.messenger.messages.content.style (:require [quo.foundations.colors :as colors])) diff --git a/src/status_im/contexts/chat/messages/content/system/text/view.cljs b/src/status_im/contexts/chat/messenger/messages/content/system/text/view.cljs similarity index 77% rename from src/status_im/contexts/chat/messages/content/system/text/view.cljs rename to src/status_im/contexts/chat/messenger/messages/content/system/text/view.cljs index 5a29879efe0..f12c3823b3a 100644 --- a/src/status_im/contexts/chat/messages/content/system/text/view.cljs +++ b/src/status_im/contexts/chat/messenger/messages/content/system/text/view.cljs @@ -1,4 +1,4 @@ -(ns status-im.contexts.chat.messages.content.system.text.view +(ns status-im.contexts.chat.messenger.messages.content.system.text.view (:require [legacy.status-im.ui.screens.chat.message.legacy-view :as old-message] [react-native.core :as rn])) diff --git a/src/status_im/contexts/chat/messages/content/text/style.cljs b/src/status_im/contexts/chat/messenger/messages/content/text/style.cljs similarity index 94% rename from src/status_im/contexts/chat/messages/content/text/style.cljs rename to src/status_im/contexts/chat/messenger/messages/content/text/style.cljs index 0a57af37705..c5afbe9c2c0 100644 --- a/src/status_im/contexts/chat/messages/content/text/style.cljs +++ b/src/status_im/contexts/chat/messenger/messages/content/text/style.cljs @@ -1,4 +1,4 @@ -(ns status-im.contexts.chat.messages.content.text.style +(ns status-im.contexts.chat.messenger.messages.content.text.style (:require [quo.foundations.colors :as colors] [react-native.platform :as platform])) diff --git a/src/status_im/contexts/chat/messages/content/text/view.cljs b/src/status_im/contexts/chat/messenger/messages/content/text/view.cljs similarity index 95% rename from src/status_im/contexts/chat/messages/content/text/view.cljs rename to src/status_im/contexts/chat/messenger/messages/content/text/view.cljs index 477affea4f3..e83366d8f3e 100644 --- a/src/status_im/contexts/chat/messages/content/text/view.cljs +++ b/src/status_im/contexts/chat/messenger/messages/content/text/view.cljs @@ -1,11 +1,11 @@ -(ns status-im.contexts.chat.messages.content.text.view +(ns status-im.contexts.chat.messenger.messages.content.text.view (:require [quo.core :as quo] [quo.foundations.colors :as colors] [react-native.core :as rn] [react-native.platform :as platform] - [status-im.contexts.chat.messages.content.link-preview.view :as link-preview] - [status-im.contexts.chat.messages.content.text.style :as style] + [status-im.contexts.chat.messenger.messages.content.link-preview.view :as link-preview] + [status-im.contexts.chat.messenger.messages.content.text.style :as style] [utils.i18n :as i18n] [utils.re-frame :as rf])) diff --git a/src/status_im/contexts/chat/messages/content/unknown/view.cljs b/src/status_im/contexts/chat/messenger/messages/content/unknown/view.cljs similarity index 76% rename from src/status_im/contexts/chat/messages/content/unknown/view.cljs rename to src/status_im/contexts/chat/messenger/messages/content/unknown/view.cljs index e54b7300a00..7e1b7ff3263 100644 --- a/src/status_im/contexts/chat/messages/content/unknown/view.cljs +++ b/src/status_im/contexts/chat/messenger/messages/content/unknown/view.cljs @@ -1,4 +1,4 @@ -(ns status-im.contexts.chat.messages.content.unknown.view +(ns status-im.contexts.chat.messenger.messages.content.unknown.view (:require [react-native.core :as rn])) diff --git a/src/status_im/contexts/chat/messages/content/view.cljs b/src/status_im/contexts/chat/messenger/messages/content/view.cljs similarity index 90% rename from src/status_im/contexts/chat/messages/content/view.cljs rename to src/status_im/contexts/chat/messenger/messages/content/view.cljs index aadf109b616..450d7e9c816 100644 --- a/src/status_im/contexts/chat/messages/content/view.cljs +++ b/src/status_im/contexts/chat/messenger/messages/content/view.cljs @@ -1,4 +1,4 @@ -(ns status-im.contexts.chat.messages.content.view +(ns status-im.contexts.chat.messenger.messages.content.view (:require [legacy.status-im.ui.screens.chat.message.legacy-view :as old-message] [quo.core :as quo] @@ -10,20 +10,20 @@ [reagent.core :as reagent] [status-im.common.not-implemented :as not-implemented] [status-im.constants :as constants] - [status-im.contexts.chat.composer.reply.view :as reply] - [status-im.contexts.chat.messages.avatar.view :as avatar] - [status-im.contexts.chat.messages.content.album.view :as album] - [status-im.contexts.chat.messages.content.audio.view :as audio] - [status-im.contexts.chat.messages.content.deleted.view :as content.deleted] - [status-im.contexts.chat.messages.content.image.view :as image] - [status-im.contexts.chat.messages.content.pin.view :as pin] - [status-im.contexts.chat.messages.content.reactions.view :as reactions] - [status-im.contexts.chat.messages.content.status.view :as status] - [status-im.contexts.chat.messages.content.style :as style] - [status-im.contexts.chat.messages.content.system.text.view :as system.text] - [status-im.contexts.chat.messages.content.text.view :as content.text] - [status-im.contexts.chat.messages.content.unknown.view :as content.unknown] - [status-im.contexts.chat.messages.drawers.view :as drawers] + [status-im.contexts.chat.messenger.composer.reply.view :as reply] + [status-im.contexts.chat.messenger.messages.avatar.view :as avatar] + [status-im.contexts.chat.messenger.messages.content.album.view :as album] + [status-im.contexts.chat.messenger.messages.content.audio.view :as audio] + [status-im.contexts.chat.messenger.messages.content.deleted.view :as content.deleted] + [status-im.contexts.chat.messenger.messages.content.image.view :as image] + [status-im.contexts.chat.messenger.messages.content.pin.view :as pin] + [status-im.contexts.chat.messenger.messages.content.reactions.view :as reactions] + [status-im.contexts.chat.messenger.messages.content.status.view :as status] + [status-im.contexts.chat.messenger.messages.content.style :as style] + [status-im.contexts.chat.messenger.messages.content.system.text.view :as system.text] + [status-im.contexts.chat.messenger.messages.content.text.view :as content.text] + [status-im.contexts.chat.messenger.messages.content.unknown.view :as content.unknown] + [status-im.contexts.chat.messenger.messages.drawers.view :as drawers] [utils.address :as address] [utils.datetime :as datetime] [utils.re-frame :as rf])) diff --git a/src/status_im/contexts/chat/messages/delete_message/events.cljs b/src/status_im/contexts/chat/messenger/messages/delete_message/events.cljs similarity index 98% rename from src/status_im/contexts/chat/messages/delete_message/events.cljs rename to src/status_im/contexts/chat/messenger/messages/delete_message/events.cljs index 98914bc83a6..23a9e2a8373 100644 --- a/src/status_im/contexts/chat/messages/delete_message/events.cljs +++ b/src/status_im/contexts/chat/messenger/messages/delete_message/events.cljs @@ -1,6 +1,6 @@ -(ns status-im.contexts.chat.messages.delete-message.events +(ns status-im.contexts.chat.messenger.messages.delete-message.events (:require - [status-im.contexts.chat.messages.list.events :as message-list] + [status-im.contexts.chat.messenger.messages.list.events :as message-list] [taoensso.timbre :as log] [utils.datetime :as datetime] [utils.i18n :as i18n] diff --git a/src/status_im/contexts/chat/messages/delete_message/events_test.cljs b/src/status_im/contexts/chat/messenger/messages/delete_message/events_test.cljs similarity index 97% rename from src/status_im/contexts/chat/messages/delete_message/events_test.cljs rename to src/status_im/contexts/chat/messenger/messages/delete_message/events_test.cljs index 3254e746884..d11e9f7be25 100644 --- a/src/status_im/contexts/chat/messages/delete_message/events_test.cljs +++ b/src/status_im/contexts/chat/messenger/messages/delete_message/events_test.cljs @@ -1,7 +1,7 @@ -(ns status-im.contexts.chat.messages.delete-message.events-test +(ns status-im.contexts.chat.messenger.messages.delete-message.events-test (:require [cljs.test :refer-macros [deftest is testing]] - [status-im.contexts.chat.messages.delete-message.events :as delete-message] + [status-im.contexts.chat.messenger.messages.delete-message.events :as delete-message] [utils.datetime :as datetime])) (def mid "message-id") diff --git a/src/status_im/contexts/chat/messages/delete_message_for_me/events.cljs b/src/status_im/contexts/chat/messenger/messages/delete_message_for_me/events.cljs similarity index 97% rename from src/status_im/contexts/chat/messages/delete_message_for_me/events.cljs rename to src/status_im/contexts/chat/messenger/messages/delete_message_for_me/events.cljs index baf559b5a88..05b8f1195a1 100644 --- a/src/status_im/contexts/chat/messages/delete_message_for_me/events.cljs +++ b/src/status_im/contexts/chat/messenger/messages/delete_message_for_me/events.cljs @@ -1,6 +1,6 @@ -(ns status-im.contexts.chat.messages.delete-message-for-me.events +(ns status-im.contexts.chat.messenger.messages.delete-message-for-me.events (:require - [status-im.contexts.chat.messages.list.events :as message-list] + [status-im.contexts.chat.messenger.messages.list.events :as message-list] [taoensso.timbre :as log] [utils.datetime :as datetime] [utils.i18n :as i18n] diff --git a/src/status_im/contexts/chat/messages/delete_message_for_me/events_test.cljs b/src/status_im/contexts/chat/messenger/messages/delete_message_for_me/events_test.cljs similarity index 97% rename from src/status_im/contexts/chat/messages/delete_message_for_me/events_test.cljs rename to src/status_im/contexts/chat/messenger/messages/delete_message_for_me/events_test.cljs index 6aea15f0381..712275cc44d 100644 --- a/src/status_im/contexts/chat/messages/delete_message_for_me/events_test.cljs +++ b/src/status_im/contexts/chat/messenger/messages/delete_message_for_me/events_test.cljs @@ -1,7 +1,7 @@ -(ns status-im.contexts.chat.messages.delete-message-for-me.events-test +(ns status-im.contexts.chat.messenger.messages.delete-message-for-me.events-test (:require [cljs.test :refer-macros [deftest is testing]] - [status-im.contexts.chat.messages.delete-message-for-me.events :as + [status-im.contexts.chat.messenger.messages.delete-message-for-me.events :as delete-message-for-me] [utils.datetime :as datetime])) diff --git a/src/status_im/contexts/chat/messages/drawers/style.cljs b/src/status_im/contexts/chat/messenger/messages/drawers/style.cljs similarity index 89% rename from src/status_im/contexts/chat/messages/drawers/style.cljs rename to src/status_im/contexts/chat/messenger/messages/drawers/style.cljs index dfb77dd4f3d..934e40b30c6 100644 --- a/src/status_im/contexts/chat/messages/drawers/style.cljs +++ b/src/status_im/contexts/chat/messenger/messages/drawers/style.cljs @@ -1,4 +1,4 @@ -(ns status-im.contexts.chat.messages.drawers.style +(ns status-im.contexts.chat.messenger.messages.drawers.style (:require [quo.foundations.colors :as colors])) diff --git a/src/status_im/contexts/chat/messages/drawers/view.cljs b/src/status_im/contexts/chat/messenger/messages/drawers/view.cljs similarity index 98% rename from src/status_im/contexts/chat/messages/drawers/view.cljs rename to src/status_im/contexts/chat/messenger/messages/drawers/view.cljs index 2e99b7f6af5..e269ecf0399 100644 --- a/src/status_im/contexts/chat/messages/drawers/view.cljs +++ b/src/status_im/contexts/chat/messenger/messages/drawers/view.cljs @@ -1,4 +1,4 @@ -(ns status-im.contexts.chat.messages.drawers.view +(ns status-im.contexts.chat.messenger.messages.drawers.view (:require [quo.components.selectors.reaction-resource :as reactions.resource] [quo.core :as quo] @@ -8,8 +8,8 @@ [reagent.core :as reagent] [status-im.common.contact-list-item.view :as contact-list-item] [status-im.constants :as constants] - [status-im.contexts.chat.composer.reply.view :as reply] - [status-im.contexts.chat.messages.drawers.style :as style] + [status-im.contexts.chat.messenger.composer.reply.view :as reply] + [status-im.contexts.chat.messenger.messages.drawers.style :as style] [utils.i18n :as i18n] [utils.re-frame :as rf])) diff --git a/src/status_im/contexts/chat/messages/link_preview/events.cljs b/src/status_im/contexts/chat/messenger/messages/link_preview/events.cljs similarity index 99% rename from src/status_im/contexts/chat/messages/link_preview/events.cljs rename to src/status_im/contexts/chat/messenger/messages/link_preview/events.cljs index c4a705bb30c..70a640fe4ed 100644 --- a/src/status_im/contexts/chat/messages/link_preview/events.cljs +++ b/src/status_im/contexts/chat/messenger/messages/link_preview/events.cljs @@ -1,4 +1,4 @@ -(ns status-im.contexts.chat.messages.link-preview.events +(ns status-im.contexts.chat.messenger.messages.link-preview.events (:require [camel-snake-kebab.core :as csk] [legacy.status-im.mailserver.core :as mailserver] diff --git a/src/status_im/contexts/chat/messages/link_preview/events_test.cljs b/src/status_im/contexts/chat/messenger/messages/link_preview/events_test.cljs similarity index 97% rename from src/status_im/contexts/chat/messages/link_preview/events_test.cljs rename to src/status_im/contexts/chat/messenger/messages/link_preview/events_test.cljs index e4f0564c2fb..1c5fda33a97 100644 --- a/src/status_im/contexts/chat/messages/link_preview/events_test.cljs +++ b/src/status_im/contexts/chat/messenger/messages/link_preview/events_test.cljs @@ -1,8 +1,8 @@ -(ns status-im.contexts.chat.messages.link-preview.events-test +(ns status-im.contexts.chat.messenger.messages.link-preview.events-test (:require [cljs.test :as t] [legacy.status-im.mailserver.core :as mailserver] matcher-combinators.test - [status-im.contexts.chat.messages.link-preview.events :as sut])) + [status-im.contexts.chat.messenger.messages.link-preview.events :as sut])) (t/deftest fetch-community (t/testing "with community id" diff --git a/src/status_im/contexts/chat/messages/link_preview/style.cljs b/src/status_im/contexts/chat/messenger/messages/link_preview/style.cljs similarity index 96% rename from src/status_im/contexts/chat/messages/link_preview/style.cljs rename to src/status_im/contexts/chat/messenger/messages/link_preview/style.cljs index 1b9aaafe414..614058777fa 100644 --- a/src/status_im/contexts/chat/messages/link_preview/style.cljs +++ b/src/status_im/contexts/chat/messenger/messages/link_preview/style.cljs @@ -1,4 +1,4 @@ -(ns status-im.contexts.chat.messages.link-preview.style +(ns status-im.contexts.chat.messenger.messages.link-preview.style (:require [quo.foundations.colors :as colors] [quo.foundations.typography :as typography] diff --git a/src/status_im/contexts/chat/messages/link_preview/view.cljs b/src/status_im/contexts/chat/messenger/messages/link_preview/view.cljs similarity index 96% rename from src/status_im/contexts/chat/messages/link_preview/view.cljs rename to src/status_im/contexts/chat/messenger/messages/link_preview/view.cljs index 90d615b1e11..5bf5fe9921f 100644 --- a/src/status_im/contexts/chat/messages/link_preview/view.cljs +++ b/src/status_im/contexts/chat/messenger/messages/link_preview/view.cljs @@ -1,4 +1,4 @@ -(ns status-im.contexts.chat.messages.link-preview.view +(ns status-im.contexts.chat.messenger.messages.link-preview.view (:require [clojure.string :as string] [quo.core :as quo] @@ -6,8 +6,8 @@ [react-native.fast-image :as fast-image] [reagent.core :as reagent] [status-im.constants :as constants] - [status-im.contexts.chat.messages.link-preview.events] - [status-im.contexts.chat.messages.link-preview.style :as style] + [status-im.contexts.chat.messenger.messages.link-preview.events] + [status-im.contexts.chat.messenger.messages.link-preview.style :as style] [utils.i18n :as i18n] [utils.re-frame :as rf] [utils.security.core :as security])) diff --git a/src/status_im/contexts/chat/messages/list/events.cljs b/src/status_im/contexts/chat/messenger/messages/list/events.cljs similarity index 99% rename from src/status_im/contexts/chat/messages/list/events.cljs rename to src/status_im/contexts/chat/messenger/messages/list/events.cljs index b9c9fa50712..7b741b013e5 100644 --- a/src/status_im/contexts/chat/messages/list/events.cljs +++ b/src/status_im/contexts/chat/messenger/messages/list/events.cljs @@ -1,4 +1,4 @@ -(ns status-im.contexts.chat.messages.list.events +(ns status-im.contexts.chat.messenger.messages.list.events (:require [status-im.constants :as constants] [utils.datetime :as datetime] diff --git a/src/status_im/contexts/chat/messages/list/events_test.cljs b/src/status_im/contexts/chat/messenger/messages/list/events_test.cljs similarity index 98% rename from src/status_im/contexts/chat/messages/list/events_test.cljs rename to src/status_im/contexts/chat/messenger/messages/list/events_test.cljs index bed155efbfb..f1d12513df0 100644 --- a/src/status_im/contexts/chat/messages/list/events_test.cljs +++ b/src/status_im/contexts/chat/messenger/messages/list/events_test.cljs @@ -1,7 +1,7 @@ -(ns status-im.contexts.chat.messages.list.events-test +(ns status-im.contexts.chat.messenger.messages.list.events-test (:require [cljs.test :refer-macros [deftest is testing]] - [status-im.contexts.chat.messages.list.events :as s] + [status-im.contexts.chat.messenger.messages.list.events :as s] [taoensso.tufte :as tufte :refer-macros [defnp profile]])) (deftest message-stream-tests diff --git a/src/status_im/contexts/chat/messages/list/state.cljs b/src/status_im/contexts/chat/messenger/messages/list/state.cljs similarity index 81% rename from src/status_im/contexts/chat/messages/list/state.cljs rename to src/status_im/contexts/chat/messenger/messages/list/state.cljs index 9ecc88735a4..d06974e912a 100644 --- a/src/status_im/contexts/chat/messages/list/state.cljs +++ b/src/status_im/contexts/chat/messenger/messages/list/state.cljs @@ -1,4 +1,4 @@ -(ns status-im.contexts.chat.messages.list.state) +(ns status-im.contexts.chat.messenger.messages.list.state) (defonce first-not-visible-item (atom nil)) diff --git a/src/status_im/contexts/chat/messages/list/style.cljs b/src/status_im/contexts/chat/messenger/messages/list/style.cljs similarity index 89% rename from src/status_im/contexts/chat/messages/list/style.cljs rename to src/status_im/contexts/chat/messenger/messages/list/style.cljs index 9e34ca2eff2..482704e0253 100644 --- a/src/status_im/contexts/chat/messages/list/style.cljs +++ b/src/status_im/contexts/chat/messenger/messages/list/style.cljs @@ -1,8 +1,8 @@ -(ns status-im.contexts.chat.messages.list.style +(ns status-im.contexts.chat.messenger.messages.list.style (:require [quo.foundations.colors :as colors] [react-native.reanimated :as reanimated] - [status-im.contexts.chat.messages.constants :as messages.constants])) + [status-im.contexts.chat.messenger.messages.constants :as messages.constants])) (def keyboard-avoiding-container {:flex 1 diff --git a/src/status_im/contexts/chat/messages/list/view.cljs b/src/status_im/contexts/chat/messenger/messages/list/view.cljs similarity index 97% rename from src/status_im/contexts/chat/messages/list/view.cljs rename to src/status_im/contexts/chat/messenger/messages/list/view.cljs index 3389a63b797..656b05ebc5b 100644 --- a/src/status_im/contexts/chat/messages/list/view.cljs +++ b/src/status_im/contexts/chat/messenger/messages/list/view.cljs @@ -1,4 +1,4 @@ -(ns status-im.contexts.chat.messages.list.view +(ns status-im.contexts.chat.messenger.messages.list.view (:require [legacy.status-im.ui.screens.chat.group :as chat.group] [oops.core :as oops] @@ -13,11 +13,11 @@ [react-native.safe-area :as safe-area] [status-im.common.home.actions.view :as home.actions] [status-im.constants :as constants] - [status-im.contexts.chat.composer.constants :as composer.constants] - [status-im.contexts.chat.messages.constants :as messages.constants] - [status-im.contexts.chat.messages.content.view :as message] - [status-im.contexts.chat.messages.list.state :as state] - [status-im.contexts.chat.messages.list.style :as style] + [status-im.contexts.chat.messenger.composer.constants :as composer.constants] + [status-im.contexts.chat.messenger.messages.constants :as messages.constants] + [status-im.contexts.chat.messenger.messages.content.view :as message] + [status-im.contexts.chat.messenger.messages.list.state :as state] + [status-im.contexts.chat.messenger.messages.list.style :as style] [status-im.contexts.shell.jump-to.constants :as jump-to.constants] [utils.i18n :as i18n] [utils.re-frame :as rf] diff --git a/src/status_im/contexts/chat/messages/navigation/style.cljs b/src/status_im/contexts/chat/messenger/messages/navigation/style.cljs similarity index 95% rename from src/status_im/contexts/chat/messages/navigation/style.cljs rename to src/status_im/contexts/chat/messenger/messages/navigation/style.cljs index c07f6c94ec3..682f8210619 100644 --- a/src/status_im/contexts/chat/messages/navigation/style.cljs +++ b/src/status_im/contexts/chat/messenger/messages/navigation/style.cljs @@ -1,4 +1,4 @@ -(ns status-im.contexts.chat.messages.navigation.style +(ns status-im.contexts.chat.messenger.messages.navigation.style (:require [quo.foundations.colors :as colors] [react-native.reanimated :as reanimated])) diff --git a/src/status_im/contexts/chat/messages/navigation/view.cljs b/src/status_im/contexts/chat/messenger/messages/navigation/view.cljs similarity index 95% rename from src/status_im/contexts/chat/messages/navigation/view.cljs rename to src/status_im/contexts/chat/messenger/messages/navigation/view.cljs index d858d38e1be..5318a07d20c 100644 --- a/src/status_im/contexts/chat/messages/navigation/view.cljs +++ b/src/status_im/contexts/chat/messenger/messages/navigation/view.cljs @@ -1,4 +1,4 @@ -(ns status-im.contexts.chat.messages.navigation.view +(ns status-im.contexts.chat.messenger.messages.navigation.view (:require [quo.core :as quo] [quo.foundations.colors :as colors] @@ -10,9 +10,9 @@ [react-native.safe-area :as safe-area] [status-im.common.home.actions.view :as actions] [status-im.constants :as constants] - [status-im.contexts.chat.messages.constants :as messages.constants] - [status-im.contexts.chat.messages.navigation.style :as style] - [status-im.contexts.chat.messages.pin.banner.view :as pin.banner] + [status-im.contexts.chat.messenger.messages.constants :as messages.constants] + [status-im.contexts.chat.messenger.messages.navigation.style :as style] + [status-im.contexts.chat.messenger.messages.pin.banner.view :as pin.banner] [utils.i18n :as i18n] [utils.re-frame :as rf] [utils.worklets.chat.messages :as worklets])) diff --git a/src/status_im/contexts/chat/messages/pin/banner/style.cljs b/src/status_im/contexts/chat/messenger/messages/pin/banner/style.cljs similarity index 71% rename from src/status_im/contexts/chat/messages/pin/banner/style.cljs rename to src/status_im/contexts/chat/messenger/messages/pin/banner/style.cljs index a1b6385a0ec..259d89851ea 100644 --- a/src/status_im/contexts/chat/messages/pin/banner/style.cljs +++ b/src/status_im/contexts/chat/messenger/messages/pin/banner/style.cljs @@ -1,7 +1,7 @@ -(ns status-im.contexts.chat.messages.pin.banner.style +(ns status-im.contexts.chat.messenger.messages.pin.banner.style (:require [react-native.reanimated :as reanimated] - [status-im.contexts.chat.messages.constants :as messages.constants])) + [status-im.contexts.chat.messenger.messages.constants :as messages.constants])) (def container {:position :absolute diff --git a/src/status_im/contexts/chat/messages/pin/banner/view.cljs b/src/status_im/contexts/chat/messenger/messages/pin/banner/view.cljs similarity index 88% rename from src/status_im/contexts/chat/messages/pin/banner/view.cljs rename to src/status_im/contexts/chat/messenger/messages/pin/banner/view.cljs index bc3493ca98b..9d664c45057 100644 --- a/src/status_im/contexts/chat/messages/pin/banner/view.cljs +++ b/src/status_im/contexts/chat/messenger/messages/pin/banner/view.cljs @@ -1,11 +1,11 @@ -(ns status-im.contexts.chat.messages.pin.banner.view +(ns status-im.contexts.chat.messenger.messages.pin.banner.view (:require [quo.core :as quo] [quo.theme :as theme] [react-native.blur :as blur] [react-native.platform :as platform] [react-native.reanimated :as reanimated] - [status-im.contexts.chat.messages.pin.banner.style :as style] + [status-im.contexts.chat.messenger.messages.pin.banner.style :as style] [utils.re-frame :as rf])) (defn f-banner diff --git a/src/status_im/contexts/chat/messages/pin/events.cljs b/src/status_im/contexts/chat/messenger/messages/pin/events.cljs similarity index 96% rename from src/status_im/contexts/chat/messages/pin/events.cljs rename to src/status_im/contexts/chat/messenger/messages/pin/events.cljs index fbed1f08578..9f03b947ef8 100644 --- a/src/status_im/contexts/chat/messages/pin/events.cljs +++ b/src/status_im/contexts/chat/messenger/messages/pin/events.cljs @@ -1,12 +1,12 @@ -(ns status-im.contexts.chat.messages.pin.events +(ns status-im.contexts.chat.messenger.messages.pin.events (:require [legacy.status-im.data-store.messages :as data-store.messages] [legacy.status-im.data-store.pin-messages :as data-store.pin-messages] [re-frame.core :as re-frame] [status-im.common.toasts.events :as toasts] [status-im.constants :as constants] - [status-im.contexts.chat.menus.pinned-messages.view :as pinned-messages-menu] - [status-im.contexts.chat.messages.list.events :as message-list] + [status-im.contexts.chat.messenger.menus.pinned-messages.view :as pinned-messages-menu] + [status-im.contexts.chat.messenger.messages.list.events :as message-list] [status-im.navigation.events :as navigation] [taoensso.timbre :as log] [utils.i18n :as i18n] diff --git a/src/status_im/contexts/chat/messages/pin/events_test.cljs b/src/status_im/contexts/chat/messenger/messages/pin/events_test.cljs similarity index 93% rename from src/status_im/contexts/chat/messages/pin/events_test.cljs rename to src/status_im/contexts/chat/messenger/messages/pin/events_test.cljs index a147bd6b2af..bfa942b97e4 100644 --- a/src/status_im/contexts/chat/messages/pin/events_test.cljs +++ b/src/status_im/contexts/chat/messenger/messages/pin/events_test.cljs @@ -1,7 +1,7 @@ -(ns status-im.contexts.chat.messages.pin.events-test +(ns status-im.contexts.chat.messenger.messages.pin.events-test (:require [cljs.test :refer-macros [deftest is testing]] - [status-im.contexts.chat.messages.pin.events :as events])) + [status-im.contexts.chat.messenger.messages.pin.events :as events])) (deftest receive-signal-test (let [chat-id "chat-id" diff --git a/src/status_im/contexts/chat/messages/resolver/message_resolver.cljs b/src/status_im/contexts/chat/messenger/messages/resolver/message_resolver.cljs similarity index 87% rename from src/status_im/contexts/chat/messages/resolver/message_resolver.cljs rename to src/status_im/contexts/chat/messenger/messages/resolver/message_resolver.cljs index 03d9fe2a7b3..c626816978a 100644 --- a/src/status_im/contexts/chat/messages/resolver/message_resolver.cljs +++ b/src/status_im/contexts/chat/messenger/messages/resolver/message_resolver.cljs @@ -1,4 +1,4 @@ -(ns status-im.contexts.chat.messages.resolver.message-resolver +(ns status-im.contexts.chat.messenger.messages.resolver.message-resolver (:require [utils.re-frame :as rf])) diff --git a/src/status_im/contexts/chat/messages/resolver/message_resolver_test.cljs b/src/status_im/contexts/chat/messenger/messages/resolver/message_resolver_test.cljs similarity index 82% rename from src/status_im/contexts/chat/messages/resolver/message_resolver_test.cljs rename to src/status_im/contexts/chat/messenger/messages/resolver/message_resolver_test.cljs index 85663eea4f0..766f5997b29 100644 --- a/src/status_im/contexts/chat/messages/resolver/message_resolver_test.cljs +++ b/src/status_im/contexts/chat/messenger/messages/resolver/message_resolver_test.cljs @@ -1,7 +1,7 @@ -(ns status-im.contexts.chat.messages.resolver.message-resolver-test +(ns status-im.contexts.chat.messenger.messages.resolver.message-resolver-test (:require [cljs.test :as t] - [status-im.contexts.chat.messages.resolver.message-resolver :as resolver] + [status-im.contexts.chat.messenger.messages.resolver.message-resolver :as resolver] [utils.re-frame :as rf])) (def mentions diff --git a/src/status_im/contexts/chat/messages/transport/events.cljs b/src/status_im/contexts/chat/messenger/messages/transport/events.cljs similarity index 98% rename from src/status_im/contexts/chat/messages/transport/events.cljs rename to src/status_im/contexts/chat/messenger/messages/transport/events.cljs index 679f837797a..6e785375bcf 100644 --- a/src/status_im/contexts/chat/messages/transport/events.cljs +++ b/src/status_im/contexts/chat/messenger/messages/transport/events.cljs @@ -1,4 +1,4 @@ -(ns status-im.contexts.chat.messages.transport.events +(ns status-im.contexts.chat.messenger.messages.transport.events (:require [clojure.set :as set] [clojure.string :as string] @@ -16,8 +16,8 @@ [status-im.constants :as constants] [status-im.contexts.chat.contacts.events :as models.contact] [status-im.contexts.chat.events :as chat.events] - [status-im.contexts.chat.messages.content.reactions.events :as reactions] - [status-im.contexts.chat.messages.pin.events :as messages.pin] + [status-im.contexts.chat.messenger.messages.content.reactions.events :as reactions] + [status-im.contexts.chat.messenger.messages.pin.events :as messages.pin] [status-im.contexts.communities.events :as communities] [status-im.contexts.shell.activity-center.events :as activity-center] [taoensso.timbre :as log] diff --git a/src/status_im/contexts/chat/messages/view.cljs b/src/status_im/contexts/chat/messenger/messages/view.cljs similarity index 85% rename from src/status_im/contexts/chat/messages/view.cljs rename to src/status_im/contexts/chat/messenger/messages/view.cljs index 44b6bba7a40..75979b5d64f 100644 --- a/src/status_im/contexts/chat/messages/view.cljs +++ b/src/status_im/contexts/chat/messenger/messages/view.cljs @@ -1,14 +1,14 @@ -(ns status-im.contexts.chat.messages.view +(ns status-im.contexts.chat.messenger.messages.view (:require [react-native.core :as rn] [react-native.reanimated :as reanimated] [react-native.safe-area :as safe-area] [reagent.core :as reagent] - [status-im.contexts.chat.composer.view :as composer.view] - [status-im.contexts.chat.messages.list.style :as style] - [status-im.contexts.chat.messages.list.view :as list.view] - [status-im.contexts.chat.messages.navigation.view :as messages.navigation] - [status-im.contexts.chat.placeholder.view :as placeholder.view] + [status-im.contexts.chat.messenger.composer.view :as composer.view] + [status-im.contexts.chat.messenger.messages.list.style :as style] + [status-im.contexts.chat.messenger.messages.list.view :as list.view] + [status-im.contexts.chat.messenger.messages.navigation.view :as messages.navigation] + [status-im.contexts.chat.messenger.placeholder.view :as placeholder.view] [utils.re-frame :as rf])) ;; NOTE(parvesh) - I am working on refactoring/optimization of the chat screen for performance diff --git a/src/status_im/contexts/chat/photo_selector/album_selector/style.cljs b/src/status_im/contexts/chat/messenger/photo_selector/album_selector/style.cljs similarity index 93% rename from src/status_im/contexts/chat/photo_selector/album_selector/style.cljs rename to src/status_im/contexts/chat/messenger/photo_selector/album_selector/style.cljs index d48704baf60..2ca1952bad7 100644 --- a/src/status_im/contexts/chat/photo_selector/album_selector/style.cljs +++ b/src/status_im/contexts/chat/messenger/photo_selector/album_selector/style.cljs @@ -1,4 +1,4 @@ -(ns status-im.contexts.chat.photo-selector.album-selector.style +(ns status-im.contexts.chat.messenger.photo-selector.album-selector.style (:require [quo.foundations.colors :as colors] [react-native.reanimated :as reanimated])) diff --git a/src/status_im/contexts/chat/photo_selector/album_selector/view.cljs b/src/status_im/contexts/chat/messenger/photo_selector/album_selector/view.cljs similarity index 96% rename from src/status_im/contexts/chat/photo_selector/album_selector/view.cljs rename to src/status_im/contexts/chat/messenger/photo_selector/album_selector/view.cljs index 319d5f8bc4d..867e914d0a2 100644 --- a/src/status_im/contexts/chat/photo_selector/album_selector/view.cljs +++ b/src/status_im/contexts/chat/messenger/photo_selector/album_selector/view.cljs @@ -1,4 +1,4 @@ -(ns status-im.contexts.chat.photo-selector.album-selector.view +(ns status-im.contexts.chat.messenger.photo-selector.album-selector.view (:require [quo.core :as quo] [quo.foundations.colors :as colors] @@ -6,7 +6,7 @@ [react-native.gesture :as gesture] [react-native.platform :as platform] [react-native.reanimated :as reanimated] - [status-im.contexts.chat.photo-selector.album-selector.style :as style] + [status-im.contexts.chat.messenger.photo-selector.album-selector.style :as style] [utils.i18n :as i18n] [utils.re-frame :as rf])) diff --git a/src/status_im/contexts/chat/photo_selector/effects.cljs b/src/status_im/contexts/chat/messenger/photo_selector/effects.cljs similarity index 98% rename from src/status_im/contexts/chat/photo_selector/effects.cljs rename to src/status_im/contexts/chat/messenger/photo_selector/effects.cljs index 6a2c0effafe..35e4032a769 100644 --- a/src/status_im/contexts/chat/photo_selector/effects.cljs +++ b/src/status_im/contexts/chat/messenger/photo_selector/effects.cljs @@ -1,4 +1,4 @@ -(ns status-im.contexts.chat.photo-selector.effects +(ns status-im.contexts.chat.messenger.photo-selector.effects (:require [clojure.string :as string] [react-native.cameraroll :as cameraroll] diff --git a/src/status_im/contexts/chat/photo_selector/events.cljs b/src/status_im/contexts/chat/messenger/photo_selector/events.cljs similarity index 95% rename from src/status_im/contexts/chat/photo_selector/events.cljs rename to src/status_im/contexts/chat/messenger/photo_selector/events.cljs index a2382c545c0..27f287f3293 100644 --- a/src/status_im/contexts/chat/photo_selector/events.cljs +++ b/src/status_im/contexts/chat/messenger/photo_selector/events.cljs @@ -1,7 +1,7 @@ -(ns status-im.contexts.chat.photo-selector.events +(ns status-im.contexts.chat.messenger.photo-selector.events (:require [status-im.constants :as constants] - status-im.contexts.chat.photo-selector.effects + status-im.contexts.chat.messenger.photo-selector.effects [utils.i18n :as i18n] [utils.re-frame :as rf])) diff --git a/src/status_im/contexts/chat/photo_selector/style.cljs b/src/status_im/contexts/chat/messenger/photo_selector/style.cljs similarity index 97% rename from src/status_im/contexts/chat/photo_selector/style.cljs rename to src/status_im/contexts/chat/messenger/photo_selector/style.cljs index c126023bc6e..8387eb13c46 100644 --- a/src/status_im/contexts/chat/photo_selector/style.cljs +++ b/src/status_im/contexts/chat/messenger/photo_selector/style.cljs @@ -1,4 +1,4 @@ -(ns status-im.contexts.chat.photo-selector.style +(ns status-im.contexts.chat.messenger.photo-selector.style (:require [quo.foundations.colors :as colors] [react-native.platform :as platform])) diff --git a/src/status_im/contexts/chat/photo_selector/view.cljs b/src/status_im/contexts/chat/messenger/photo_selector/view.cljs similarity index 96% rename from src/status_im/contexts/chat/photo_selector/view.cljs rename to src/status_im/contexts/chat/messenger/photo_selector/view.cljs index 7f5328418e5..a55451219cb 100644 --- a/src/status_im/contexts/chat/photo_selector/view.cljs +++ b/src/status_im/contexts/chat/messenger/photo_selector/view.cljs @@ -1,4 +1,4 @@ -(ns status-im.contexts.chat.photo-selector.view +(ns status-im.contexts.chat.messenger.photo-selector.view (:require [quo.core :as quo] [react-native.core :as rn] @@ -9,8 +9,8 @@ [react-native.safe-area :as safe-area] [reagent.core :as reagent] [status-im.constants :as constants] - [status-im.contexts.chat.photo-selector.album-selector.view :as album-selector] - [status-im.contexts.chat.photo-selector.style :as style] + [status-im.contexts.chat.messenger.photo-selector.album-selector.view :as album-selector] + [status-im.contexts.chat.messenger.photo-selector.style :as style] utils.collection [utils.i18n :as i18n] [utils.re-frame :as rf])) diff --git a/src/status_im/contexts/chat/placeholder/style.cljs b/src/status_im/contexts/chat/messenger/placeholder/style.cljs similarity index 89% rename from src/status_im/contexts/chat/placeholder/style.cljs rename to src/status_im/contexts/chat/messenger/placeholder/style.cljs index a0e853ecb93..a6309f17cb0 100644 --- a/src/status_im/contexts/chat/placeholder/style.cljs +++ b/src/status_im/contexts/chat/messenger/placeholder/style.cljs @@ -1,4 +1,4 @@ -(ns status-im.contexts.chat.placeholder.style +(ns status-im.contexts.chat.messenger.placeholder.style (:require [quo.foundations.colors :as colors] [react-native.reanimated :as reanimated])) diff --git a/src/status_im/contexts/chat/placeholder/view.cljs b/src/status_im/contexts/chat/messenger/placeholder/view.cljs similarity index 84% rename from src/status_im/contexts/chat/placeholder/view.cljs rename to src/status_im/contexts/chat/messenger/placeholder/view.cljs index 6b97073e62e..48ea4a38c68 100644 --- a/src/status_im/contexts/chat/placeholder/view.cljs +++ b/src/status_im/contexts/chat/messenger/placeholder/view.cljs @@ -1,10 +1,10 @@ -(ns status-im.contexts.chat.placeholder.view +(ns status-im.contexts.chat.messenger.placeholder.view (:require [quo.core :as quo] [react-native.core :as rn] [react-native.reanimated :as reanimated] [react-native.safe-area :as safe-area] - [status-im.contexts.chat.placeholder.style :as style] + [status-im.contexts.chat.messenger.placeholder.style :as style] [utils.worklets.chat.messages :as worklets])) (defn- loading-skeleton diff --git a/src/status_im/contexts/profile/login/events.cljs b/src/status_im/contexts/profile/login/events.cljs index 2100eb29c16..2917a27aaac 100644 --- a/src/status_im/contexts/profile/login/events.cljs +++ b/src/status_im/contexts/profile/login/events.cljs @@ -18,7 +18,7 @@ [status-im.config :as config] [status-im.constants :as constants] [status-im.contexts.chat.contacts.events :as contacts] - [status-im.contexts.chat.messages.link-preview.events :as link-preview] + [status-im.contexts.chat.messenger.messages.link-preview.events :as link-preview] [status-im.contexts.profile.config :as profile.config] status-im.contexts.profile.login.effects [status-im.contexts.profile.push-notifications.events :as notifications] diff --git a/src/status_im/contexts/shell/jump_to/components/floating_screens/view.cljs b/src/status_im/contexts/shell/jump_to/components/floating_screens/view.cljs index c597e015ca6..d2ab8e402f3 100644 --- a/src/status_im/contexts/shell/jump_to/components/floating_screens/view.cljs +++ b/src/status_im/contexts/shell/jump_to/components/floating_screens/view.cljs @@ -3,7 +3,7 @@ [quo.theme :as quo.theme] [react-native.core :as rn] [react-native.reanimated :as reanimated] - [status-im.contexts.chat.messages.view :as chat] + [status-im.contexts.chat.messenger.messages.view :as chat] [status-im.contexts.communities.discover.view :as communities.discover] [status-im.contexts.communities.overview.view :as communities.overview] [status-im.contexts.shell.jump-to.animation :as animation] diff --git a/src/status_im/contexts/shell/jump_to/components/switcher_cards/view.cljs b/src/status_im/contexts/shell/jump_to/components/switcher_cards/view.cljs index 1ac4d88a39f..9dbb89a32bf 100644 --- a/src/status_im/contexts/shell/jump_to/components/switcher_cards/view.cljs +++ b/src/status_im/contexts/shell/jump_to/components/switcher_cards/view.cljs @@ -6,7 +6,7 @@ [react-native.core :as rn] [react-native.fast-image :as fast-image] [status-im.constants :as constants] - [status-im.contexts.chat.messages.resolver.message-resolver :as resolver] + [status-im.contexts.chat.messenger.messages.resolver.message-resolver :as resolver] [status-im.contexts.shell.jump-to.animation :as animation] [status-im.contexts.shell.jump-to.components.switcher-cards.style :as style] [status-im.contexts.shell.jump-to.constants :as shell.constants] diff --git a/src/status_im/core_spec.cljs b/src/status_im/core_spec.cljs index e9431afab67..cda0e3d1e30 100644 --- a/src/status_im/core_spec.cljs +++ b/src/status_im/core_spec.cljs @@ -1,7 +1,7 @@ (ns status-im.core-spec (:require [status-im.common.floating-button-page.component-spec] - [status-im.contexts.chat.messages.content.audio.component-spec] + [status-im.contexts.chat.messenger.messages.content.audio.component-spec] [status-im.contexts.communities.actions.community-options.component-spec] [status-im.contexts.wallet.add-address-to-watch.component-spec] [status-im.contexts.wallet.add-address-to-watch.confirm-address.component-spec] diff --git a/src/status_im/events.cljs b/src/status_im/events.cljs index 701a334f6bc..b7d48274f0a 100644 --- a/src/status_im/events.cljs +++ b/src/status_im/events.cljs @@ -11,10 +11,10 @@ status-im.common.signals.events status-im.common.theme.events [status-im.common.toasts.events] - status-im.contexts.chat.composer.events status-im.contexts.chat.events [status-im.contexts.chat.home.add-new-contact.events] - status-im.contexts.chat.photo-selector.events + status-im.contexts.chat.messenger.composer.events + status-im.contexts.chat.messenger.photo-selector.events status-im.contexts.communities.events status-im.contexts.communities.overview.events status-im.contexts.onboarding.common.overlay.events diff --git a/src/status_im/navigation/screens.cljs b/src/status_im/navigation/screens.cljs index c80c9ec81d5..fd7b7cfd767 100644 --- a/src/status_im/navigation/screens.cljs +++ b/src/status_im/navigation/screens.cljs @@ -3,14 +3,14 @@ [legacy.status-im.ui.screens.screens :as old-screens] [status-im.common.emoji-picker.view :as emoji-picker] [status-im.config :as config] - [status-im.contexts.chat.camera.view :as camera-screen] [status-im.contexts.chat.group-details.view :as group-details] [status-im.contexts.chat.home.add-new-contact.scan.scan-profile-qr-page :as scan-profile-qr-page] [status-im.contexts.chat.home.add-new-contact.views :as add-new-contact] - [status-im.contexts.chat.lightbox.view :as lightbox] - [status-im.contexts.chat.messages.view :as chat] - [status-im.contexts.chat.new-chat.view :as new-chat] - [status-im.contexts.chat.photo-selector.view :as photo-selector] + [status-im.contexts.chat.home.new-chat.view :as new-chat] + [status-im.contexts.chat.messenger.camera.view :as camera-screen] + [status-im.contexts.chat.messenger.lightbox.view :as lightbox] + [status-im.contexts.chat.messenger.messages.view :as chat] + [status-im.contexts.chat.messenger.photo-selector.view :as photo-selector] [status-im.contexts.communities.actions.accounts-selection.view :as communities.accounts-selection] [status-im.contexts.communities.actions.addresses-for-permissions.view :as addresses-for-permissions] diff --git a/src/status_im/subs/chats.cljs b/src/status_im/subs/chats.cljs index 9aa4493a344..b40d6e77e5f 100644 --- a/src/status_im/subs/chats.cljs +++ b/src/status_im/subs/chats.cljs @@ -5,8 +5,8 @@ [legacy.status-im.group-chats.db :as group-chats.db] [re-frame.core :as re-frame] [status-im.constants :as constants] - [status-im.contexts.chat.composer.constants :as composer.constants] [status-im.contexts.chat.events :as chat.events] + [status-im.contexts.chat.messenger.composer.constants :as composer.constants] [status-im.contexts.profile.utils :as profile.utils])) (def memo-chats-stack-items (atom nil)) diff --git a/src/status_im/subs/messages.cljs b/src/status_im/subs/messages.cljs index 52d4df028f8..264dce844f6 100644 --- a/src/status_im/subs/messages.cljs +++ b/src/status_im/subs/messages.cljs @@ -2,8 +2,8 @@ (:require [re-frame.core :as re-frame] [status-im.constants :as constants] - [status-im.contexts.chat.messages.list.events :as models.message-list] - [status-im.contexts.chat.messages.resolver.message-resolver :as resolver] + [status-im.contexts.chat.messenger.messages.list.events :as models.message-list] + [status-im.contexts.chat.messenger.messages.resolver.message-resolver :as resolver] [utils.i18n :as i18n])) (defn intersperse-datemark From b4640dabb91d4a2d45fd0fba921c3b9a3d083d54 Mon Sep 17 00:00:00 2001 From: Icaro Motta Date: Fri, 5 Jan 2024 15:47:03 -0300 Subject: [PATCH 22/28] Run integration tests separately from unit tests (#18304) - make test still exists, so if you have been using it, as well as make test-watch, they should all work exactly the same. - [Changed] As part of the check stage, Jenkins will run Lint and Unit Tests in parallel. Integration Tests run later because running them at the same time as Unit Tests caused errors. - [Added] "make unit-test" and "make unit-test-watch" run unit tests only. Watching all unit tests is faster now because we ignore integration tests and we only compile shadow-cljs :mock target once. We are at approximately 10-15s to re-run all unit tests after saving a watched file, depending on your hardware. If you change mocks.js_dependencies.cljs, you must re-run the make target. - [Added] "make integration-test" and "make integration-test-watch" run integration tests only. These are much slower than the unit tests. Fixes https://github.com/status-im/status-mobile/issues/18112 --- Makefile | 50 ++++++++++++++++++++++++++++++-------------- ci/Jenkinsfile.tests | 12 +++++++++-- doc/testing.md | 6 +++--- shadow-cljs.edn | 4 ++-- 4 files changed, 49 insertions(+), 23 deletions(-) diff --git a/Makefile b/Makefile index 04d1dc45cd5..912168dd340 100644 --- a/Makefile +++ b/Makefile @@ -335,26 +335,44 @@ shadow-server: export TARGET := clojure shadow-server:##@ Start shadow-cljs in server mode for watching yarn shadow-cljs server -test-watch: export TARGET := clojure -test-watch: ##@ Watch tests and re-run no changes to cljs files - yarn install - nodemon --exec 'yarn shadow-cljs compile mocks && yarn shadow-cljs compile test && node --require ./test-resources/override.js target/test/test.js' -e cljs +_test-clojure: export TARGET := clojure +_test-clojure: export WATCH ?= false +_test-clojure: +ifeq ($(WATCH), true) + yarn install && \ + yarn shadow-cljs compile mocks && \ + nodemon --exec "yarn shadow-cljs compile test && node --require ./test-resources/override.js $$SHADOW_OUTPUT_TO" -e cljs +else + yarn install && \ + yarn shadow-cljs compile mocks && \ + yarn shadow-cljs compile test && \ + node --require ./test-resources/override.js "$$SHADOW_OUTPUT_TO" +endif -test-watch-for-repl: export TARGET := clojure -test-watch-for-repl: ##@ Watch tests and support REPL connections - yarn install - rm -f target/test/test.js - concurrently --kill-others --prefix-colors 'auto' --names 'build,repl' \ - 'yarn shadow-cljs compile mocks && yarn shadow-cljs watch test --verbose' \ - 'until [ -f ./target/test/test.js ] ; do sleep 1 ; done ; node --require ./test-resources/override.js ./target/test/test.js --repl' +test: export SHADOW_OUTPUT_TO := target/test/test.js +test: export SHADOW_NS_REGEXP := .*-test$$ +test: ##@test Run all Clojure tests +test: _test-clojure -test: export TARGET := clojure -test: ##@test Run tests once in NodeJS - # Here we create the gyp bindings for nodejs +test-watch-for-repl: export SHADOW_OUTPUT_TO := target/test/test.js +test-watch-for-repl: export SHADOW_NS_REGEXP := .*-test$$ +test-watch-for-repl: ##@test Watch all Clojure tests and support REPL connections yarn install + rm -f target/test/test.js yarn shadow-cljs compile mocks && \ - yarn shadow-cljs compile test && \ - node --require ./test-resources/override.js target/test/test.js + concurrently --kill-others --prefix-colors 'auto' --names 'build,repl' \ + 'yarn shadow-cljs watch test --verbose' \ + "until [ -f $$SHADOW_OUTPUT_TO ] ; do sleep 1 ; done ; node --require ./test-resources/override.js $$SHADOW_OUTPUT_TO --repl" + +test-unit: export SHADOW_OUTPUT_TO := target/unit_test/test.js +test-unit: export SHADOW_NS_REGEXP := ^(?!status-im\.integration-test).*-test$$ +test-unit: ##@test Run unit tests +test-unit: _test-clojure + +test-integration: export SHADOW_OUTPUT_TO := target/integration_test/test.js +test-integration: export SHADOW_NS_REGEXP := ^status-im\.integration-test.*$$ +test-integration: ##@test Run integration tests +test-integration: _test-clojure android-test: jsbundle android-test: export TARGET := android diff --git a/ci/Jenkinsfile.tests b/ci/Jenkinsfile.tests index 5e8ac4afe76..19d324c8527 100644 --- a/ci/Jenkinsfile.tests +++ b/ci/Jenkinsfile.tests @@ -52,16 +52,24 @@ pipeline { """ } } - stage('Tests') { + stage('Unit Tests') { steps { sh """#!/bin/bash set -eo pipefail - make test 2>&1 | tee -a ${LOG_FILE} + make test-unit 2>&1 | tee -a ${LOG_FILE} """ } } } } + stage('Integration Tests') { + steps { + sh """#!/bin/bash + set -eo pipefail + make test-integration 2>&1 | tee -a ${LOG_FILE} + """ + } + } stage('Component Tests') { steps { sh """#!/bin/bash diff --git a/doc/testing.md b/doc/testing.md index 1d8e299129e..82b14078ff1 100644 --- a/doc/testing.md +++ b/doc/testing.md @@ -5,7 +5,7 @@ To run tests: ``` - make test +make test ``` @@ -13,10 +13,10 @@ To run tests: Also test watcher can be launched. It will re-run the entire test suite when any file is modified ``` - make test-watch +make test WATCH=true ``` -Developers can also manually change the shadow-cljs option `:ns-regex` to control which namespaces the test runner should pick. +Developers can also manually change the shadow-cljs option `:ns-regex` to control which namespaces the test runner should pick. ## Testing with REPL diff --git a/shadow-cljs.edn b/shadow-cljs.edn index afa3820fbc5..634110408ef 100644 --- a/shadow-cljs.edn +++ b/shadow-cljs.edn @@ -108,13 +108,13 @@ ;; produced by the target :mocks below and redefines node require ;; function to use the mocks instead of the rn libraries :test - {:output-to "target/test/test.js" + {:output-to #shadow/env "SHADOW_OUTPUT_TO" :output-dir "target/test" :optimizations :simple :target :node-test :dev {:devtools {:preloads [status-im.setup.schema-preload]}} ;; Uncomment line below to `make test-watch` a specific file - ;; :ns-regexp "status-im.subs.messages-test$" + :ns-regexp #shadow/env "SHADOW_NS_REGEXP" :main legacy.status-im.test-runner/main ;; set :ui-driven to true to let shadow-cljs inject node-repl :ui-driven true From a00e44d0569c68f5eb7557fbc3f44ce1233c54ce Mon Sep 17 00:00:00 2001 From: Mohamed Javid <19339952+smohamedjavid@users.noreply.github.com> Date: Sat, 6 Jan 2024 00:36:54 +0530 Subject: [PATCH 23/28] Show aggregated tokens and balance in Wallet home (#18275) This commit adds the feature to show aggregated tokens and balances in the Wallet home. --------- Signed-off-by: Mohamed Javid <19339952+smohamedjavid@users.noreply.github.com> --- .../contexts/wallet/account/view.cljs | 7 +- .../contexts/wallet/common/temp.cljs | 29 ------- .../contexts/wallet/common/utils.cljs | 76 +++++++++++++++---- .../contexts/wallet/common/utils_test.cljs | 17 ----- src/status_im/contexts/wallet/data_store.cljs | 16 ++++ src/status_im/contexts/wallet/events.cljs | 14 +--- .../wallet/home/tabs/assets/view.cljs | 7 +- src/status_im/contexts/wallet/home/view.cljs | 11 +-- src/status_im/subs/wallet/wallet.cljs | 65 +++++++++------- src/status_im/subs/wallet/wallet_test.cljs | 23 +++++- 10 files changed, 146 insertions(+), 119 deletions(-) diff --git a/src/status_im/contexts/wallet/account/view.cljs b/src/status_im/contexts/wallet/account/view.cljs index 5f4dc180a80..b5faf353cfe 100644 --- a/src/status_im/contexts/wallet/account/view.cljs +++ b/src/status_im/contexts/wallet/account/view.cljs @@ -7,7 +7,6 @@ [status-im.contexts.wallet.account.tabs.view :as tabs] [status-im.contexts.wallet.common.account-switcher.view :as account-switcher] [status-im.contexts.wallet.common.temp :as temp] - [status-im.contexts.wallet.common.utils :as utils] [utils.i18n :as i18n] [utils.re-frame :as rf])) @@ -35,12 +34,12 @@ [] (let [selected-tab (reagent/atom first-tab-id)] (fn [] - (let [{:keys [name color balance watch-only?]} (rf/sub [:wallet/current-viewing-account]) - currency-symbol (rf/sub [:profile/currency-symbol])] + (let [{:keys [name color formatted-balance + watch-only?]} (rf/sub [:wallet/current-viewing-account])] [rn/view {:style {:flex 1}} [account-switcher/view {:on-press #(rf/dispatch [:wallet/close-account-page])}] [quo/account-overview - {:current-value (utils/prettify-balance currency-symbol balance) + {:current-value formatted-balance :account-name name :account (if watch-only? :watched-address :default) :customization-color color}] diff --git a/src/status_im/contexts/wallet/common/temp.cljs b/src/status_im/contexts/wallet/common/temp.cljs index 424688d7bdc..06ba3d1ce45 100644 --- a/src/status_im/contexts/wallet/common/temp.cljs +++ b/src/status_im/contexts/wallet/common/temp.cljs @@ -4,35 +4,6 @@ [status-im.common.resources :as status.resources] [utils.i18n :as i18n])) -(def tokens - [{:token :snt - :token-name "Status" - :state :default - :status :empty - :customization-color :blue - :values {:crypto-value "0.00" - :fiat-value "€0.00" - :percentage-change "0.00" - :fiat-change "€0.00"}} - {:token :eth - :token-name "Ether" - :state :default - :status :empty - :customization-color :blue - :values {:crypto-value "0.00" - :fiat-value "€0.00" - :percentage-change "0.00" - :fiat-change "€0.00"}} - {:token :dai - :token-name "Dai Stablecoin" - :state :default - :status :empty - :customization-color :blue - :values {:crypto-value "0.00" - :fiat-value "€0.00" - :percentage-change "0.00" - :fiat-change "€0.00"}}]) - (def address "0x39cf6E0Ba4C4530735616e1Ee7ff5FbCB726fBd4") (def buy-tokens-list diff --git a/src/status_im/contexts/wallet/common/utils.cljs b/src/status_im/contexts/wallet/common/utils.cljs index 44a12d42d49..c7005537bf6 100644 --- a/src/status_im/contexts/wallet/common/utils.cljs +++ b/src/status_im/contexts/wallet/common/utils.cljs @@ -87,18 +87,6 @@ [accounts address] (some #(when (= (:address %) address) %) accounts)) -(defn calculate-raw-balance - [raw-balance decimals] - (if-let [n (utils.number/parse-int raw-balance nil)] - (/ n (Math/pow 10 (utils.number/parse-int decimals))) - 0)) - -(defn token-value-in-chain - [{:keys [balances-per-chain decimals]} chain-id] - (let [balance-in-chain (get balances-per-chain chain-id)] - (when balance-in-chain - (calculate-raw-balance (:raw-balance balance-in-chain) decimals)))) - (defn total-token-fiat-value "Returns the total token fiat value taking into account all token's chains." [currency {:keys [market-values-per-currency] :as token}] @@ -127,6 +115,41 @@ (map #(calculate-balance-for-token %)) (reduce +))) +(defn calculate-balance-from-tokens + [{:keys [currency tokens]}] + (->> tokens + (map #(total-token-fiat-value currency %)) + (reduce money/add))) + +(defn- add-balances-per-chain + [b1 b2] + {:raw-balance (money/add (:raw-balance b1) (:raw-balance b2)) + :chain-id (:chain-id b2)}) + +(defn- merge-token + [existing-token token] + (assoc token + :balances-per-chain + (merge-with add-balances-per-chain + (:balances-per-chain existing-token) + (:balances-per-chain token)))) + +(defn aggregate-tokens-for-all-accounts + "Receives accounts (seq) and returns aggregated tokens in all accounts + NOTE: We use double reduce for faster performance (faster than mapcat and flatten)" + [accounts] + (->> accounts + (map :tokens) + (reduce + (fn [result-map tokens-per-account] + (reduce + (fn [acc token] + (update acc (:symbol token) merge-token token)) + result-map + tokens-per-account)) + {}) + vals)) + (defn network-list [{:keys [balances-per-chain]} networks] (into #{} @@ -136,10 +159,6 @@ networks))) (keys balances-per-chain)))) -(defn calculate-fiat-change - [fiat-value change-pct-24hour] - (money/bignumber (* fiat-value (/ change-pct-24hour (+ 100 change-pct-24hour))))) - (defn get-wallet-qr [{:keys [wallet-type selected-networks address]}] (if (= wallet-type :wallet-multichain) @@ -153,3 +172,28 @@ {constants/mainnet-chain-id :ethereum constants/optimism-chain-id :optimism constants/arbitrum-chain-id :arbitrum}) + +(defn calculate-token-value + "This function returns token values in the props of token-value (quo) component" + [{:keys [token color currency currency-symbol]}] + (let [token-units (total-token-units-in-all-chains token) + fiat-value (total-token-fiat-value currency token) + market-values (or (get-in token [:market-values-per-currency currency]) + (get-in token + [:market-values-per-currency + constants/profile-default-currency])) + {:keys [change-pct-24hour]} market-values + crypto-value (get-standard-crypto-format token token-units) + fiat-value (if (string/includes? crypto-value "<") + "<$0.01" + (prettify-balance currency-symbol fiat-value))] + {:token (:symbol token) + :token-name (:name token) + :state :default + :status (cond + (pos? change-pct-24hour) :positive + (neg? change-pct-24hour) :negative + :else :empty) + :customization-color color + :values {:crypto-value crypto-value + :fiat-value fiat-value}})) diff --git a/src/status_im/contexts/wallet/common/utils_test.cljs b/src/status_im/contexts/wallet/common/utils_test.cljs index 6fa47f3c666..8eac92a6134 100644 --- a/src/status_im/contexts/wallet/common/utils_test.cljs +++ b/src/status_im/contexts/wallet/common/utils_test.cljs @@ -3,7 +3,6 @@ [status-im.contexts.wallet.common.utils :as utils] [utils.money :as money])) - (deftest test-get-first-name (testing "get-first-name function" (is (= (utils/get-first-name "John Doe") "John")) @@ -93,22 +92,6 @@ address-to-find "0x999"] (is (= (utils/get-account-by-address accounts address-to-find) nil))))) -(deftest test-calculate-raw-balance - (testing "calculate-raw-balance function" - (is (= (utils/calculate-raw-balance "100000000" "8") 1.0)) - (is (= (utils/calculate-raw-balance "50000000" "8") 0.5)) - (is (= (utils/calculate-raw-balance "123456789" "2") 1234567.89)) - (is (= (utils/calculate-raw-balance "0" "4") 0.0)))) - -(deftest test-token-value-in-chain - (testing "token-value-in-chain function" - (let [token {:balances-per-chain {1 {:raw-balance (money/bignumber 100000000)} - 2 {:raw-balance (money/bignumber 50000000)} - 3 {:raw-balance (money/bignumber 123456789)}} - :decimals 8}] - (is (= (utils/token-value-in-chain token 1) 1.0))))) - - (deftest test-get-wallet-qr (testing "Test get-wallet-qr function" (let [wallet-multichain {:wallet-type :wallet-multichain diff --git a/src/status_im/contexts/wallet/data_store.cljs b/src/status_im/contexts/wallet/data_store.cljs index 6ff91148ba4..e027eca043e 100644 --- a/src/status_im/contexts/wallet/data_store.cljs +++ b/src/status_im/contexts/wallet/data_store.cljs @@ -1,8 +1,11 @@ (ns status-im.contexts.wallet.data-store (:require + [camel-snake-kebab.core :as csk] + [camel-snake-kebab.extras :as cske] [clojure.set :as set] [clojure.string :as string] [status-im.constants :as constants] + [utils.money :as money] [utils.number :as utils.number])) (defn chain-ids-string->set @@ -48,6 +51,19 @@ (update :testPreferredChainIds chain-ids-set->string) (dissoc :watch-only?))) +(defn- rpc->balances-per-chain + [token] + (-> token + (update :balances-per-chain update-vals #(update % :raw-balance money/bignumber)) + (update :balances-per-chain update-keys (comp utils.number/parse-int name)))) + +(defn rpc->tokens + [tokens] + (-> tokens + (update-keys name) + (update-vals #(cske/transform-keys csk/->kebab-case %)) + (update-vals #(mapv rpc->balances-per-chain %)))) + (defn <-rpc [network] (-> network diff --git a/src/status_im/contexts/wallet/events.cljs b/src/status_im/contexts/wallet/events.cljs index aeb11628339..d6d8f83e588 100644 --- a/src/status_im/contexts/wallet/events.cljs +++ b/src/status_im/contexts/wallet/events.cljs @@ -1,7 +1,5 @@ (ns status-im.contexts.wallet.events (:require - [camel-snake-kebab.core :as csk] - [camel-snake-kebab.extras :as cske] [clojure.string :as string] [react-native.background-timer :as background-timer] [status-im.contexts.wallet.data-store :as data-store] @@ -12,7 +10,6 @@ [utils.ethereum.chain :as chain] [utils.ethereum.eip.eip55 :as eip55] [utils.i18n :as i18n] - [utils.money :as money] [utils.number] [utils.re-frame :as rf])) @@ -109,19 +106,10 @@ :params params}) {:db (assoc-in db [:wallet :ui :tokens-loading?] false)})) -(defn- fix-balances-per-chain - [token] - (-> token - (update :balances-per-chain update-vals #(update % :raw-balance money/bignumber)) - (update :balances-per-chain update-keys (comp utils.number/parse-int name)))) - (rf/reg-event-fx :wallet/store-wallet-token (fn [{:keys [db]} [raw-tokens-data]] - (let [tokens (-> raw-tokens-data - (update-keys name) - (update-vals #(cske/transform-keys csk/->kebab-case %)) - (update-vals #(mapv fix-balances-per-chain %))) + (let [tokens (data-store/rpc->tokens raw-tokens-data) add-tokens (fn [stored-accounts tokens-per-account] (reduce-kv (fn [accounts address tokens-data] (if (accounts address) diff --git a/src/status_im/contexts/wallet/home/tabs/assets/view.cljs b/src/status_im/contexts/wallet/home/tabs/assets/view.cljs index cd2ab787c9f..4bf05892caf 100644 --- a/src/status_im/contexts/wallet/home/tabs/assets/view.cljs +++ b/src/status_im/contexts/wallet/home/tabs/assets/view.cljs @@ -2,13 +2,13 @@ (:require [quo.core :as quo] [react-native.core :as rn] - [status-im.contexts.wallet.common.temp :as temp] [status-im.contexts.wallet.home.tabs.assets.style :as style] [utils.re-frame :as rf])) (defn view [] - (let [tokens-loading? (rf/sub [:wallet/tokens-loading?])] + (let [tokens-loading? (rf/sub [:wallet/tokens-loading?]) + {:keys [tokens]} (rf/sub [:wallet/aggregated-tokens-and-balance])] (if tokens-loading? [quo/skeleton-list {:content :assets @@ -16,6 +16,5 @@ :animated? false}] [rn/flat-list {:render-fn quo/token-value - :data temp/tokens - :key :assets-list + :data tokens :content-container-style style/list-container}]))) diff --git a/src/status_im/contexts/wallet/home/view.cljs b/src/status_im/contexts/wallet/home/view.cljs index 8e4022c0e24..17da7b6e4c1 100644 --- a/src/status_im/contexts/wallet/home/view.cljs +++ b/src/status_im/contexts/wallet/home/view.cljs @@ -39,10 +39,11 @@ [] (let [selected-tab (reagent/atom (:id (first tabs-data)))] (fn [] - (let [tokens-loading? (rf/sub [:wallet/tokens-loading?]) - networks (rf/sub [:wallet/network-details]) - account-cards-data (rf/sub [:wallet/account-cards-data]) - cards (conj account-cards-data (new-account-card-data))] + (let [tokens-loading? (rf/sub [:wallet/tokens-loading?]) + networks (rf/sub [:wallet/network-details]) + account-cards-data (rf/sub [:wallet/account-cards-data]) + cards (conj account-cards-data (new-account-card-data)) + {:keys [formatted-balance]} (rf/sub [:wallet/aggregated-tokens-and-balance])] [rn/view {:style (style/home-container)} [common.top-nav/view] [rn/view {:style style/overview-container} @@ -50,7 +51,7 @@ {:state (if tokens-loading? :loading :default) :time-frame :none :metrics :none - :balance "€0.00" + :balance formatted-balance :networks networks}]] [quo/wallet-graph {:time-frame :empty}] [rn/flat-list diff --git a/src/status_im/subs/wallet/wallet.cljs b/src/status_im/subs/wallet/wallet.cljs index 1feb8684b0e..73de9be9206 100644 --- a/src/status_im/subs/wallet/wallet.cljs +++ b/src/status_im/subs/wallet/wallet.cljs @@ -1,7 +1,6 @@ (ns status-im.subs.wallet.wallet (:require [clojure.string :as string] [re-frame.core :as rf] - [status-im.constants :as constants] [status-im.contexts.wallet.common.utils :as utils] [utils.number])) @@ -120,10 +119,14 @@ :<- [:wallet/accounts] :<- [:wallet/current-viewing-account-address] :<- [:wallet/balances] - (fn [[accounts current-viewing-account-address balances]] - (let [current-viewing-account (utils/get-account-by-address accounts current-viewing-account-address)] + :<- [:profile/currency-symbol] + (fn [[accounts current-viewing-account-address balances currency-symbol]] + (let [current-viewing-account (utils/get-account-by-address accounts current-viewing-account-address) + balance (get balances current-viewing-account-address) + formatted-balance (utils/prettify-balance currency-symbol balance)] (-> current-viewing-account - (assoc :balance (get balances current-viewing-account-address)))))) + (assoc :balance balance + :formatted-balance formatted-balance))))) (rf/reg-sub :wallet/tokens-filtered @@ -157,37 +160,41 @@ (fn [accounts] (remove #(:watch-only? %) accounts))) -(defn- calc-token-value - [{:keys [market-values-per-currency] :as token} color currency currency-symbol] - (let [token-units (utils/total-token-units-in-all-chains token) - fiat-value (utils/total-token-fiat-value currency token) - market-values (get market-values-per-currency - currency - (get market-values-per-currency - constants/profile-default-currency)) - {:keys [change-pct-24hour]} market-values - crypto-value (utils/get-standard-crypto-format token token-units) - fiat-value (if (string/includes? crypto-value "<") - "<$0.01" - (utils/prettify-balance currency-symbol fiat-value))] - {:token (:symbol token) - :token-name (:name token) - :state :default - :status (cond - (pos? change-pct-24hour) :positive - (neg? change-pct-24hour) :negative - :else :empty) - :customization-color color - :values {:crypto-value crypto-value - :fiat-value fiat-value}})) - (rf/reg-sub :wallet/account-token-values :<- [:wallet/current-viewing-account] :<- [:profile/currency] :<- [:profile/currency-symbol] (fn [[{:keys [tokens color]} currency currency-symbol]] - (mapv #(calc-token-value % color currency currency-symbol) tokens))) + (mapv #(utils/calculate-token-value {:token % + :color color + :currency currency + :currency-symbol currency-symbol}) + tokens))) + +(rf/reg-sub + :wallet/aggregated-tokens + :<- [:wallet/accounts] + (fn [accounts] + (utils/aggregate-tokens-for-all-accounts accounts))) + +(rf/reg-sub + :wallet/aggregated-tokens-and-balance + :<- [:wallet/aggregated-tokens] + :<- [:profile/customization-color] + :<- [:profile/currency] + :<- [:profile/currency-symbol] + (fn [[aggregated-tokens color currency currency-symbol]] + (let [balance (utils/calculate-balance-from-tokens {:currency currency + :tokens aggregated-tokens}) + formatted-balance (utils/prettify-balance currency-symbol balance)] + {:balance balance + :formatted-balance formatted-balance + :tokens (mapv #(utils/calculate-token-value {:token % + :color color + :currency currency + :currency-symbol currency-symbol}) + aggregated-tokens)}))) (rf/reg-sub :wallet/network-preference-details diff --git a/src/status_im/subs/wallet/wallet_test.cljs b/src/status_im/subs/wallet/wallet_test.cljs index fbf5e78a49b..7c65517dbd7 100644 --- a/src/status_im/subs/wallet/wallet_test.cljs +++ b/src/status_im/subs/wallet/wallet_test.cljs @@ -278,9 +278,10 @@ :public-key "0x04371e2d9d66b82f056bc128064" :removed false :tokens tokens-0x1} - (dissoc result :balance))) + (dissoc result :balance :formatted-balance))) - (is (money/equal-to (:balance result) (money/bignumber 3250)))))) + (is (money/equal-to (:balance result) (money/bignumber 3250))) + (is (match? (:formatted-balance result) "$3250.00"))))) (h/deftest-sub :wallet/addresses [sub-name] @@ -440,3 +441,21 @@ (->> (rf/sub [sub-name]) ;; Removed `#js source` property for correct compare (map #(dissoc % :source))))))) + +(h/deftest-sub :wallet/aggregated-tokens + [sub-name] + (testing "returns aggregated tokens from all accounts" + (swap! rf-db/app-db #(assoc-in % [:wallet :accounts] accounts)) + (let [result (rf/sub [sub-name]) + eth-token (some #(when (= (:symbol %) "ETH") %) result) + eth-mainnet-raw-balance (get-in eth-token [:balances-per-chain 1 :raw-balance])] + (is (match? 2 (count result))) + (is (money/equal-to (money/bignumber 7520) eth-mainnet-raw-balance))))) + +(h/deftest-sub :wallet/aggregated-tokens-and-balance + [sub-name] + (testing "returns aggregated tokens (in quo/token-value props) and balances from all accounts" + (swap! rf-db/app-db #(assoc-in % [:wallet :accounts] accounts)) + (let [{:keys [formatted-balance tokens]} (rf/sub [sub-name])] + (is (match? 2 (count tokens))) + (is (match? "$4506.00" formatted-balance))))) From 5915dd42bd5113cba60b9949a149d4689c5c0231 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Soko=C5=82owski?= Date: Thu, 4 Jan 2024 20:40:10 +0100 Subject: [PATCH 24/28] ci: upgrade CI hosts to Xcode 15.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://developer.apple.com/documentation/xcode-release-notes/xcode-15-release-notes https://developer.apple.com/documentation/xcode-release-notes/xcode-15_0_1-release-notes https://developer.apple.com/documentation/xcode-release-notes/xcode-15_1-release-notes Signed-off-by: Jakub Sokołowski --- ci/Jenkinsfile.ios | 2 +- nix/overlay.nix | 2 +- nix/status-go/mobile/default.nix | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ci/Jenkinsfile.ios b/ci/Jenkinsfile.ios index 9a5d370ac9a..9d604617916 100644 --- a/ci/Jenkinsfile.ios +++ b/ci/Jenkinsfile.ios @@ -5,7 +5,7 @@ library 'status-jenkins-lib@v1.8.4' def isPRBuild = utils.isPRBuild() pipeline { - agent { label 'macos && arm64 && nix-2.14 && xcode-14.3' } + agent { label 'macos && arm64 && nix-2.14 && xcode-15.1' } parameters { string( diff --git a/nix/overlay.nix b/nix/overlay.nix index 0e29af262bd..c6d581dca4d 100644 --- a/nix/overlay.nix +++ b/nix/overlay.nix @@ -69,7 +69,7 @@ in { yarn = super.yarn.override { nodejs = super.nodejs-18_x; }; openjdk = super.openjdk11_headless; xcodeWrapper = super.xcodeenv.composeXcodeWrapper { - version = "14.0"; + version = "15.0"; allowHigher = true; }; go = super.go_1_19; diff --git a/nix/status-go/mobile/default.nix b/nix/status-go/mobile/default.nix index c18938d0b35..b3efe613674 100644 --- a/nix/status-go/mobile/default.nix +++ b/nix/status-go/mobile/default.nix @@ -19,7 +19,7 @@ ios = {targets ? [ "ios/arm64" "iossimulator/amd64"]}: callPackage ./build.nix { platform = "ios"; - platformVersion = "8.0"; + platformVersion = "11.0"; outputFileName = "Statusgo.xcframework"; inherit meta source goBuildLdFlags targets; }; From b3a2f397f911d37d883c297cd09d8e87df03b696 Mon Sep 17 00:00:00 2001 From: Shivek Khurana Date: Mon, 8 Jan 2024 12:00:41 +0000 Subject: [PATCH 25/28] =?UTF-8?q?=F0=9F=94=97=20Enable=20explorer=20links?= =?UTF-8?q?=20in=20wallet->about=20(#18406)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/status_im/config.cljs | 5 ++++- .../wallet/account/tabs/about/view.cljs | 19 ++++++++++++++++--- src/status_im/contexts/wallet/events.cljs | 6 ++++++ src/utils/ethereum/chain.cljs | 4 +++- 4 files changed, 29 insertions(+), 5 deletions(-) diff --git a/src/status_im/config.cljs b/src/status_im/config.cljs index 9aaa45706c2..aea2d9587db 100644 --- a/src/status_im/config.cljs +++ b/src/status_im/config.cljs @@ -19,6 +19,9 @@ (def mainnet-rpc-url (str "https://eth-archival.gateway.pokt.network/v1/lb/" POKT_TOKEN)) (def goerli-rpc-url (str "https://goerli-archival.gateway.pokt.network/v1/lb/" POKT_TOKEN)) +(def mainnet-chain-explorer-link "https://etherscan.io/address/") +(def optimism-mainnet-chain-explorer-link "https://optimistic.etherscan.io/address/") +(def arbitrum-mainnet-chain-explorer-link "https://arbiscan.io/address/") (def opensea-api-key OPENSEA_API_KEY) (def bootnodes-settings-enabled? (enabled? (get-config :BOOTNODES_SETTINGS_ENABLED "1"))) (def mailserver-confirmations-enabled? (enabled? (get-config :MAILSERVER_CONFIRMATIONS_ENABLED))) @@ -91,7 +94,7 @@ (def mainnet-networks [{:id "mainnet_rpc" - :chain-explorer-link "https://etherscan.io/address/" + :chain-explorer-link mainnet-chain-explorer-link :name "Mainnet with upstream RPC" :config {:NetworkId (chain/chain-keyword->chain-id :mainnet) :DataDir "/ethereum/mainnet_rpc" diff --git a/src/status_im/contexts/wallet/account/tabs/about/view.cljs b/src/status_im/contexts/wallet/account/tabs/about/view.cljs index 71317ae3b87..0bab2cf3dfd 100644 --- a/src/status_im/contexts/wallet/account/tabs/about/view.cljs +++ b/src/status_im/contexts/wallet/account/tabs/about/view.cljs @@ -5,6 +5,7 @@ [react-native.core :as rn] [react-native.platform :as platform] [react-native.share :as share] + [status-im.config :as config] [status-im.contexts.profile.utils :as profile.utils] [status-im.contexts.wallet.account.tabs.about.style :as style] [utils.i18n :as i18n] @@ -18,15 +19,27 @@ [[{:icon :i/link :accessibility-label :view-on-eth :label (i18n/label :t/view-on-eth) - :right-icon :i/external} + :right-icon :i/external + :on-press #(rf/dispatch + [:wallet/navigate-to-chain-explorer-from-bottom-sheet + config/mainnet-chain-explorer-link + address])} {:icon :i/link :accessibility-label :view-on-opt :label (i18n/label :t/view-on-opt) - :right-icon :i/external} + :right-icon :i/external + :on-press #(rf/dispatch + [:wallet/navigate-to-chain-explorer-from-bottom-sheet + config/optimism-mainnet-chain-explorer-link + address])} {:icon :i/link :accessibility-label :view-on-arb :label (i18n/label :t/view-on-arb) - :right-icon :i/external} + :right-icon :i/external + :on-press #(rf/dispatch + [:wallet/navigate-to-chain-explorer-from-bottom-sheet + config/arbitrum-mainnet-chain-explorer-link + address])} {:icon :i/copy :accessibility-label :copy-address :label (i18n/label :t/copy-address) diff --git a/src/status_im/contexts/wallet/events.cljs b/src/status_im/contexts/wallet/events.cljs index d6d8f83e588..c3f7064de59 100644 --- a/src/status_im/contexts/wallet/events.cljs +++ b/src/status_im/contexts/wallet/events.cljs @@ -321,3 +321,9 @@ :on-error #(log/info "failed to get address details" {:error % :event :wallet/get-address-details})}]]]})) + +(rf/reg-event-fx + :wallet/navigate-to-chain-explorer-from-bottom-sheet + (fn [_ [explorer-link address]] + {:fx [[:dispatch [:hide-bottom-sheet]] + [:dispatch [:browser.ui/open-url (str explorer-link "/" address)]]]})) diff --git a/src/utils/ethereum/chain.cljs b/src/utils/ethereum/chain.cljs index 3bce18f027a..ba9a49ce45d 100644 --- a/src/utils/ethereum/chain.cljs +++ b/src/utils/ethereum/chain.cljs @@ -11,7 +11,9 @@ :bsc {:id BSC-mainnet-chain-id :name "BSC"} :bsc-testnet {:id BSC-testnet-chain-id - :name "BSC tetnet"}}) + :name "BSC testnet"} + :arbitrum {:id 42161 :name "Arbitrum"} + :optimism {:id 10 :name "Optimism"}}) (defn chain-id->chain-keyword [i] From 020822474133fb9c8062d6678a7d99e85a7200be Mon Sep 17 00:00:00 2001 From: Parvesh Monu Date: Mon, 8 Jan 2024 18:12:07 +0530 Subject: [PATCH 26/28] fix delayed display of top bar in chat after sending messages (#18300) --- src/js/worklets/chat/messages.js | 5 +- .../chat/messenger/messages/constants.cljs | 3 +- .../chat/messenger/messages/list/view.cljs | 96 ++++++++++--------- .../messenger/messages/navigation/view.cljs | 8 +- .../chat/messenger/messages/view.cljs | 6 +- 5 files changed, 66 insertions(+), 52 deletions(-) diff --git a/src/js/worklets/chat/messages.js b/src/js/worklets/chat/messages.js index 16923bf551d..bc08b4d9aa6 100644 --- a/src/js/worklets/chat/messages.js +++ b/src/js/worklets/chat/messages.js @@ -45,8 +45,9 @@ export function messagesListOnScroll(distanceFromListTop, callback) { const currentY = event.contentOffset.y; const layoutHeight = event.layoutMeasurement.height; const contentSizeY = event.contentSize.height - layoutHeight; - distanceFromListTop.value = contentSizeY - currentY; - runOnJS(callback)(currentY, layoutHeight); + const newDistance = contentSizeY - currentY; + distanceFromListTop.value = newDistance; + runOnJS(callback)(currentY, layoutHeight, newDistance); }; } diff --git a/src/status_im/contexts/chat/messenger/messages/constants.cljs b/src/status_im/contexts/chat/messenger/messages/constants.cljs index c7f81528677..9b8080292cf 100644 --- a/src/status_im/contexts/chat/messenger/messages/constants.cljs +++ b/src/status_im/contexts/chat/messenger/messages/constants.cljs @@ -6,7 +6,8 @@ (def ^:const header-container-top-margin 48) (def ^:const header-container-radius 20) (def ^:const header-animation-distance 20) -(def ^:const content-animation-start-position 110) +(def ^:const content-animation-start-position-android 130) +(def ^:const content-animation-start-position-ios 124) ;; Note - We should also consider height of bio for banner animation starting position ;; Todo - Should be updated once New-profile implemation is complete (def ^:const pinned-banner-animation-start-position 148) diff --git a/src/status_im/contexts/chat/messenger/messages/list/view.cljs b/src/status_im/contexts/chat/messenger/messages/list/view.cljs index 656b05ebc5b..1547c47d361 100644 --- a/src/status_im/contexts/chat/messenger/messages/list/view.cljs +++ b/src/status_im/contexts/chat/messenger/messages/list/view.cljs @@ -39,11 +39,14 @@ {:animated true}))) (defn on-scroll-fn - [show-floating-scroll-down-button?] - (fn [y layout-height] + [show-floating-scroll-down-button? distance-atom layout-height-atom] + (fn [y layout-height new-distance] (let [threshold-height (* (/ layout-height 100) threshold-percentage-to-show-floating-scroll-down-button) reached-threshold? (> y threshold-height)] + (when (not= layout-height @layout-height-atom) + (reset! layout-height-atom layout-height)) + (reset! distance-atom new-distance) (when (not= reached-threshold? @show-floating-scroll-down-button?) (rn/configure-next (:ease-in-ease-out rn/layout-animation-presets)) (reset! show-floating-scroll-down-button? reached-threshold?))))) @@ -272,44 +275,42 @@ [message/message message-data context keyboard-shown?]))) (defn on-content-size-change - [{:keys [distance-from-list-top window-height content-height calculations-complete?]}] + [{:keys [content-height distance-atom distance-from-list-top]}] (fn [_ content-height-new] - (let [change (- content-height-new @content-height) - distance (if (reanimated/get-shared-value calculations-complete?) - (+ (reanimated/get-shared-value distance-from-list-top) change) - (- content-height-new window-height))] - (reanimated/set-shared-value distance-from-list-top distance) - (reset! content-height content-height-new)) - (when-not (reanimated/get-shared-value calculations-complete?) - (js/setTimeout #(reanimated/set-shared-value calculations-complete? true) 10)))) + ;; Updates to shared values are asynchronous and give the wrong value when accessed + ;; simultaneously(in on-layout event), that's why we are using distance atom here + (let [change (- content-height-new @content-height) + new-distance (+ @distance-atom change)] + (when-not (= change 0) + (reanimated/set-shared-value distance-from-list-top new-distance) + (reset! distance-atom new-distance) + (reset! content-height content-height-new))))) -(defn keyboard-offset - [distance-from-list-top keyboard-shown keyboard-height keyboard-offset?] - ;; Note - keyboard fires multiple events, we are making sure we only offset once - (when (> keyboard-height 0) - (let [current-distance-from-top (reanimated/get-shared-value distance-from-list-top)] - (when (and keyboard-shown (not @keyboard-offset?)) - (reanimated/set-shared-value distance-from-list-top - (+ current-distance-from-top keyboard-height)) - (reset! keyboard-offset? true)) - (when (and (not keyboard-shown) @keyboard-offset?) - (reanimated/set-shared-value distance-from-list-top - (- current-distance-from-top keyboard-height)) - (reset! keyboard-offset? false))))) +(defn on-layout + [{:keys [event layout-height distance-atom distance-from-list-top + calculations-complete? messages-list-on-layout-finished?]}] + (let [layout-height-new (oops/oget event "nativeEvent.layout.height") + change (- layout-height-new @layout-height) + new-distance (- @distance-atom change)] + (when (and (not= change 0) (not= @layout-height layout-height-new)) + (reanimated/set-shared-value distance-from-list-top new-distance) + (reset! distance-atom new-distance) + (reset! layout-height layout-height-new)) + (when-not (reanimated/get-shared-value calculations-complete?) + (reanimated/set-shared-value calculations-complete? true)) + (js/setTimeout #(reset! messages-list-on-layout-finished? true) 1000))) (defn f-messages-list-content - [{:keys [insets distance-from-list-top keyboard-offset? content-height cover-bg-color - show-floating-scroll-down-button? calculations-complete? - messages-list-on-layout-finished?]}] - (let [theme (quo.theme/use-theme-value) - chat (rf/sub [:chats/current-chat-chat-view]) - {:keys [keyboard-shown keyboard-height]} (hooks/use-keyboard) - {window-height :height} (rn/get-window) - context (rf/sub [:chats/current-chat-message-list-view-context]) - messages (rf/sub [:chats/raw-chat-messages-stream - (:chat-id chat)]) - recording? (rf/sub [:chats/recording?])] - (keyboard-offset distance-from-list-top keyboard-shown keyboard-height keyboard-offset?) + [{:keys [insets distance-from-list-top content-height layout-height cover-bg-color distance-atom + show-floating-scroll-down-button? calculations-complete? messages-list-on-layout-finished?]}] + (let [theme (quo.theme/use-theme-value) + chat (rf/sub [:chats/current-chat-chat-view]) + {:keys [keyboard-shown]} (hooks/use-keyboard) + {window-height :height} (rn/get-window) + context (rf/sub [:chats/current-chat-message-list-view-context]) + messages (rf/sub [:chats/raw-chat-messages-stream + (:chat-id chat)]) + recording? (rf/sub [:chats/recording?])] [rn/view {:style {:flex 3}} ;; Pushes composer to bottom [rn/view {:style {:flex-shrink 1}} ;; Keeps flat list on top [reanimated/flat-list @@ -334,10 +335,9 @@ :render-fn render-fn :on-viewable-items-changed on-viewable-items-changed :on-content-size-change (on-content-size-change - {:distance-from-list-top distance-from-list-top - :window-height window-height - :content-height content-height - :calculations-complete? calculations-complete?}) + {:content-height content-height + :distance-atom distance-atom + :distance-from-list-top distance-from-list-top}) :on-end-reached #(list-on-end-reached distance-from-list-top) :on-scroll-to-index-failed identity :scroll-indicator-insets {:top (if (:able-to-send-message? context) @@ -354,14 +354,20 @@ :on-scroll (reanimated/use-animated-scroll-handler (worklets/messages-list-on-scroll distance-from-list-top - (on-scroll-fn show-floating-scroll-down-button?))) + (on-scroll-fn show-floating-scroll-down-button? + distance-atom + layout-height))) :style {:background-color (colors/theme-colors colors/white colors/neutral-95 theme)} :inverted true - :on-layout (fn [_] - (js/setTimeout #(reset! messages-list-on-layout-finished? - true) - 1000)) + :on-layout #(on-layout + {:event % + :layout-height layout-height + :distance-atom distance-atom + :distance-from-list-top distance-from-list-top + :calculations-complete? calculations-complete? + :messages-list-on-layout-finished? + messages-list-on-layout-finished?}) :scroll-enabled (not recording?) :content-inset-adjustment-behavior :never}]]])) diff --git a/src/status_im/contexts/chat/messenger/messages/navigation/view.cljs b/src/status_im/contexts/chat/messenger/messages/navigation/view.cljs index 5318a07d20c..e4a72a2c6b6 100644 --- a/src/status_im/contexts/chat/messenger/messages/navigation/view.cljs +++ b/src/status_im/contexts/chat/messenger/messages/navigation/view.cljs @@ -35,12 +35,16 @@ distance-from-list-top all-loaded? calculations-complete? - messages.constants/content-animation-start-position) + (if platform/ios? + messages.constants/content-animation-start-position-ios + messages.constants/content-animation-start-position-android)) header-position (worklets/navigation-header-position distance-from-list-top all-loaded? messages.constants/top-bar-height - messages.constants/content-animation-start-position)] + (if platform/ios? + messages.constants/content-animation-start-position-ios + messages.constants/content-animation-start-position-android))] [reanimated/view {:style (style/header-content-container header-opacity header-position)} (when-not group-chat diff --git a/src/status_im/contexts/chat/messenger/messages/view.cljs b/src/status_im/contexts/chat/messenger/messages/view.cljs index 75979b5d64f..26a1bc4e50e 100644 --- a/src/status_im/contexts/chat/messenger/messages/view.cljs +++ b/src/status_im/contexts/chat/messenger/messages/view.cljs @@ -17,8 +17,9 @@ (defn- f-chat-screen [calculations-complete?] (let [insets (safe-area/get-insets) - keyboard-offset? (atom false) content-height (atom 0) + layout-height (atom 0) + distance-atom (atom 0) show-floating-scroll-down-button? (reagent/atom false) messages-list-on-layout-finished? (reagent/atom false) distance-from-list-top (reanimated/use-shared-value 0)] @@ -30,8 +31,9 @@ :calculations-complete? calculations-complete?}] [:f> list.view/f-messages-list-content {:insets insets + :layout-height layout-height :content-height content-height - :keyboard-offset? keyboard-offset? + :distance-atom distance-atom :calculations-complete? calculations-complete? :distance-from-list-top distance-from-list-top :messages-list-on-layout-finished? messages-list-on-layout-finished? From fb58d7205ef171ea5fb9e080fe4d46d81b21f58e Mon Sep 17 00:00:00 2001 From: Parvesh Monu Date: Mon, 8 Jan 2024 19:59:01 +0530 Subject: [PATCH 27/28] Add dispatch-and-chill to navigation events (#18372) --- src/status_im/contexts/chat/actions/view.cljs | 9 +++++++-- src/status_im/contexts/onboarding/intro/view.cljs | 11 +++++++---- .../contexts/onboarding/new_to_status/view.cljs | 5 ++++- src/status_im/contexts/profile/profiles/view.cljs | 9 +++++++-- 4 files changed, 25 insertions(+), 9 deletions(-) diff --git a/src/status_im/contexts/chat/actions/view.cljs b/src/status_im/contexts/chat/actions/view.cljs index c93972f0c29..c1778e45737 100644 --- a/src/status_im/contexts/chat/actions/view.cljs +++ b/src/status_im/contexts/chat/actions/view.cljs @@ -1,6 +1,7 @@ (ns status-im.contexts.chat.actions.view (:require [quo.core :as quo] + [utils.debounce :as debounce] [utils.i18n :as i18n] [utils.re-frame :as rf])) @@ -22,10 +23,14 @@ :label (i18n/label :t/new-chat) :on-press (fn [] (rf/dispatch [:group-chat/clear-contacts]) - (rf/dispatch [:open-modal :start-a-new-chat]))} + (debounce/dispatch-and-chill + [:open-modal :start-a-new-chat] + 1000))} {:icon :i/add-user :accessibility-label :add-a-contact :label (i18n/label :t/add-a-contact) :sub-label (i18n/label :t/enter-a-chat-key) :add-divider? true - :on-press #(rf/dispatch [:open-modal :new-contact])}]]]) + :on-press #(debounce/dispatch-and-chill + [:open-modal :new-contact] + 1000)}]]]) diff --git a/src/status_im/contexts/onboarding/intro/view.cljs b/src/status_im/contexts/onboarding/intro/view.cljs index 2d6330210c6..b814d102483 100644 --- a/src/status_im/contexts/onboarding/intro/view.cljs +++ b/src/status_im/contexts/onboarding/intro/view.cljs @@ -8,8 +8,7 @@ [status-im.contexts.onboarding.intro.style :as style] [status-im.contexts.syncing.scan-sync-code.view :as scan-sync-code] [utils.debounce :as debounce] - [utils.i18n :as i18n] - [utils.re-frame :as rf])) + [utils.i18n :as i18n])) (defn view [] @@ -29,7 +28,9 @@ :bottom-card {:on-press (fn [] (when-let [blur-show-fn @overlay/blur-show-fn-atom] (blur-show-fn)) - (rf/dispatch [:open-modal :new-to-status])) + (debounce/dispatch-and-chill + [:open-modal :new-to-status] + 1000)) :heading (i18n/label :t/new-to-status) :accessibility-label :new-to-status-button}} [quo/text @@ -41,7 +42,9 @@ {:style style/plain-text} (i18n/label :t/by-continuing-you-accept)] [quo/text - {:on-press #(rf/dispatch [:open-modal :privacy-policy]) + {:on-press #(debounce/dispatch-and-chill + [:open-modal :privacy-policy] + 1000) :style style/highlighted-text} (i18n/label :t/terms-of-service)]]] [overlay/view]]) diff --git a/src/status_im/contexts/onboarding/new_to_status/view.cljs b/src/status_im/contexts/onboarding/new_to_status/view.cljs index eb431fee4ea..45528a65e18 100644 --- a/src/status_im/contexts/onboarding/new_to_status/view.cljs +++ b/src/status_im/contexts/onboarding/new_to_status/view.cljs @@ -8,6 +8,7 @@ [status-im.common.resources :as resources] [status-im.config :as config] [status-im.contexts.onboarding.new-to-status.style :as style] + [utils.debounce :as debounce] [utils.i18n :as i18n] [utils.re-frame :as rf])) @@ -30,7 +31,9 @@ (* 2 56) ;; two other list items (* 2 16) ;; spacing between items 220) ;; extra spacing (top bar) - :on-press #(rf/dispatch [:onboarding/navigate-to-create-profile])}] + :on-press #(debounce/dispatch-and-chill + [:onboarding/navigate-to-create-profile] + 1000)}] [rn/view {:style style/subtitle-container} [quo/text {:style style/subtitle diff --git a/src/status_im/contexts/profile/profiles/view.cljs b/src/status_im/contexts/profile/profiles/view.cljs index d5682b8f6a7..5ddfd31fbd8 100644 --- a/src/status_im/contexts/profile/profiles/view.cljs +++ b/src/status_im/contexts/profile/profiles/view.cljs @@ -13,6 +13,7 @@ [status-im.contexts.onboarding.common.background.view :as background] [status-im.contexts.profile.profiles.style :as style] [taoensso.timbre :as log] + [utils.debounce :as debounce] [utils.i18n :as i18n] [utils.re-frame :as rf] [utils.transforms :as transforms])) @@ -49,11 +50,15 @@ :on-press (fn [] (when @push-animation-fn-atom (@push-animation-fn-atom)) - (rf/dispatch [:open-modal :new-to-status])) + (debounce/dispatch-and-chill + [:open-modal :new-to-status] + 1000)) :accessibility-label :create-new-profile} {:icon :i/multi-profile :label (i18n/label :t/add-existing-status-profile) - :on-press #(rf/dispatch [:open-modal :sign-in]) + :on-press #(debounce/dispatch-and-chill + [:open-modal :sign-in] + 1000) :accessibility-label :multi-profile}]]]) (defn show-new-account-options From b4d27d287a5383f515a1835e647f2c5670adc319 Mon Sep 17 00:00:00 2001 From: Mohsen Date: Mon, 8 Jan 2024 18:27:07 +0300 Subject: [PATCH 28/28] feat: implement edit profile and change name (#18270) --- src/quo/components/inputs/input/view.cljs | 4 +- src/quo/components/overlay/view.cljs | 6 +- .../settings/category/settings/view.cljs | 4 +- .../settings/settings_item/style.cljs | 7 +- .../settings/settings_item/view.cljs | 2 +- src/status_im/common/validation/profile.cljs | 41 +++++++++++ .../common/validation/profile_test.cljs | 52 ++++++++++++++ .../onboarding/create_profile/view.cljs | 48 +++---------- .../contexts/profile/edit/header/view.cljs | 33 +++++++++ .../contexts/profile/edit/list_items.cljs | 62 ++++++++++++++++ .../contexts/profile/edit/name/events.cljs | 18 +++++ .../profile/edit/name/events_test.cljs | 15 ++++ .../contexts/profile/edit/name/style.cljs | 17 +++++ .../contexts/profile/edit/name/view.cljs | 72 +++++++++++++++++++ .../contexts/profile/edit/style.cljs | 25 +++++++ src/status_im/contexts/profile/edit/view.cljs | 48 +++++++++++++ src/status_im/contexts/profile/events.cljs | 1 + .../contexts/profile/settings/list_items.cljs | 2 +- .../integration_test/profile_test.cljs | 22 ++++++ src/status_im/navigation/screens.cljs | 10 +++ translations/en.json | 8 +++ 21 files changed, 448 insertions(+), 49 deletions(-) create mode 100644 src/status_im/common/validation/profile.cljs create mode 100644 src/status_im/common/validation/profile_test.cljs create mode 100644 src/status_im/contexts/profile/edit/header/view.cljs create mode 100644 src/status_im/contexts/profile/edit/list_items.cljs create mode 100644 src/status_im/contexts/profile/edit/name/events.cljs create mode 100644 src/status_im/contexts/profile/edit/name/events_test.cljs create mode 100644 src/status_im/contexts/profile/edit/name/style.cljs create mode 100644 src/status_im/contexts/profile/edit/name/view.cljs create mode 100644 src/status_im/contexts/profile/edit/style.cljs create mode 100644 src/status_im/contexts/profile/edit/view.cljs create mode 100644 src/status_im/integration_test/profile_test.cljs diff --git a/src/quo/components/inputs/input/view.cljs b/src/quo/components/inputs/input/view.cljs index 8e7fd6bd9f7..5d792bd0796 100644 --- a/src/quo/components/inputs/input/view.cljs +++ b/src/quo/components/inputs/input/view.cljs @@ -61,7 +61,7 @@ :container-style]) (defn- base-input - [{:keys [on-change-text on-char-limit-reach weight]}] + [{:keys [on-change-text on-char-limit-reach weight default-value]}] (let [status (reagent/atom :default) internal-on-focus #(reset! status :focus) internal-on-blur #(reset! status :default) @@ -72,7 +72,7 @@ (if (> height min-height) (reset! multiple-lines? true) (reset! multiple-lines? false))) - char-count (reagent/atom 0) + char-count (reagent/atom (count default-value)) update-char-limit! (fn [new-text char-limit] (when on-change-text (on-change-text new-text)) (let [amount-chars (count new-text)] diff --git a/src/quo/components/overlay/view.cljs b/src/quo/components/overlay/view.cljs index 7b35f87a939..8855ec0e36b 100644 --- a/src/quo/components/overlay/view.cljs +++ b/src/quo/components/overlay/view.cljs @@ -5,7 +5,7 @@ [react-native.core :as rn])) (defn view - [{:keys [type]} & children] + [{:keys [type container-style]} & children] [rn/view {:style (style/overlay-background type)} (if (= type :shell) [blur/view @@ -14,7 +14,7 @@ :blur-type :transparent :overlay-color :transparent :style style/container} - [rn/view {:style style/blur-container} + [rn/view {:style (merge style/blur-container container-style)} children]] - [rn/view {:style style/container} + [rn/view {:style (merge style/container container-style)} children])]) diff --git a/src/quo/components/settings/category/settings/view.cljs b/src/quo/components/settings/category/settings/view.cljs index 980c4ed6b31..7b9d64a2880 100644 --- a/src/quo/components/settings/category/settings/view.cljs +++ b/src/quo/components/settings/category/settings/view.cljs @@ -7,8 +7,8 @@ [react-native.core :as rn])) (defn- category-internal - [{:keys [label data] :as props}] - [rn/view {:style (style/container label)} + [{:keys [label data container-style] :as props}] + [rn/view {:style (merge (style/container label) container-style)} (when label [text/text {:weight :medium diff --git a/src/quo/components/settings/settings_item/style.cljs b/src/quo/components/settings/settings_item/style.cljs index 5f3ffac613b..e4ba8c679b4 100644 --- a/src/quo/components/settings/settings_item/style.cljs +++ b/src/quo/components/settings/settings_item/style.cljs @@ -19,10 +19,12 @@ (defn sub-container [align-action] {:flex-direction :row + :padding-right 0.5 :align-items (or align-action :center)}) -(def left-container - {:margin-horizontal 12 +(defn left-container + [image?] + {:margin-horizontal (if image? 12 0) :flex 1 :height "100%" :justify-content :flex-start}) @@ -57,6 +59,7 @@ {:width 15 :height 15 :border-radius 12 + :margin-right 4 :background-color background-color}) (def status-tag-container diff --git a/src/quo/components/settings/settings_item/view.cljs b/src/quo/components/settings/settings_item/view.cljs index 5029909fbd9..a660c16e2ff 100644 --- a/src/quo/components/settings/settings_item/view.cljs +++ b/src/quo/components/settings/settings_item/view.cljs @@ -109,7 +109,7 @@ :accessibility-label accessibility-label} [rn/view {:style (style/left-sub-container props)} [image-component props] - [rn/view {:style style/left-container} + [rn/view {:style (style/left-container (:image props))} [text/text {:weight :medium :style {:color (when blur? colors/white)}} title] diff --git a/src/status_im/common/validation/profile.cljs b/src/status_im/common/validation/profile.cljs new file mode 100644 index 00000000000..13f03cf41cb --- /dev/null +++ b/src/status_im/common/validation/profile.cljs @@ -0,0 +1,41 @@ +(ns status-im.common.validation.profile + (:require [clojure.string :as string] + [utils.i18n :as i18n])) + +;; NOTE - validation should match with Desktop +;; https://github.com/status-im/status-desktop/blob/2ba96803168461088346bf5030df750cb226df4c/ui/imports/utils/Constants.qml#L468 +(def min-length 5) +(def max-length 24) + +(def emoji-regex + #"(\u00a9|\u00ae|[\u2000-\u3300]|\ud83c[\ud000-\udfff]|\ud83d[\ud000-\udfff]|\ud83e[\ud000-\udfff])") + +(def status-regex #"^[a-zA-Z0-9\-_ ]+$") + +(def common-names ["Ethereum" "Bitcoin"]) + +(defn has-emojis? [s] (boolean (re-find emoji-regex s))) + +(defn has-common-names? [s] (pos? (count (filter #(string/includes? s %) common-names)))) + +(defn has-special-characters? [s] (not (re-find status-regex s))) + +(defn name-too-short? [s] (< (count (string/trim (str s))) min-length)) + +(defn name-too-long? [s] (> (count (string/trim (str s))) max-length)) + +(defn validation-name + [s] + (cond + (or (= s nil) (= s "")) nil + (string/ends-with? s "-eth") (i18n/label :t/ending-not-allowed {:ending "-eth"}) + (string/ends-with? s "_eth") (i18n/label :t/ending-not-allowed {:ending "_eth"}) + (string/ends-with? s ".eth") (i18n/label :t/ending-not-allowed {:ending ".eth"}) + (string/starts-with? s " ") (i18n/label :t/start-with-space) + (string/ends-with? s " ") (i18n/label :t/ends-with-space) + (has-common-names? s) (i18n/label :t/are-not-allowed {:check (i18n/label :t/common-names)}) + (has-emojis? s) (i18n/label :t/are-not-allowed {:check (i18n/label :t/emojis)}) + (has-special-characters? s) (i18n/label :t/are-not-allowed + {:check (i18n/label :t/special-characters)}) + (name-too-short? s) (i18n/label :t/minimum-characters {:min-chars min-length}) + (name-too-long? s) (i18n/label :t/profile-name-is-too-long))) diff --git a/src/status_im/common/validation/profile_test.cljs b/src/status_im/common/validation/profile_test.cljs new file mode 100644 index 00000000000..b12fe7a2314 --- /dev/null +++ b/src/status_im/common/validation/profile_test.cljs @@ -0,0 +1,52 @@ +(ns status-im.common.validation.profile-test + (:require + [cljs.test :refer-macros [deftest are]] + [status-im.common.validation.profile :as profile-validator] + [utils.i18n :as i18n])) + +(deftest has-emojis-test + (are [arg expected] + (expected (profile-validator/has-emojis? arg)) + "Hello 😊" true? + "Hello" false?)) + +(deftest has-common-names-test + (are [arg expected] + (expected (profile-validator/has-common-names? arg)) + "Ethereum" true? + "Hello" false?)) + +(deftest has-special-characters-test + (are [arg expected] + (expected (profile-validator/has-special-characters? arg)) + "@name" true? + "name" false?)) + +(deftest name-too-short-test + (are [arg expected] + (expected (profile-validator/name-too-short? arg)) + "abc" true? + "abcdef" false?)) + +(deftest name-too-long-test + (are [arg expected] + (expected (profile-validator/name-too-long? arg)) + (apply str (repeat 25 "a")) true? + "abcdef" false?)) + +(deftest validation-name-test + (are [arg expected] + (= (profile-validator/validation-name arg) expected) + nil nil + "" nil + "@name" (i18n/label :t/are-not-allowed + {:check (i18n/label :t/special-characters)}) + "name-eth" (i18n/label :t/ending-not-allowed {:ending "-eth"}) + "name_eth" (i18n/label :t/ending-not-allowed {:ending "_eth"}) + "name.eth" (i18n/label :t/ending-not-allowed {:ending ".eth"}) + " name" (i18n/label :t/start-with-space) + "name " (i18n/label :t/ends-with-space) + "Ethereum" (i18n/label :t/are-not-allowed {:check (i18n/label :t/common-names)}) + "Hello 😊" (i18n/label :t/are-not-allowed {:check (i18n/label :t/emojis)}) + "abc" (i18n/label :t/minimum-characters {:min-chars 5}) + (apply str (repeat 25 "a")) (i18n/label :t/profile-name-is-too-long))) diff --git a/src/status_im/contexts/onboarding/create_profile/view.cljs b/src/status_im/contexts/onboarding/create_profile/view.cljs index e18a6cb15c6..97ffa57cb07 100644 --- a/src/status_im/contexts/onboarding/create_profile/view.cljs +++ b/src/status_im/contexts/onboarding/create_profile/view.cljs @@ -10,6 +10,7 @@ [react-native.platform :as platform] [react-native.safe-area :as safe-area] [reagent.core :as reagent] + [status-im.common.validation.profile :as profile-validator] [status-im.constants :as c] [status-im.contexts.onboarding.create-profile.style :as style] [status-im.contexts.onboarding.select-photo.method-menu.view :as method-menu] @@ -17,40 +18,9 @@ [utils.re-frame :as rf] [utils.responsiveness :as responsiveness])) -;; NOTE - validation should match with Desktop -;; https://github.com/status-im/status-desktop/blob/2ba96803168461088346bf5030df750cb226df4c/ui/imports/utils/Constants.qml#L468 -;; -(def emoji-regex - (new - js/RegExp - #"(\u00a9|\u00ae|[\u2000-\u3300]|\ud83c[\ud000-\udfff]|\ud83d[\ud000-\udfff]|\ud83e[\ud000-\udfff])" - "i")) -(defn has-emojis [s] (re-find emoji-regex s)) -(def common-names ["Ethereum" "Bitcoin"]) -(defn has-common-names [s] (pos? (count (filter #(string/includes? s %) common-names)))) -(def status-regex (new js/RegExp #"^[a-zA-Z0-9\-_ ]+$")) -(defn has-special-characters [s] (not (re-find status-regex s))) -(def min-length 5) -(defn length-not-valid [s] (< (count (string/trim (str s))) min-length)) (def scroll-view-height (reagent/atom 0)) (def content-container-height (reagent/atom 0)) -(defn validation-message - [s] - (cond - (or (= s nil) (= s "")) nil - (has-special-characters s) (i18n/label :t/are-not-allowed - {:check (i18n/label :t/special-characters)}) - (string/ends-with? s "-eth") (i18n/label :t/ending-not-allowed {:ending "-eth"}) - (string/ends-with? s "_eth") (i18n/label :t/ending-not-allowed {:ending "_eth"}) - (string/ends-with? s ".eth") (i18n/label :t/ending-not-allowed {:ending ".eth"}) - (string/starts-with? s " ") (i18n/label :t/start-with-space) - (string/ends-with? s " ") (i18n/label :t/ends-with-space) - (has-common-names s) (i18n/label :t/are-not-allowed {:check (i18n/label :t/common-names)}) - (has-emojis s) (i18n/label :t/are-not-allowed {:check (i18n/label :t/emojis)}) - :else nil)) - - (defn show-button-background [keyboard-height keyboard-shown content-scroll-y] (let [button-container-height 64 @@ -66,7 +36,6 @@ :else false)))) - (defn button-container [show-keyboard? keyboard-shown show-background? keyboard-height children] (let [height (reagent/atom 0)] @@ -109,23 +78,26 @@ #(reset! show-keyboard? false)) {:keys [image-path display-name color]} onboarding-profile-data full-name (reagent/atom display-name) - validation-msg (reagent/atom (validation-message - @full-name)) + validation-msg (reagent/atom + (profile-validator/validation-name + @full-name)) on-change-text (fn [s] - (reset! validation-msg (validation-message - s)) + (reset! validation-msg + (profile-validator/validation-name + s)) (reset! full-name (string/trim s))) custom-color (reagent/atom (or color c/profile-default-color)) profile-pic (reagent/atom image-path) on-change-profile-pic #(reset! profile-pic %) on-change #(reset! custom-color %)] - (let [name-too-short? (length-not-valid @full-name) + (let [name-too-short? (profile-validator/name-too-short? @full-name) valid-name? (and (not @validation-msg) (not name-too-short?)) info-message (if @validation-msg @validation-msg (i18n/label :t/minimum-characters - {:min-chars min-length})) + {:min-chars + profile-validator/min-length})) info-type (cond @validation-msg :error name-too-short? :default :else :success) diff --git a/src/status_im/contexts/profile/edit/header/view.cljs b/src/status_im/contexts/profile/edit/header/view.cljs new file mode 100644 index 00000000000..0f7143eb16e --- /dev/null +++ b/src/status_im/contexts/profile/edit/header/view.cljs @@ -0,0 +1,33 @@ +(ns status-im.contexts.profile.edit.header.view + (:require [quo.core :as quo] + [react-native.core :as rn] + [status-im.common.not-implemented :as not-implemented] + [status-im.contexts.profile.edit.style :as style] + [status-im.contexts.profile.utils :as profile.utils] + [utils.i18n :as i18n] + [utils.re-frame :as rf])) + +(defn view + [] + (let [profile (rf/sub [:profile/profile-with-image]) + full-name (profile.utils/displayed-name profile) + profile-picture (profile.utils/photo profile)] + [rn/view + {:key :edit-profile + :style style/screen-container} + [quo/text-combinations {:title (i18n/label :t/edit-profile)}] + [rn/view style/avatar-wrapper + [quo/user-avatar + {:full-name full-name + :profile-picture profile-picture + :status-indicator? false + :ring? true + :size :big}] + [quo/button + {:on-press not-implemented/alert + :container-style style/camera-button + :icon-only? true + :type :grey + :background :photo + :size 32} + :i/camera]]])) diff --git a/src/status_im/contexts/profile/edit/list_items.cljs b/src/status_im/contexts/profile/edit/list_items.cljs new file mode 100644 index 00000000000..da20a58e4f1 --- /dev/null +++ b/src/status_im/contexts/profile/edit/list_items.cljs @@ -0,0 +1,62 @@ +(ns status-im.contexts.profile.edit.list-items + (:require [quo.foundations.colors :as colors] + [status-im.common.not-implemented :as not-implemented] + [status-im.contexts.profile.edit.style :as style] + [status-im.contexts.profile.utils :as profile.utils] + [utils.i18n :as i18n] + [utils.re-frame :as rf])) + +(defn items + [theme] + (let [profile (rf/sub [:profile/profile-with-image]) + customization-color (rf/sub [:profile/customization-color]) + full-name (profile.utils/displayed-name profile)] + [{:label (i18n/label :t/profile) + :items [{:title (i18n/label :t/name) + :on-press #(rf/dispatch [:open-modal :edit-name]) + :blur? true + :label :text + :label-props full-name + :action :arrow + :container-style style/item-container} + {:title (i18n/label :t/bio) + :on-press not-implemented/alert + :blur? true + :action :arrow + :container-style style/item-container} + {:title (i18n/label :t/accent-colour) + :on-press not-implemented/alert + :label :color + :label-props (colors/resolve-color customization-color theme) + :blur? true + :action :arrow + :container-style style/item-container}]} + + {:label (i18n/label :t/showcase) + :items [{:title (i18n/label :t/communities) + :on-press not-implemented/alert + :blur? true + :action :arrow + :container-style style/item-container} + {:title (i18n/label :t/accounts) + :on-press not-implemented/alert + :blur? true + :action :arrow + :container-style style/item-container} + {:title (i18n/label :t/collectibles) + :on-press not-implemented/alert + :blur? true + :action :arrow + :container-style style/item-container} + {:title (i18n/label :t/assets) + :on-press not-implemented/alert + :blur? true + :action :arrow + :container-style style/item-container}]} + + {:label (i18n/label :t/on-the-web) + :items [{:title (i18n/label :t/links) + :on-press not-implemented/alert + :blur? true + :action :arrow + :container-style style/item-container}]}])) diff --git a/src/status_im/contexts/profile/edit/name/events.cljs b/src/status_im/contexts/profile/edit/name/events.cljs new file mode 100644 index 00000000000..3e1feda2f23 --- /dev/null +++ b/src/status_im/contexts/profile/edit/name/events.cljs @@ -0,0 +1,18 @@ +(ns status-im.contexts.profile.edit.name.events + (:require [utils.i18n :as i18n] + [utils.re-frame :as rf])) + +(defn edit-profile-name + [{:keys [db]} [name]] + {:db (assoc-in db [:profile/profile :display-name] name) + :fx [[:json-rpc/call + [{:method "wakuext_setDisplayName" + :params [name] + :on-success (fn [] + (rf/dispatch [:navigate-back]) + (rf/dispatch [:toasts/upsert + {:type :positive + :theme :dark + :text (i18n/label :t/name-updated)}]))}]]]}) + +(rf/reg-event-fx :profile/edit-name edit-profile-name) diff --git a/src/status_im/contexts/profile/edit/name/events_test.cljs b/src/status_im/contexts/profile/edit/name/events_test.cljs new file mode 100644 index 00000000000..efba9bd8f9d --- /dev/null +++ b/src/status_im/contexts/profile/edit/name/events_test.cljs @@ -0,0 +1,15 @@ +(ns status-im.contexts.profile.edit.name.events-test + (:require [cljs.test :refer [deftest is]] + matcher-combinators.test + [status-im.contexts.profile.edit.name.events :as sut])) + +(deftest edit-name-test + (let [new-name "John Doe" + cofx {:db {:profile/profile {:display-name "Old name"}}} + expected {:db {:profile/profile {:display-name new-name}} + :fx [[:json-rpc/call + [{:method "wakuext_setDisplayName" + :params [name] + :on-success fn?}]]]}] + (is (match? expected + (sut/edit-profile-name cofx [new-name]))))) diff --git a/src/status_im/contexts/profile/edit/name/style.cljs b/src/status_im/contexts/profile/edit/name/style.cljs new file mode 100644 index 00000000000..3a94cbe9a41 --- /dev/null +++ b/src/status_im/contexts/profile/edit/name/style.cljs @@ -0,0 +1,17 @@ +(ns status-im.contexts.profile.edit.name.style) + +(defn page-wrapper + [insets] + {:padding-top (:top insets) + :padding-bottom (:bottom insets) + :padding-horizontal 1 + :flex 1}) + +(def screen-container + {:flex 1 + :padding-top 14 + :padding-horizontal 20 + :justify-content :space-between}) + +(def button-wrapper + {:margin-vertical 12}) diff --git a/src/status_im/contexts/profile/edit/name/view.cljs b/src/status_im/contexts/profile/edit/name/view.cljs new file mode 100644 index 00000000000..6d9ca85975b --- /dev/null +++ b/src/status_im/contexts/profile/edit/name/view.cljs @@ -0,0 +1,72 @@ +(ns status-im.contexts.profile.edit.name.view + (:require [clojure.string :as string] + [quo.core :as quo] + [react-native.core :as rn] + [react-native.safe-area :as safe-area] + [reagent.core :as reagent] + [status-im.common.validation.profile :as profile-validator] + [status-im.constants :as constants] + [status-im.contexts.profile.edit.name.style :as style] + [status-im.contexts.profile.utils :as profile.utils] + [utils.debounce :as debounce] + [utils.i18n :as i18n] + [utils.re-frame :as rf])) + +(defn view + [] + (let [insets (safe-area/get-insets) + profile (rf/sub [:profile/profile-with-image]) + customization-color (rf/sub [:profile/customization-color]) + display-name (profile.utils/displayed-name profile) + full-name (reagent/atom display-name) + error-msg (reagent/atom nil) + typing? (reagent/atom false) + validate-name (debounce/debounce (fn [name] + (reset! error-msg + (profile-validator/validation-name name)) + (reset! typing? false)) + 300) + on-change-text (fn [s] + (reset! typing? true) + (reset! full-name s) + (validate-name s))] + (fn [] + [quo/overlay + {:type :shell + :container-style (style/page-wrapper insets)} + [quo/page-nav + {:key :header + :background :blur + :icon-name :i/arrow-left + :on-press #(rf/dispatch [:navigate-back])}] + [rn/keyboard-avoiding-view + {:key :content + :style style/screen-container} + [rn/view {:style {:gap 22}} + [quo/text-combinations {:title (i18n/label :t/name)}] + [quo/input + {:theme :dark + :blur? true + :error? (not (string/blank? @error-msg)) + :container-style {:margin-bottom -11} + :default-value @full-name + :auto-focus true + :char-limit constants/profile-name-max-length + :label (i18n/label :t/profile-name) + :on-change-text on-change-text}] + (when-not (string/blank? @error-msg) + [quo/info-message + {:type :error + :size :default + :icon :i/info} + @error-msg])] + [rn/view {:style style/button-wrapper} + [quo/button + {:type :primary + :customization-color customization-color + :on-press (fn [] + (rf/dispatch [:profile/edit-name @full-name])) + :disabled? (boolean (or @typing? + (string/blank? @full-name) + (not (string/blank? @error-msg))))} + (i18n/label :t/save-name)]]]]))) diff --git a/src/status_im/contexts/profile/edit/style.cljs b/src/status_im/contexts/profile/edit/style.cljs new file mode 100644 index 00000000000..e96cc249dcd --- /dev/null +++ b/src/status_im/contexts/profile/edit/style.cljs @@ -0,0 +1,25 @@ +(ns status-im.contexts.profile.edit.style) + +(defn page-wrapper + [inset] + {:padding-top inset + :padding-horizontal 1}) + +(def screen-container + {:padding-top 14 + :padding-horizontal 20}) + +(def avatar-wrapper + {:width 88 + :margin-top 22 + :margin-bottom 12}) + +(def camera-button + {:position :absolute + :border-radius 16 + :overflow :hidden + :right 0 + :bottom 0}) + +(def item-container + {:padding-top 14}) diff --git a/src/status_im/contexts/profile/edit/view.cljs b/src/status_im/contexts/profile/edit/view.cljs new file mode 100644 index 00000000000..d66fe27d449 --- /dev/null +++ b/src/status_im/contexts/profile/edit/view.cljs @@ -0,0 +1,48 @@ +(ns status-im.contexts.profile.edit.view + (:require [quo.core :as quo] + [quo.theme :as quo.theme] + [react-native.core :as rn] + [react-native.safe-area :as safe-area] + [status-im.common.not-implemented :as not-implemented] + [status-im.contexts.profile.edit.header.view :as header] + [status-im.contexts.profile.edit.list-items :as edit.items] + [status-im.contexts.profile.edit.style :as style] + [utils.re-frame :as rf])) + +(defn- item-view + [data] + [quo/category + {:container-style {:padding-bottom 9.5} + :list-type :settings + :blur? true + :label (:label data) + :data (:items data)}]) + +(defn- get-item-layout + [_ index] + #js {:length 100 :offset (* 100 index) :index index}) + +(defn internal-view + [theme] + (let [insets (safe-area/get-insets)] + [quo/overlay + {:type :shell + :container-style (style/page-wrapper (:top insets))} + [quo/page-nav + {:key :header + :background :blur + :icon-name :i/arrow-left + :on-press #(rf/dispatch [:navigate-back]) + :right-side [{:icon-name :i/reveal :on-press not-implemented/alert}]}] + [rn/flat-list + {:key :list + :header [header/view] + :data (edit.items/items theme) + :key-fn :label + :get-item-layout get-item-layout + :initial-num-to-render 3 + :max-to-render-per-batch 3 + :shows-vertical-scroll-indicator false + :render-fn item-view}]])) + +(def view (quo.theme/with-theme internal-view)) diff --git a/src/status_im/contexts/profile/events.cljs b/src/status_im/contexts/profile/events.cljs index c1eef3b5775..4826b27b47e 100644 --- a/src/status_im/contexts/profile/events.cljs +++ b/src/status_im/contexts/profile/events.cljs @@ -2,6 +2,7 @@ (:require [native-module.core :as native-module] [re-frame.core :as re-frame] + [status-im.contexts.profile.edit.name.events] [status-im.contexts.profile.login.events :as profile.login] [status-im.contexts.profile.rpc :as profile.rpc] [status-im.navigation.events :as navigation] diff --git a/src/status_im/contexts/profile/settings/list_items.cljs b/src/status_im/contexts/profile/settings/list_items.cljs index 3e861783286..4f6301db16d 100644 --- a/src/status_im/contexts/profile/settings/list_items.cljs +++ b/src/status_im/contexts/profile/settings/list_items.cljs @@ -5,7 +5,7 @@ (def items [[{:title (i18n/label :t/edit-profile) - :on-press not-implemented/alert + :on-press #(rf/dispatch [:open-modal :edit-profile]) :image-props :i/edit :image :icon :blur? true diff --git a/src/status_im/integration_test/profile_test.cljs b/src/status_im/integration_test/profile_test.cljs new file mode 100644 index 00000000000..645c12ab8b0 --- /dev/null +++ b/src/status_im/integration_test/profile_test.cljs @@ -0,0 +1,22 @@ +(ns status-im.integration-test.profile-test + (:require + [cljs.test :refer [deftest is]] + [day8.re-frame.test :as rf-test] + [status-im.contexts.profile.utils :as profile.utils] + [test-helpers.integration :as h] + [utils.re-frame :as rf])) + +(deftest edit-profile-name-test + (h/log-headline :edit-profile-name-test) + (let [new-name "John Doe"] + (rf-test/run-test-async + (h/with-app-initialized + (h/with-account + (rf/dispatch [:profile/edit-name new-name]) + (rf-test/wait-for + [:navigate-back] + (rf-test/wait-for + [:toasts/upsert] + (let [profile (rf/sub [:profile/profile]) + display-name (profile.utils/displayed-name profile)] + (is (= new-name display-name)))))))))) diff --git a/src/status_im/navigation/screens.cljs b/src/status_im/navigation/screens.cljs index fd7b7cfd767..8ef658d759f 100644 --- a/src/status_im/navigation/screens.cljs +++ b/src/status_im/navigation/screens.cljs @@ -34,6 +34,8 @@ [status-im.contexts.preview.quo.component-preview.view :as component-preview] [status-im.contexts.preview.quo.main :as quo.preview] [status-im.contexts.preview.status-im.main :as status-im-preview] + [status-im.contexts.profile.edit.name.view :as edit-name] + [status-im.contexts.profile.edit.view :as edit-profile] [status-im.contexts.profile.profiles.view :as profiles] [status-im.contexts.profile.settings.view :as settings] [status-im.contexts.shell.activity-center.view :as activity-center] @@ -165,6 +167,14 @@ :on-focus [:onboarding/overlay-dismiss] :component profiles/view} + {:name :edit-profile + :options options/transparent-screen-options + :component edit-profile/view} + + {:name :edit-name + :options options/transparent-screen-options + :component edit-name/view} + {:name :new-to-status :options {:theme :dark :layout options/onboarding-transparent-layout diff --git a/translations/en.json b/translations/en.json index cc5b19510e0..c86c84a4341 100644 --- a/translations/en.json +++ b/translations/en.json @@ -65,6 +65,7 @@ "back-up-your-seed-phrase": "Back up your seed phrase", "balance": "Balance", "begin-set-up": "Begin setup", + "bio": "Bio", "biometric-auth-android-sensor-desc": "Touch sensor", "biometric-auth-android-sensor-error-desc": "Failed", "biometric-auth-android-title": "Authentication Required", @@ -874,6 +875,7 @@ "left": "left", "lets-go": "Let's go!", "les-ulc": "LES/ULC", + "links": "Links", "linked-on": "Linked on {{date}}", "load-messages-before": "before {{date}}", "load-more-messages": "↓ Fetch more messages", @@ -972,6 +974,7 @@ "multiaccounts-recover-enter-phrase-title": "Enter your seed phrase", "multichain": "Multichain", "name": "Name", + "name-updated": "Name updated", "name-of-token": "The name of your token", "need-help": "Need help?", "new-to-status": "I’m new to Status", @@ -1090,6 +1093,7 @@ "ok-got-it": "Okay, got it", "okay": "Okay", "on": "On", + "on-the-web": "On the web", "only-mentions": "Only @mentions", "open": "Open", "open-home": "Open...", @@ -1176,6 +1180,8 @@ "product-information": "Product Information", "profile": "Profile", "profile-details": "Profile details", + "profile-name": "Profile name", + "profile-name-is-too-long": "Profile name is too long", "public-chat": "Public chat", "public-chats": "Public chats", "public-group-status": "Public", @@ -1236,6 +1242,7 @@ "revoke-access": "Revoke access", "rpc-url": "RPC URL", "save": "Save", + "save-name": "Save name", "save-password": "Save password", "save-password-unavailable": "Set device passcode to save password", "save-password-unavailable-android": "Save password is unavailable: your device may be rooted or lacks necessary security features.", @@ -1287,6 +1294,7 @@ "sharing-copy-to-clipboard": "Copy", "share-logs": "Share logs", "sharing-share": "Share", + "showcase": "Showcase", "show-less": "Show less", "show-more": "Show more", "show-qr": "Show QR code",