Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

chore: organise chats context #18373

Merged
merged 1 commit into from
Jan 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/legacy/status_im/chat/models/loading.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -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]))

Expand Down
6 changes: 3 additions & 3 deletions src/legacy/status_im/chat/models/message.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -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?
Expand Down
2 changes: 1 addition & 1 deletion src/legacy/status_im/chat/models/message_test.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down
2 changes: 1 addition & 1 deletion src/legacy/status_im/contact/block.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -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]))
Expand Down
4 changes: 2 additions & 2 deletions src/legacy/status_im/ui/screens/chat/message/legacy_view.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -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]]))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/status_im/common/signals/events.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
12 changes: 6 additions & 6 deletions src/status_im/contexts/chat/events.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
Original file line number Diff line number Diff line change
@@ -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]))

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(ns status-im.contexts.chat.new-chat.view
(ns status-im.contexts.chat.home.new-chat.view
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it only one file that needs to be under home ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not sure exactly what you mean here?

Copy link
Contributor

Choose a reason for hiding this comment

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

chat/home - any folder which may be used in the home page

I only see one file (and its style) under contexts.chat.home

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In this pr, under home there is

add_new_contact,
chat_list_item,
new_chat,
contact_request,
view (main entry point)

Happy to restructure it more

Copy link
Contributor Author

@J-Son89 J-Son89 Jan 3, 2024

Choose a reason for hiding this comment

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

checked Github with this branch:
Screenshot 2024-01-03 at 16 43 57

Copy link
Contributor

@OmarBasem OmarBasem Jan 4, 2024

Choose a reason for hiding this comment

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

Oh okay fine, these files weren't showing as changes cause they were already under a home namespace

(:require
[quo.core :as quo]
[quo.foundations.colors :as colors]
Expand All @@ -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]))

Expand Down
Original file line number Diff line number Diff line change
@@ -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]
Expand Down
Original file line number Diff line number Diff line change
@@ -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]
Expand All @@ -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]))

Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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]
Expand All @@ -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]))

Expand Down
Original file line number Diff line number Diff line change
@@ -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]))
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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]))

Expand Down
Original file line number Diff line number Diff line change
@@ -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]
Expand All @@ -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]))

Expand Down
Original file line number Diff line number Diff line change
@@ -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]
Expand Down
Original file line number Diff line number Diff line change
@@ -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]))

Expand Down
Original file line number Diff line number Diff line change
@@ -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?]
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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]))
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
(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]
[quo.theme :as quo.theme]
[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
Expand Down
Original file line number Diff line number Diff line change
@@ -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]
Expand Down
Original file line number Diff line number Diff line change
@@ -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]
Expand Down
Original file line number Diff line number Diff line change
@@ -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")
Expand Down
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
Original file line number Diff line number Diff line change
@@ -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]))

Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
(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]
[react-native.reanimated :as reanimated]
[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
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(ns status-im.contexts.chat.composer.reply.style)
(ns status-im.contexts.chat.messenger.composer.reply.style)


(defn container
Expand Down
Loading