Fixed issues with styling in pinned messages panel. (#16498)

This commit is contained in:
Rahul Pratap 2023-07-07 17:16:12 +05:30 committed by GitHub
parent dcda44fab6
commit cf2a3bfce7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 34 additions and 32 deletions

View File

@ -1,4 +1,4 @@
(ns quo2.components.separator (ns quo2.components.common.separator.view
(:require [quo2.foundations.colors :as quo2.colors] (:require [quo2.foundations.colors :as quo2.colors]
[react-native.core :as rn])) [react-native.core :as rn]))

View File

@ -1,6 +1,6 @@
(ns quo2.components.dividers.date (ns quo2.components.dividers.date
(:require [quo2.components.markdown.text :as text] (:require [quo2.components.markdown.text :as text]
[quo2.components.separator :as separator] [quo2.components.common.separator.view :as separator]
[quo2.foundations.colors :as colors] [quo2.foundations.colors :as colors]
[react-native.core :as rn])) [react-native.core :as rn]))

View File

@ -14,10 +14,12 @@
quo2.components.buttons.slide-button.view quo2.components.buttons.slide-button.view
quo2.components.code.snippet quo2.components.code.snippet
quo2.components.colors.color-picker.view quo2.components.colors.color-picker.view
quo2.components.common.separator.view
quo2.components.community.banner.view
quo2.components.community.channel-actions
quo2.components.community.community-card-view quo2.components.community.community-card-view
quo2.components.community.community-list-view quo2.components.community.community-list-view
quo2.components.community.community-view quo2.components.community.community-view
quo2.components.community.banner.view
quo2.components.community.icon quo2.components.community.icon
quo2.components.community.token-gating quo2.components.community.token-gating
quo2.components.counter.counter quo2.components.counter.counter
@ -31,8 +33,8 @@
quo2.components.drawers.drawer-buttons.view quo2.components.drawers.drawer-buttons.view
quo2.components.drawers.permission-context.view quo2.components.drawers.permission-context.view
quo2.components.dropdowns.dropdown quo2.components.dropdowns.dropdown
quo2.components.header
quo2.components.empty-state.empty-state.view quo2.components.empty-state.empty-state.view
quo2.components.header
quo2.components.icon quo2.components.icon
quo2.components.info.info-message quo2.components.info.info-message
quo2.components.info.information-box.view quo2.components.info.information-box.view
@ -42,9 +44,9 @@
quo2.components.inputs.search-input.view quo2.components.inputs.search-input.view
quo2.components.inputs.title-input.view quo2.components.inputs.title-input.view
quo2.components.keycard.view quo2.components.keycard.view
quo2.components.links.link-preview.view
quo2.components.links.url-preview-list.view quo2.components.links.url-preview-list.view
quo2.components.links.url-preview.view quo2.components.links.url-preview.view
quo2.components.links.link-preview.view
quo2.components.list-items.channel quo2.components.list-items.channel
quo2.components.list-items.menu-item quo2.components.list-items.menu-item
quo2.components.list-items.preview-list quo2.components.list-items.preview-list
@ -69,15 +71,16 @@
quo2.components.profile.profile-card.view quo2.components.profile.profile-card.view
quo2.components.profile.select-profile.view quo2.components.profile.select-profile.view
quo2.components.reactions.reaction quo2.components.reactions.reaction
quo2.components.selectors.reactions.view
quo2.components.record-audio.record-audio.view quo2.components.record-audio.record-audio.view
quo2.components.record-audio.soundtrack.view quo2.components.record-audio.soundtrack.view
quo2.components.selectors.disclaimer.view quo2.components.selectors.disclaimer.view
quo2.components.selectors.filter.view quo2.components.selectors.filter.view
quo2.components.selectors.reactions.view
quo2.components.selectors.selectors.view quo2.components.selectors.selectors.view
quo2.components.separator
quo2.components.settings.accounts.view quo2.components.settings.accounts.view
quo2.components.settings.privacy-option quo2.components.settings.privacy-option
quo2.components.settings.reorder-item.view
quo2.components.settings.settings-list.view
quo2.components.share.qr-code.view quo2.components.share.qr-code.view
quo2.components.share.share-qr-code.view quo2.components.share.share-qr-code.view
quo2.components.tabs.account-selector quo2.components.tabs.account-selector
@ -89,13 +92,10 @@
quo2.components.tags.tag quo2.components.tags.tag
quo2.components.tags.tags quo2.components.tags.tags
quo2.components.tags.token-tag quo2.components.tags.token-tag
quo2.components.text-combinations.title.view quo2.components.text-combinations.title.view))
quo2.components.settings.settings-list.view
quo2.components.settings.reorder-item.view
quo2.components.community.channel-actions))
(def icon quo2.components.icon/icon) (def icon quo2.components.icon/icon)
(def separator quo2.components.separator/separator) (def separator quo2.components.common.separator.view/separator)
(def header quo2.components.header/header) (def header quo2.components.header/header)
(def dropdown quo2.components.dropdowns.dropdown/dropdown) (def dropdown quo2.components.dropdowns.dropdown/dropdown)
(def info-message quo2.components.info.info-message/info-message) (def info-message quo2.components.info.info-message/info-message)

