From 4e1851d53c179da24b9012f4da2621176a2aeda9 Mon Sep 17 00:00:00 2001 From: Lungu Cristian Date: Tue, 9 Apr 2024 10:43:33 +0300 Subject: [PATCH] Fix the channel-action when the text is too long (#19462) * fix: don't increase action with text * addressed review comments --- .../components/community/channel_action/style.cljs | 2 +- src/quo/components/community/channel_action/view.cljs | 7 ++++--- .../preview/quo/community/channel_actions.cljs | 11 +++++++++++ 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/src/quo/components/community/channel_action/style.cljs b/src/quo/components/community/channel_action/style.cljs index cd4f10af6c..985643ed9e 100644 --- a/src/quo/components/community/channel_action/style.cljs +++ b/src/quo/components/community/channel_action/style.cljs @@ -6,7 +6,7 @@ [{:keys [big? disabled?]}] (cond-> {} disabled? (assoc :opacity 0.3) - big? (assoc :flex-grow 1) + big? (assoc :flex 1) (not big?) (assoc :width 104))) (defn channel-action diff --git a/src/quo/components/community/channel_action/view.cljs b/src/quo/components/community/channel_action/view.cljs index b876e27692..80e9408b33 100644 --- a/src/quo/components/community/channel_action/view.cljs +++ b/src/quo/components/community/channel_action/view.cljs @@ -14,9 +14,10 @@ on-press-in (rn/use-callback #(set-pressed true)) on-press-out (rn/use-callback #(set-pressed false))] [rn/view - {:style (style/channel-action-container - {:big? big? - :disabled? disabled?})} + {:accessibility-label :channel-action + :style (style/channel-action-container + {:big? big? + :disabled? disabled?})} [rn/pressable (cond-> {:style (style/channel-action {:big? big? diff --git a/src/status_im/contexts/preview/quo/community/channel_actions.cljs b/src/status_im/contexts/preview/quo/community/channel_actions.cljs index 2746a95770..d076bc35f4 100644 --- a/src/status_im/contexts/preview/quo/community/channel_actions.cljs +++ b/src/status_im/contexts/preview/quo/community/channel_actions.cljs @@ -34,6 +34,17 @@ :customization-color :blue :icon :i/muted}]}] [rn/view {:height 50}] + [quo/channel-actions + {:actions + [{:big? true + :label "Pinned Messages sometimes can get very long and we have to take care of that" + :customization-color :blue + :icon :i/pin + :counter-value 5} + {:label "Mute chat" + :customization-color :blue + :icon :i/muted}]}] + [rn/view {:height 50}] [quo/channel-actions {:actions [{:label "Pinned Messages" :customization-color :blue