-
-
Notifications
You must be signed in to change notification settings - Fork 450
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
Formalize zero-width emote implementation #4314
Formalize zero-width emote implementation #4314
Conversation
clang-tidy review says "All clean, LGTM! 👍" |
clang-tidy review says "All clean, LGTM! 👍" |
Should be fixed now in 62edb0c |
clang-tidy review says "All clean, LGTM! 👍" |
1 similar comment
clang-tidy review says "All clean, LGTM! 👍" |
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.
very nice feature, gonna see how it runs for few days 👍
Issue is resolved, there's a slight miscentering when there's exactly 2 zero-width emotes, but I'd take that over the huge tool-tips any day 👍 |
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 believe this works as expected 👍 - I actually feel like I've seen less zero-width emotes since I started using this PR, but it's much more likely less are being used than something being broken.
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've taken a bit of a glance at the code, overall looks fine - mostly nitpicks in my review.
Thank you for looking into this, this feels like an overall better & more consistent approach!
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.
clang-tidy made some suggestions
There were too many comments to post at once. Showing the first 25 out of 53. Check the log or trigger a new build to see more.
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.
@dnsge If you could take a last look at your own code & the changes I've made before I merge this in that would be great - seems to work as expected for me with tooltips & everything on both X11 & Sway
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.
clang-tidy made some suggestions
There were too many comments to post at once. Showing the first 25 out of 35. Check the log or trigger a new build to see more.
@pajlada I just went through your changes and over the full PR again, everything looks good to me! |
Pull request checklist:
CHANGELOG.md
was updated, if applicableDescription
This PR attempts to fix the notion of a zero-width emote by introducing layered emotes: when one (or more) zero-width emotes follow a regular emote, the emotes are all gathered into a single
LayeredEmoteElement
which handles layered rendering through theLayeredImageLayoutElement
and provides useful tooltips.The
TooltipWidget
now has two "styles": a vertical layout, and a grid layout. If there are more than 2 emotes being shown at once in the tooltip, it will use the grid layout. Otherwise, the vertical layout will be used.Images of changes
(margins and spacing are slightly out of date as of 62edb0c)Single zero-width emote:
Multiple zero-width emotes:
Excessive number of zero-width emotes:
Context menu with zero-width emotes:
Also adds a "Enable zero-width emotes" setting (default: true). If off, zero-width emotes are shown as regular emotes.
Fixes #3615
Fixes #2994