View File

@ -13,7 +13,8 @@
:align-self :flex-start :align-self :flex-start
:margin-horizontal 20 :margin-horizontal 20
:padding 4 :padding 4
:margin-top 8}) :margin-top 8
:margin-bottom 16})
(defn heading-text (defn heading-text
[] []

View File

@ -51,7 +51,7 @@
:render-fn message-render-fn :render-fn message-render-fn
:footer [rn/view {:style (style/list-footer bottom-inset)}] :footer [rn/view {:style (style/list-footer bottom-inset)}]
:key-fn list-key-fn :key-fn list-key-fn
:separator quo/separator}] :separator [quo/separator {:style {:margin-vertical 8}}]}]
[rn/view {:style (style/no-pinned-messages-container bottom-inset)} [rn/view {:style (style/no-pinned-messages-container bottom-inset)}
[rn/view {:style style/no-pinned-messages-icon} [rn/view {:style style/no-pinned-messages-icon}
[quo/icon :i/placeholder]] [quo/icon :i/placeholder]]

View File

@ -11,5 +11,5 @@
(and (not in-pinned-view?) (or mentioned pinned-by)) (and (not in-pinned-view?) (or mentioned pinned-by))
(assoc :background-color colors/primary-50-opa-5 :margin-bottom 4) (assoc :background-color colors/primary-50-opa-5 :margin-bottom 4)
(or mentioned pinned-by last-in-group?) (and (not in-pinned-view?) (or mentioned pinned-by last-in-group?))
(assoc :margin-top 8)))) (assoc :margin-top 8))))

View File

@ -187,8 +187,9 @@
:show-reactions? true}]])}])) :show-reactions? true}]])}]))
(defn message (defn message
[{:keys [pinned-by mentioned in-pinned-view? content-type last-in-group? deleted? deleted-for-me?] [{:keys [pinned-by mentioned content-type last-in-group? deleted? deleted-for-me?]
:as message-data} context keyboard-shown?] :as message-data} context keyboard-shown?]
(let [in-pinned-view? (:in-pinned-view? context)]
(if (or deleted? deleted-for-me?) (if (or deleted? deleted-for-me?)
[rn/view {:style (style/message-container)} [rn/view {:style (style/message-container)}
[content.deleted/deleted-message message-data context]] [content.deleted/deleted-message message-data context]]
@ -204,4 +205,4 @@
{:message-data message-data {:message-data message-data
:context context :context context
:keyboard-shown? keyboard-shown? :keyboard-shown? keyboard-shown?
:show-reactions? true}])])) :show-reactions? true}])])))