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

[🐴] Rich text in messages #3926

Merged
merged 8 commits into from
May 9, 2024
Merged

[🐴] Rich text in messages #3926

merged 8 commits into from
May 9, 2024

Conversation

mozzius
Copy link
Member

@mozzius mozzius commented May 9, 2024

Adds support for links, mentions, tags. Not yet displayed while typing, it generates them just as you send and then the bubble can now display them

Screenshot 2024-05-09 at 13 42 07

Copy link

render bot commented May 9, 2024

Copy link

github-actions bot commented May 9, 2024

Old size New size Diff
6.89 MB 6.89 MB 677 B (0.01%)

Comment on lines 47 to 54
const flattenedStyle = flatten(style)
const plainStyles = [a.leading_snug, flattenedStyle]
const interactiveStyles = [
a.leading_snug,
a.pointer_events_auto,
display === 'underlines' && a.underline,
flattenedStyle,
]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wait why is this necessary here 🤔

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was an attempt to simplify the code here, there was a lot of repetition of [...styles, {pointerEvents: 'auto'}] and I wanted to add a.underline to it

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't just pass in underline to the style prop because that would affect all the text

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh of course, I got ya, my b. Kind of a nit, but we have style, can we just do interactivesStyle or something and pass in styles as an array that get spread here in place of the display check? Feels more stable than these other values.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like that better, will do

Copy link
Member

@estrattonbailey estrattonbailey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice one!

@mozzius mozzius merged commit becc708 into main May 9, 2024
6 checks passed
@mozzius mozzius deleted the samuel/msg-rich-text branch May 9, 2024 20:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants