From 231272603d3466216e75979c1fd5fe320ee37afb Mon Sep 17 00:00:00 2001 From: Mohsen Ghafouri Date: Mon, 28 Aug 2023 18:09:42 +0300 Subject: [PATCH] [#16861] fix: resolve discover communities design feedbacks (#17128) --- src/quo2/components/community/style.cljs | 10 +++---- .../components/navigation/page_nav/view.cljs | 3 +-- src/quo2/foundations/shadows.cljs | 27 ++++++++++++------- .../contexts/communities/discover/style.cljs | 7 ++--- translations/en.json | 2 +- 5 files changed, 27 insertions(+), 22 deletions(-) diff --git a/src/quo2/components/community/style.cljs b/src/quo2/components/community/style.cljs index 379b9ac594..40561fdfc1 100644 --- a/src/quo2/components/community/style.cljs +++ b/src/quo2/components/community/style.cljs @@ -4,18 +4,14 @@ (defn community-card [radius theme] - {:shadow-offset {:width 0 - :height 2} - :shadow-radius radius - :shadow-opacity 1 - :shadow-color colors/shadow - :elevation 1 + (assoc + (shadows/get 2 theme) :border-radius radius :justify-content :space-between :background-color (colors/theme-colors colors/white colors/neutral-90 - theme)}) + theme))) (def detail-container {:flex 1}) diff --git a/src/quo2/components/navigation/page_nav/view.cljs b/src/quo2/components/navigation/page_nav/view.cljs index 76356aff52..2236ff58be 100644 --- a/src/quo2/components/navigation/page_nav/view.cljs +++ b/src/quo2/components/navigation/page_nav/view.cljs @@ -28,8 +28,7 @@ :icon-only? true :size 32 :on-press on-press - :accessibility-label accessibility-label - :background (when (#{:photo :blur} background) background)} + :accessibility-label accessibility-label} icon-name])] children)) diff --git a/src/quo2/foundations/shadows.cljs b/src/quo2/foundations/shadows.cljs index c171d554e4..8e193859e5 100644 --- a/src/quo2/foundations/shadows.cljs +++ b/src/quo2/foundations/shadows.cljs @@ -1,25 +1,30 @@ (ns quo2.foundations.shadows (:refer-clojure :exclude [get]) (:require [quo2.foundations.colors :as colors] - [quo2.theme :as quo.theme])) + [quo2.theme :as quo.theme] + [react-native.platform :as platform])) (def ^:private shadows - (let [dark-normal {1 {:shadow-color (colors/alpha colors/neutral-100 0.5) + (let [dark-normal {1 {:shadow-color (when platform/ios? + (colors/alpha colors/neutral-100 0.5)) :shadow-offset {:width 0 :height 4} :elevation 3 :shadow-opacity 1 :shadow-radius 20} - 2 {:shadow-color (colors/alpha colors/neutral-100 0.64) + 2 {:shadow-color (when platform/ios? + (colors/alpha colors/neutral-100 0.64)) :shadow-offset {:width 0 :height 4} :elevation 4 :shadow-opacity 1 :shadow-radius 20} - 3 {:shadow-color (colors/alpha colors/neutral-100 0.64) + 3 {:shadow-color (when platform/ios? + (colors/alpha colors/neutral-100 0.64)) :shadow-offset {:width 0 :height 12} :elevation 8 :shadow-opacity 1 :shadow-radius 20} - 4 {:shadow-color (colors/alpha colors/neutral-100 0.72) + 4 {:shadow-color (when platform/ios? + (colors/alpha colors/neutral-100 0.72)) :shadow-offset {:width 0 :height 16} :shadow-opacity 1 :shadow-radius 20 @@ -29,22 +34,26 @@ (update-in [:medium :shadow-offset :height] -) (update-in [:intense :shadow-offset :height] -) (update-in [:strong :shadow-offset :height] -)) - light-normal {1 {:shadow-color (colors/alpha colors/neutral-100 0.04) + light-normal {1 {:shadow-color (when platform/ios? + (colors/alpha colors/neutral-100 0.04)) :shadow-offset {:width 0 :height 4} :elevation 1 :shadow-opacity 1 :shadow-radius 16} - 2 {:shadow-color (colors/alpha colors/neutral-100 0.08) + 2 {:shadow-color (when platform/ios? + (colors/alpha colors/neutral-100 0.08)) :shadow-offset {:width 0 :height 4} :elevation 6 :shadow-opacity 1 :shadow-radius 16} - 3 {:shadow-color (colors/alpha colors/neutral-100 0.12) + 3 {:shadow-color (when platform/ios? + (colors/alpha colors/neutral-100 0.12)) :shadow-offset {:width 0 :height 12} :elevation 8 :shadow-opacity 1 :shadow-radius 16} - 4 {:shadow-color (colors/alpha colors/neutral-100 0.16) + 4 {:shadow-color (when platform/ios? + (colors/alpha colors/neutral-100 0.16)) :shadow-offset {:width 0 :height 16} :shadow-opacity 1 :shadow-radius 16 diff --git a/src/status_im2/contexts/communities/discover/style.cljs b/src/status_im2/contexts/communities/discover/style.cljs index c598b49205..0badf71b7a 100644 --- a/src/status_im2/contexts/communities/discover/style.cljs +++ b/src/status_im2/contexts/communities/discover/style.cljs @@ -10,10 +10,11 @@ (def featured-communities-header {:flex-direction :row :height 30 - :padding-top 8 - :margin-bottom 8 + :padding-top 6 + :margin-bottom 7 :padding-right 20 :margin-left 20 + :align-items :center :justify-content :space-between}) (def featured-communities-title-container @@ -57,7 +58,7 @@ :justify-content :center}) (def render-communities-container - {:margin-top 100}) + {:margin-top (if platform/ios? 57 104)}) (defn blur-tabs-header [] diff --git a/translations/en.json b/translations/en.json index 9b0f13f6b4..b56ea26461 100644 --- a/translations/en.json +++ b/translations/en.json @@ -476,7 +476,7 @@ "discover": "Discover", "discover-web3": "Discover web3", "dismiss": "Dismiss", - "discover-communities": "Discover Communities", + "discover-communities": "Discover communities", "done": "Done", "edit": "Edit", "edit-group": "Edit group",