-
Notifications
You must be signed in to change notification settings - Fork 30
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: disable top input when no access #87
fix: disable top input when no access #87
Conversation
Signed-off-by: Lin Wang <[email protected]>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #87 +/- ##
==========================================
+ Coverage 93.26% 93.27% +0.01%
==========================================
Files 46 46
Lines 1218 1220 +2
Branches 291 292 +1
==========================================
+ Hits 1136 1138 +2
Misses 80 80
Partials 2 2 ☔ View full report in Codecov by Sentry. |
@@ -179,6 +182,7 @@ export const HeaderChatButton = (props: HeaderChatButtonProps) => { | |||
)} | |||
</span> | |||
} | |||
disabled={!props.userHasAccess} |
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.
Have you tested if the click handler on line 161 is also disabled?
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 only disable the chat input in this PR. Do we need to disable the dashboard assistant icon? I think the icon still can be clicked before the chat input added.
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.
Then user can still click the icon to display the flyout, that also makes sense to me.
Description
Disable top input when user no access
Before:

After:

Issues Resolved
[List any issues this PR will resolve]
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.