-
Notifications
You must be signed in to change notification settings - Fork 91
fix: improve emoji actions and other chat popups #19362
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
Conversation
| function onEmojiSelected(emojiText: string, atCursor: bool) { | ||
| let emoji = StatusQUtils.Emoji.deparse(emojiText) | ||
| popup.contentItem.accountNameInput.input.asset.emoji = emoji | ||
| popup.contentItem.accountNameInput.input.asset.emoji = emojiText |
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.
Fixes changing a wallet account emoji
| spacing: Theme.padding | ||
|
|
||
| StatusBaseText { | ||
| Layout.preferredWidth: parent.width - betaTag.width - parent.spacing |
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.
betaTag no longer exists
| return qsTr("%1 reacted with %2") | ||
| .arg(author) | ||
| .arg(StatusQUtils.Emoji.fromCodePoint(emoji)); | ||
| const author = Qt.locale(Qt.uiLanguage).createSeparatedList(listOfUsers) // "a, b, c and d" |
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.
https://doc.qt.io/qt-6/qlocale.html#createSeparatedList can do a much better job than the custom JS code clutch :)
| readOnly: true | ||
| selectByMouse: true | ||
| selectByMouse: true // applies to mouse only, not touch | ||
| enabled: !Utils.isMobile // eats the touch events, thus breaking the context menu since this is an edit (albeit readonly) |
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.
Visually this is identical but has to be done because we abuse an edit control to display a piece of text
| readonly property var format: { | ||
| "png": "png", | ||
| "svg": "svg" | ||
| } |
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.
Unused; we support and ship SVG only anyway
| signal hoverChanged(bool hovered) | ||
| signal toggleReaction(string hexcode) | ||
|
|
||
| property bool isCurrentUser |
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.
Unused
Jenkins BuildsClick to see older builds (83)
|
jrainville
left a comment
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.
Code looks good 👍
| } | ||
| } | ||
|
|
||
| // TODO remove me completely? literally the same as MessageContextMenuView, and overlaps the message 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.
I personally like it on Desktop, it's faster to reply for example (one less click 😄 )
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.
True but with one line messages, the hover actions always cover half of the text
b8593e8 to
0854840
Compare
0854840 to
0eaf680
Compare
- StatusMessageEmojiReactions: update according to the latest Figma designs, simplify the `showReactionAuthors()` function - StatusMessage: disable the hover quick actions on mobile; the context menu works much better and has the same actions (including the emoji quick reactions) - StatusTextMessage: make it `enabled: false` in order to support the long-press context menu on mobile - MessageView: streamline context menus opening that works with both mouse and touch - WalletAccountHeader: support fallback account icons (non-emojis) - RenameAccountModal: fix changing the emoji of an existing wallet account - removed some unused properties - update and fixed the relevant SB pages - do no use hardcoded margins/paddings - fix some QML warnings Fixes #19328 Fixes #19327 Iterates: #19199
9ed333c to
565b74f
Compare
- use StatusTextArea for StatusTextMessage; need this for the context menu on mobile - rework the context menu to ContextMenu + pressAndHold handler (the only combo that works on mobile) - use edge-to-edge separators in the profile context menu
565b74f to
f2a0cac
Compare
What does the PR do
showReactionAuthors()functionenabled: falsein order to support the long-press context menu on mobileFixes #19328
Fixes #19327
Iterates: #19199
BACKPORT_TO: 2.36
Affected areas
Messaging, Account edit
Architecture compliance
My PR is consistent with this document: QML Architecture Guidelines
Screencapture of the functionality
Emoji reactions:
Mobile screens TBD
Impact on end user
More consistent emojis behavior, improved esp. on mobile
How to test
Risk