-
-
Notifications
You must be signed in to change notification settings - Fork 474
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
Added support for Twitch's Chat Replies #3722
Conversation
From 30mins testing:
Overall looks good, but I think it would be better to remove icons/settings altogether from initial implementation in this PR. Context menu link to initiate reply and whole "Replying to |
There is no limit to usercards, search windows. I don't see why this should have a limit.
Why? IRC doesn't care about this. Webchat does, but webchat isn't the one-and-only chat experience. |
This was actually a bug that I did not notice... The HBox that contains the "Replying to" label was still taking up space while its children were not visible. I've now fixed that problem so the message input box looks the same as master when not replying. |
This is the patch required to fix the tab/autocomplete focus lose issue: diff --git a/src/widgets/helper/ChannelView.cpp b/src/widgets/helper/ChannelView.cpp
index 0b3459b3..09696c5b 100644
--- a/src/widgets/helper/ChannelView.cpp
+++ b/src/widgets/helper/ChannelView.cpp
@@ -163,7 +163,7 @@ ChannelView::ChannelView(BaseWidget *parent, Split *split, Context context)
// and tabbing to it from another widget. I don't currently know
// of any place where you can, or where it would make sense,
// to tab to a ChannelVieChannelView
- this->setFocusPolicy(Qt::FocusPolicy::StrongFocus);
+ this->setFocusPolicy(Qt::FocusPolicy::ClickFocus);
}
void ChannelView::initializeLayout() I touched this place very recently and felt like something was wrong in the Focus Policy that was set for ChannelView. Would need to be tested a bit extra most likely but worked as expected for me on Arch Linux btw |
Tab focus issue is resolved with the |
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.
Awesome work!
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.
This isn't actually a visual bug but an intentional change. When close-on focus loss is true, we use a frameless window. On non-linux platforms, we won't have any area to drag the popup around because the ChannelView and SplitInput take up the entire popup window. So instead, we introduce a margin to allow the user to drag the popup around. We could guard this behavior in a macro because we don't do frameless windows on linux: But like you said, we can do this at a later time. With the amount of code that was touched in this change, I'm sure we'll find more issues to fix once this change is on nightly. |
if (hasLocalizedName) | ||
{ | ||
usernameText = localizedName; | ||
} | ||
else | ||
{ | ||
usernameText = username; | ||
} | ||
} | ||
break; | ||
|
||
default: | ||
case UsernameDisplayMode::UsernameAndLocalizedName: { | ||
if (hasLocalizedName) | ||
{ | ||
usernameText = username + "(" + localizedName + ")"; | ||
} | ||
else | ||
{ | ||
usernameText = username; | ||
} |
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.
Can be simplified with a ternary operator.
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.
- The code is just copy-pasted from another function since it needed to be reused, so not super in scope of this PR to fix it
- I would argue that using ternary operators here wouldn't necessarily make the code more readable
@@ -109,6 +137,7 @@ private slots: | |||
void editTextChanged(); | |||
|
|||
friend class Split; | |||
friend class ReplyThreadPopup; |
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.
Is it needed 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.
This is necessary for ReplyThreadPopup
to be able to call giveFocus
on the SplitInput
thanks for caring about me at all |
Description
Adds message reply thread support (https://help.twitch.tv/s/article/chat-basics?language=en_US#replies)
TwitchChannel
s/reply <username> <message>
command sends a reply to the given user's most recent messageDesign choices:
The reply button
I initially tried only rendering the reply button when hovering a message, but the message rendering pipeline makes this pretty much impossible. The tiny reply button was the best compromise to having an accessible but not too intrusive option.
The reply buttons are not visible by default but can be enabled in settings if a user wants a single-click way to reply to a message.
Screenshots
Expand
Reply to message option:

Inline message replying

Message with reply:

Message thread dialog:


Reply buttons enabled:

Pull request checklist:
CHANGELOG.md
was updated, if applicable