-
Notifications
You must be signed in to change notification settings - Fork 76
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
fix(chat input): should be disabled if user is not able to post #13825
fix(chat input): should be disabled if user is not able to post #13825
Conversation
Jenkins BuildsClick to see older builds (18)
|
@@ -1246,7 +1246,7 @@ Rectangle { | |||
padding: 0 | |||
// This is needed to make sure the text area is disabled when the input is disabled | |||
Binding on enabled { | |||
value: root.enabled | |||
value: control.enabled |
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 top element is called control
here, not root
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 tested this branch because I needed to also modify something relative to the blocked chat input and while testing I found a bug. As soon as a channel has a permission, you can no longer post on it. In this case, I am a TM and the field says that all is good, but I can click on the input an write
input.webm
FYI, I opened a PR that adds a new disabled message for when a permission is pending. A dumb way to fix the issue for now would be to disable the input when the placeholder text is not |
484bd7a
to
a91f577
Compare
c2e7fb4
to
1006085
Compare
- extend `isUserAllowedToSendMessage` to also cover `Constants.chatType.communityChat` - let `admin` always satisfy the permissions - hide the add emoji/reaction button instead of disabling it when the permissions are not met - adjust the error msg to better reflect the reality (tokens vs. permissions) Fixes #13777
1006085
to
ff3b36f
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.
Code looks good. I'll test 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.
Works fine!
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.
LGTM!
What does the PR do
isUserAllowedToSendMessage
to also coverConstants.chatType.communityChat
admin
always satisfy the permissionsFixes #13777
Affected areas
StatusChatInput,ChatColumnView
Screenshot of functionality (including design for comparison)
Zaznam.obrazovky.z.2024-03-04.11-17-37.webm