Skip to content

Commit cdcc09f

Browse files
authored
Merge branch 'develop' into share-community-qr-17993
2 parents becae37 + 9362d12 commit cdcc09f

File tree

8 files changed

+63
-53
lines changed

8 files changed

+63
-53
lines changed

src/quo/components/tags/tag.cljs

+15-9
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,19 @@
2727
:blurred-border-color colors/white-opa-10
2828
:text-color {:style {:color colors/white}}}}})
2929

30+
(defn- emoji-comp
31+
[size resource]
32+
(let [dimension (case size
33+
32 20
34+
24 12
35+
nil)]
36+
(if (string? resource)
37+
[rn/text {:style {:margin-right 4 :font-size dimension}}
38+
resource]
39+
[rn/image
40+
{:source resource
41+
:style {:margin-right 4 :width dimension :height dimension}}])))
42+
3043
(defn tag-resources
3144
[size type resource icon-color label text-color labelled?]
3245
[rn/view
@@ -47,13 +60,7 @@
4760
24 12)
4861
:color icon-color}])
4962
(when (= type :emoji)
50-
[text/text
51-
{:style {:margin-right 4}
52-
:size (case size
53-
32 :paragraph-1
54-
24 :paragraph-2
55-
nil)}
56-
resource])
63+
[emoji-comp size resource])
5764
(when labelled?
5865
[text/text
5966
(merge {:size (case size
@@ -73,7 +80,7 @@
7380
:size 32/24
7481
:on-press fn
7582
:blurred? true/false
76-
:resource icon/image
83+
:resource icon/image/text(emojis)
7784
:labelled? true/false
7885
:disabled? true/false}
7986
@@ -107,4 +114,3 @@
107114
[tag-resources size type resource icon-color label text-color labelled?]]]))
108115

109116
(def tag (quo.theme/with-theme tag-internal))
110-

src/quo/components/text_combinations/view.cljs

