Skip to content

Commit

Permalink
Remove 'Community admins will review your request' text from communit…
Browse files Browse the repository at this point in the history
…y overview screen (#19361)

* Remove 'Community admins will review your request' text from community overview screen

* Use the button label 'Request to join' for all communities

* e2e: updated test

---------

Co-authored-by: Yevheniia Berdnyk <[email protected]>
  • Loading branch information
2 people authored and mmilad75 committed Apr 2, 2024
1 parent b2c3cdc commit 28b4d86
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 14 deletions.
15 changes: 4 additions & 11 deletions src/status_im/contexts/communities/overview/view.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -178,23 +178,16 @@
:container-style {:margin-horizontal 12 :margin-top 12 :margin-bottom 12}
:disabled? (not can-request-access?)
:icon-left (if can-request-access? :i/unlocked :i/locked)}
(i18n/label :t/join-open-community)]])))
(i18n/label :t/request-to-join)]])))

(defn- join-community
[{:keys [id joined permissions can-request-access?] :as community}]
[{:keys [id joined permissions] :as community}]
(let [pending? (rf/sub [:communities/my-pending-request-to-join id])
access-type (get-access-type (:access permissions))
unknown-access? (= access-type :unknown-access)
invite-only? (= access-type :invite-only)]
[:<>
(when-not (or joined pending? invite-only? unknown-access?)
[token-requirements community])
(when (and can-request-access? (not joined))
[quo/text
{:size :paragraph-2
:weight :regular
:style style/review-notice}
(i18n/label :t/community-admins-will-review-your-request)])]))
(when-not (or joined pending? invite-only? unknown-access?)
[token-requirements community])))

(defn- status-tag
[community-id joined]
Expand Down
3 changes: 1 addition & 2 deletions test/appium/tests/critical/test_deep_and_universal_links.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,7 @@ def test_links_open_universal_links_from_other_apps(self):
community_url = "https://status.app/c/Ow==#zQ3shbmfT3hvh4mKa1v6uAjjyztQEroh8Mfn6Ckegjd7LT3XK"
self.home.open_link_from_google_search_app(community_url, app_package)
self.sign_in.sign_in()
if not self.home.element_by_translation_id(
"community-admins-will-review-your-request").is_element_displayed(10):
if not self.community_view.join_button.is_element_displayed(10):
self.errors.append("Closed community was not requested to join by the url %s" % community_url)

# ToDo: enable when https://github.com/status-im/status-mobile/issues/18074 is fixed
Expand Down
1 change: 0 additions & 1 deletion translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,6 @@
"membership-title": "Membership requirement",
"create-channel-title": "New channel",
"edit-channel-title": "Edit channel",
"community-admins-will-review-your-request": "Community admins will review your request",
"community-thumbnail-image": "Thumbnail image",
"community-emoji-thumbnail-title": "Thumbnail",
"community-thumbnail-upload": "Upload",
Expand Down

0 comments on commit 28b4d86

Please sign in to comment.