Skip to content

Commit 50682c2

Browse files
committed
address design feedback on profile share UI
This commit adds UI Touchups to profile share screen according to Design Review.
1 parent a53ba0c commit 50682c2

File tree

6 files changed

+61
-45
lines changed

6 files changed

+61
-45
lines changed

src/quo2/components/tabs/segmented_tab.cljs

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
[theme :background-color])
2727
:border-radius (case size
2828
32 10
29-
28 8
29+
28 10
3030
24 8
3131
20 6)
3232
:padding 2}

src/status_im2/contexts/shell/share/style.cljs

+32-29
Original file line numberDiff line numberDiff line change
@@ -5,32 +5,38 @@
55
(def screen-padding 20)
66

77
(def blur
8-
{:style {:position :absolute
9-
:top 0
10-
:left 0
11-
:right 0
12-
:bottom 0}
13-
:overlay-color colors/neutral-80-opa-80
14-
:blur-amount 20})
8+
{:position :absolute
9+
:top 0
10+
:left 0
11+
:right 0
12+
:bottom 0
13+
:overlay-color colors/neutral-80-opa-80-blur})
14+
15+
(def header-row
16+
{:flex-direction :row
17+
:justify-content :space-between
18+
:padding-horizontal screen-padding
19+
:margin-vertical 12})
1520

1621
(def header-button
17-
{:margin-bottom 12
18-
:margin-left screen-padding})
22+
{:margin-bottom 12
23+
:background-color colors/white-opa-5})
1924

2025
(def header-heading
2126
{:padding-horizontal screen-padding
2227
:padding-vertical 12
2328
:color colors/white})
2429

2530
(def qr-code-container
26-
{:padding 12
27-
:border-radius 16
28-
:margin-top 12
29-
:margin-bottom 4
30-
:margin-horizontal screen-padding
31-
:background-color colors/white-opa-5
32-
:flex-direction :column
33-
:justify-content :center})
31+
{:padding-top 12
32+
:padding-bottom 8
33+
:padding-horizontal 12
34+
:border-radius 16
35+
:margin-top 8
36+
:margin-horizontal screen-padding
37+
:background-color colors/white-opa-5
38+
:flex-direction :column
39+
:justify-content :center})
3440

3541
(def emoji-hash-container
3642
{:border-radius 16
@@ -57,16 +63,13 @@
5763
:padding-top 2})
5864

5965
(def profile-address-container
60-
{:flex-direction :row
61-
:justify-content :flex-start
62-
:margin-top 6
63-
:margin-horizontal 4})
66+
{:flex-direction :row
67+
:justify-content :flex-start
68+
:margin-top 4})
6469

6570
(def emoji-address-container
66-
{:flex-direction :row
67-
:justify-content :flex-start
68-
:margin-top 6
69-
:margin-horizontal 4})
71+
{:flex-direction :row
72+
:justify-content :flex-start})
7073

7174
(def emoji-hash-label
7275
{:color colors/white-opa-40
@@ -78,20 +81,20 @@
7881
(def share-button-container
7982
{:position :absolute
8083
:right 0
81-
:top 16})
84+
:top 12})
8285

8386
(def emoji-share-button-container
8487
{:position :absolute
85-
:right 4
86-
:top 16})
88+
:right 0
89+
:top 12})
8790

8891
(def emoji-hash-content
8992
{:color colors/white
9093
:align-self :flex-start
9194
:padding-top 4
9295
:padding-bottom 12
9396
:padding-left 12
94-
:font-size 14})
97+
:font-size 13})
9598

9699
(def tabs-container
97100
{:padding-horizontal screen-padding

src/status_im2/contexts/shell/share/view.cljs

+24-11
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,30 @@
1111
[utils.image-server :as image-server]
1212
[react-native.navigation :as navigation]
1313
[clojure.string :as string]
14-
[utils.address :as address]))
14+
[utils.address :as address]
15+
[react-native.platform :as platform]))
1516

1617
(defn header
1718
[]
1819
[:<>
19-
[quo/button
20-
{:icon-only? true
21-
:type :grey
22-
:background :blur
23-
:size 32
24-
:accessibility-label :close-shell-share-tab
25-
:container-style style/header-button
26-
:on-press #(rf/dispatch [:navigate-back])}
27-
:i/close]
20+
[rn/view {:style style/header-row}
21+
[quo/button
22+
{:icon-only? true
23+
:type :grey
24+
:background :blur
25+
:size 32
26+
:accessibility-label :close-shell-share-tab
27+
:container-style style/header-button
28+
:on-press #(rf/dispatch [:navigate-back])}
29+
:i/close]
30+
[quo/button
31+
{:icon-only? true
32+
:type :grey
33+
:background :blur
34+
:size 32
35+
:accessibility-label :shell-scan-button
36+
:on-press #(rf/dispatch [:navigate-back])}
37+
:i/scan]]
2838
[quo/text
2939
{:size :heading-1
3040
:weight :semi-bold
@@ -154,5 +164,8 @@
154164
[rn/view
155165
{:flex 1
156166
:padding-top (navigation/status-bar-height)}
157-
[blur/view style/blur]
167+
[blur/view
168+
{:style style/blur
169+
:blur-amount 20
170+
:blur-radius (if platform/android? 25 10)}]
158171
[tab-content window-width]])))

src/utils/address.cljs

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@
1919
"The goal here is to generate a string that begins with
2020
join.status.im/u/ joined with the 1st 5 characters
2121
of the compressed public key followed by an ellipsis followed by
22-
the last 12 characters of the compressed public key"
22+
the last 10 characters of the compressed public key"
2323
[base-url public-key]
2424
(if (and public-key base-url (> (count public-key) 17) (= "join.status.im/u/" base-url))
2525
(let [first-part-of-public-pk (subs public-key 0 5)
2626
ellipsis "..."
2727
public-key-size (count public-key)
28-
last-part-of-public-key (subs public-key (- public-key-size 12) public-key-size)
28+
last-part-of-public-key (subs public-key (- public-key-size 10) public-key-size)
2929
abbreviated-url (str base-url
3030
first-part-of-public-pk
3131
ellipsis

src/utils/address_test.cljs

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
(deftest test-get-abbreviated-profile-url
2323
(testing "Ensure the function correctly generates an abbreviated profile URL for a valid public key"
24-
(is (= "join.status.im/u/zQ3sh...aimrdYpzeFUa"
24+
(is (= "join.status.im/u/zQ3sh...mrdYpzeFUa"
2525
(utils.address/get-abbreviated-profile-url
2626
"join.status.im/u/"
2727
"zQ3shPrnUhhR42JJn3QdhodGest8w8MjiH8hPaimrdYpzeFUa"))))

src/utils/image_server.cljs

+1-1
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@
283283
"&allowProfileImage="
284284
superimpose-profile?
285285
"&size="
286-
qr-size
286+
(* 2 qr-size)
287287
"&imageName="
288288
profile-image-type)]
289289
media-server-url))

0 commit comments

Comments
 (0)