+4-2
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,16 @@
2121
(defn view-internal
2222
[{:keys [container-style
2323
title
24+
title-number-of-lines
2425
avatar
2526
title-accessibility-label
2627
description
2728
description-accessibility-label
2829
button-icon
2930
button-on-press
3031
customization-color
31-
emoji-hash]}]
32+
emoji-hash]
33+
:or {title-number-of-lines 1}}]
3234
[rn/view {:style container-style}
3335
[rn/view
3436
{:style {:flex-direction :row
@@ -41,7 +43,7 @@
4143
{:accessibility-label title-accessibility-label
4244
:weight :semi-bold
4345
:ellipsize-mode :tail
44-
:number-of-lines 1
46+
:number-of-lines title-number-of-lines
4547
:size :heading-1}
4648
title]]
4749
(when button-icon

src/status_im/contexts/communities/actions/accounts_selection/style.cljs

+2-11
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,13 @@
77
(def container
88
{:flex 1})
99

10-
(def page-top
11-
{:padding-vertical 12
12-
:padding-horizontal screen-horizontal-padding})
13-
1410
(def section-title
1511
{:padding-top 12
1612
:padding-bottom 4
1713
:padding-horizontal screen-horizontal-padding})
1814

1915
(defn bottom-actions
2016
[]
21-
{:position :absolute
22-
:background-color (colors/theme-colors colors/white colors/neutral-95)
23-
:bottom 0
24-
:left 0
25-
:right 0
17+
{:padding-top 12
2618
:padding-horizontal screen-horizontal-padding
27-
:padding-vertical 12
28-
:flex 1})
19+
:background-color (colors/theme-colors colors/white colors/neutral-95)})

src/status_im/contexts/communities/actions/accounts_selection/view.cljs

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
highest-role-text (i18n/label (communities.utils/role->translation-key
2929
highest-permission-role
3030
:t/member))]
31-
[rn/view {:style style/container}
31+
[rn/safe-area-view {:style style/container}
3232
[quo/page-nav
3333
{:text-align :left
3434
:icon-name :i/close

src/status_im/contexts/communities/actions/community_rules/style.cljs

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,6 @@
33
(def community-rule
44
{:flex 1
55
:align-items :flex-start
6-
:padding-vertical 8
6+
:padding-top 8
7+
:margin-bottom 12
78
:padding-horizontal 20})

src/status_im/contexts/communities/overview/view.cljs

+23-18
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
{:key category-id
7272
;; on-layout fires only when the component re-renders, so
7373
;; in case the category hasn't changed, it will not be fired
74-
:on-layout #(on-category-layout name (int (layout-y %)))}
74+
:on-layout #(on-category-layout name category-id (int (layout-y %)))}
7575
(when-not (= constants/empty-category-id category-id)
7676
[quo/divider-label
7777
{:on-press #(collapse-category community-id category-id collapsed?)
@@ -238,18 +238,18 @@
238238
(defn- community-header
239239
[title logo description]
240240
[quo/text-combinations
241-
{:container-style
242-
{:margin-top
243-
(if logo
244-
12
245-
(+ scroll-page.style/picture-radius
246-
scroll-page.style/picture-border-width
247-
12))
248-
:margin-bottom 12}
249-
:avatar logo
250-
:title title
251-
:description description
252-
:title-accessibility-label :community-title
241+
{:container-style {:margin-top
242+
(if logo
243+
12
244+
(+ scroll-page.style/picture-radius
245+
scroll-page.style/picture-border-width
246+
12))
247+
:margin-bottom 12}
248+
:avatar logo
249+
:title title
250+
:title-number-of-lines 2
251+
:description description
252+
:title-accessibility-label :community-title
253253
:description-accessibility-label :community-description}])
254254

255255
(defn- community-content
@@ -328,10 +328,14 @@
328328
(swap! categories-heights select-keys categories)
329329
(reset! first-channel-height height))]
330330
(fn [id joined name images]
331-
(let [cover {:uri (get-in images [:banner :uri])}
332-
logo {:uri (get-in images [:thumbnail :uri])}
333-
collapsed? (and initial-joined? joined)
334-
overlay-shown? (boolean (:sheets (rf/sub [:bottom-sheet])))]
331+
(let [cover {:uri (get-in images [:banner :uri])}
332+
logo {:uri (get-in images [:thumbnail :uri])}
333+
collapsed? (and initial-joined? joined)
334+
first-category-height (->> @categories-heights
335+
vals
336+
(apply min)
337+
(+ @first-channel-height))
338+
overlay-shown? (boolean (:sheets (rf/sub [:bottom-sheet])))]
335339
[scroll-page/scroll-page
336340
{:cover-image cover
337341
:collapsed? collapsed?
@@ -347,7 +351,8 @@
347351
:community-name name
348352
:community-logo logo}
349353
:sticky-header [sticky-category-header
350-
{:enabled (> @scroll-height @first-channel-height)
354+
{:enabled (> @scroll-height
355+
first-category-height)
351356
:label (pick-first-category-by-height
352357
@scroll-height
353358
@first-channel-height

src/status_im/contexts/preview/quo/community/community_card_view.cljs

+9-9
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@
1515
:community-icon (resources/get-mock-image :status-logo)
1616
:customization-color :blue
1717
:tokens [{:id 1 :group [{:id 1 :token-icon (resources/get-mock-image :status-logo)}]}]
18-
:tags [{:id 1
19-
:tag-label (i18n/label :t/music)
20-
:emoji (resources/get-image :music)}
21-
{:id 2
22-
:tag-label (i18n/label :t/lifestyle)
23-
:emoji (resources/get-image :lifestyle)}
24-
{:id 3
25-
:tag-label (i18n/label :t/podcasts)
26-
:emoji (resources/get-image :podcasts)}]})
18+
:tags [{:id 1
19+
:name (i18n/label :t/music)
20+
:emoji (resources/get-image :music)}
21+
{:id 2
22+
:name (i18n/label :t/lifestyle)
23+
:emoji "🧩"}
24+
{:id 3
25+
:name (i18n/label :t/podcasts)
26+
:emoji "🎶"}]})
2727

2828
(def descriptor
2929
[{:key :status

test/appium/views/chat_view.py

+7-2
Original file line numberDiff line numberDiff line change
@@ -1242,8 +1242,13 @@ def send_images_with_description(self, description, indexes=None):
12421242
self.show_images_button.click()
12431243
self.allow_button.click_if_shown()
12441244
self.allow_all_button.click_if_shown()
1245-
[self.get_image_by_index(i).click() for i in indexes]
1246-
self.images_confirm_selection_button.click()
1245+
confirm_button = self.images_confirm_selection_button
1246+
for i in indexes:
1247+
# ToDo: should be changed to just 1 click when https://github.com/status-im/status-mobile/issues/18872 when is fixed
1248+
self.get_image_by_index(i).click()
1249+
if not confirm_button.is_element_displayed(sec=3):
1250+
self.get_image_by_index(i).click()
1251+
confirm_button.click()
12471252
self.chat_message_input.send_keys(description)
12481253
self.send_message_button.click()
12491254

0 commit comments

Comments
 (0)