-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Conversation
Your Render PR Server URL is https://social-app-pr-3926.onrender.com. Follow its progress at https://dashboard.render.com/web/srv-couc8a0cmk4c73fldr2g. |
|
src/components/RichText.tsx
Outdated
const flattenedStyle = flatten(style) | ||
const plainStyles = [a.leading_snug, flattenedStyle] | ||
const interactiveStyles = [ | ||
a.leading_snug, | ||
a.pointer_events_auto, | ||
display === 'underlines' && a.underline, | ||
flattenedStyle, | ||
] |
There was a problem hiding this comment.
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 🤔
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice one!
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