-
-
Notifications
You must be signed in to change notification settings - Fork 169
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
perf: hide/show on-hover shortcut menu with CSS #3751
Conversation
3046199
to
59488f7
Compare
59488f7
to
a218f12
Compare
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.
Thank you, using plain CSS for this is definitely better like that.
The new approach is a little bit more visually "active" but since the elements are so discreet one almost doesn't notice it.
<li id={props.key2} className='message-wrapper'> | ||
<Message {...props} /> | ||
<div className='message-observer-bottom' id={'bottom-' + props.key2} /> | ||
</li> |
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.
We could use the new SCSS module approach here for anything new (styles in scss
folder are deprecated)
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.
we can move it later along with the other remaining message styles.
please rebase onto |
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.
Thanks, this improves scroll performance a lot for me.
...instead of JS. Previously hovering over a different message would cause the whole message list to re-render. There are slight behavioral changes: - Previously if you pointed the cursor to a message, then scrolled the chat without moving the pointer, it would keep the menu on top of the initial message, despite the cursor pointing at a different message after the scroll. - Now when the three-dot menu is clicked, the shortcuts menu disappears - When you point on emojis, the menu also disappears The new behavior more closely resembles that of Signal.
a218f12
to
7bc81f1
Compare
Why WIP:
...instead of JS. Previously hovering over a different message would
cause the whole message list to re-render.
There are slight behavioral changes:
chat without moving the pointer, it would keep the menu on top
of the initial message, despite the cursor pointing at a different
message after the scroll.
The new behavior more closely resembles that of Signal.