From 595b1cfc405e88c3476b214db50a3ee51bf45106 Mon Sep 17 00:00:00 2001 From: Mohamed Javid <19339952+smohamedjavid@users.noreply.github.com> Date: Thu, 9 Nov 2023 02:26:56 +0800 Subject: [PATCH] [Fix] Move category selector height to emoji picker (#17844) This commit moves the emoji categories selector height from the "showcase-nav" component to the "emoji-picker" as we should not use any "quo" ns (except "quo.core") inside the "status-im2" ns. Signed-off-by: Mohamed Javid <19339952+smohamedjavid@users.noreply.github.com> --- src/quo/components/profile/showcase_nav/style.cljs | 5 ----- src/quo/components/profile/showcase_nav/view.cljs | 2 +- src/status_im2/contexts/emoji_picker/constants.cljs | 2 ++ src/status_im2/contexts/emoji_picker/style.cljs | 5 ++--- 4 files changed, 5 insertions(+), 9 deletions(-) diff --git a/src/quo/components/profile/showcase_nav/style.cljs b/src/quo/components/profile/showcase_nav/style.cljs index 8d6c163219..5516cbb37e 100644 --- a/src/quo/components/profile/showcase_nav/style.cljs +++ b/src/quo/components/profile/showcase_nav/style.cljs @@ -2,11 +2,6 @@ (:require [quo.foundations.colors :as colors])) -(def height 56) - -(def root-container - {:height height}) - (defn container [state theme] {:padding-top 12 diff --git a/src/quo/components/profile/showcase_nav/view.cljs b/src/quo/components/profile/showcase_nav/view.cljs index 7396489460..ec2ad57267 100644 --- a/src/quo/components/profile/showcase_nav/view.cljs +++ b/src/quo/components/profile/showcase_nav/view.cljs @@ -25,7 +25,7 @@ (defn- view-internal [{:keys [theme container-style default-active state data on-press active-id]}] [rn/view - {:style (merge style/root-container container-style) + {:style container-style :accessibility-label :showcase-nav} [rn/flat-list {:data data diff --git a/src/status_im2/contexts/emoji_picker/constants.cljs b/src/status_im2/contexts/emoji_picker/constants.cljs index 15c66da01b..4c9b9a2c51 100644 --- a/src/status_im2/contexts/emoji_picker/constants.cljs +++ b/src/status_im2/contexts/emoji_picker/constants.cljs @@ -16,6 +16,8 @@ (def ^:const emoji-row-separator-height 16) +(def ^:const categories-selector-height 56) + (def ^:const emoji-item-margin-right (/ (- (:width (rn/get-window)) (* emoji-row-padding-horizontal 2) diff --git a/src/status_im2/contexts/emoji_picker/style.cljs b/src/status_im2/contexts/emoji_picker/style.cljs index 5f56af38e2..b6b934a83a 100644 --- a/src/status_im2/contexts/emoji_picker/style.cljs +++ b/src/status_im2/contexts/emoji_picker/style.cljs @@ -1,13 +1,12 @@ (ns status-im2.contexts.emoji-picker.style (:require - [quo.components.profile.showcase-nav.style :as showcase-nav.style] [quo.foundations.colors :as colors] [react-native.safe-area :as safe-area] [status-im2.contexts.emoji-picker.constants :as constants])) (def flex-spacer {:flex 1}) -(def category-nav-height (+ (safe-area/get-bottom) showcase-nav.style/height)) +(def category-nav-height (+ (safe-area/get-bottom) constants/categories-selector-height)) (def search-input-container {:padding-horizontal 20 @@ -35,7 +34,7 @@ (dissoc :margin-right))) (def list-container - {:padding-bottom showcase-nav.style/height}) + {:padding-bottom constants/categories-selector-height}) (def empty-results {:margin-top 100})