Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed styling issues for mention in the chat text #15723

Merged
merged 2 commits into from
Apr 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions src/status_im2/contexts/chat/messages/content/text/style.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,23 @@
:padding-left 10
:border-left-color colors/neutral-40})

(defn mention-tag-wrapper
[]
{:flex-direction :row
:align-items :center})

(def mention-tag
{:background-color colors/primary-50-opa-10
:padding-horizontal 3
:border-radius 6
:margin-bottom -3})

(def mention-tag-text
rahulpsingh marked this conversation as resolved.
Show resolved Hide resolved
{:color (colors/theme-colors colors/primary-50
colors/primary-60)
:selection-color :transparent
:suppress-highlighting true})

(defn code
[]
{:background-color (colors/theme-colors colors/neutral-5 colors/white-opa-5)
Expand Down
18 changes: 10 additions & 8 deletions src/status_im2/contexts/chat/messages/content/text/view.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,16 @@
:mention
(conj
units
[rn/touchable-opacity
{:active-opacity 1
:on-press #(rf/dispatch [:chat.ui/show-profile literal])
:style (merge style/block {:background-color colors/primary-50-opa-10})}
[quo/text
{:weight :medium
:style {:color (colors/theme-colors colors/primary-50 colors/primary-60)}}
(rf/sub [:messages/resolve-mention literal])]])
[rn/view
{:style style/mention-tag-wrapper}
[rn/touchable-opacity
{:active-opacity 1
:on-press #(rf/dispatch [:chat.ui/show-profile literal])
:style style/mention-tag}
[quo/text
{:weight :medium
:style style/mention-tag-text}
(rf/sub [:messages/resolve-mention literal])]]])

:edited
(conj units
Expand Down