-
Notifications
You must be signed in to change notification settings - Fork 166
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 the UI user flow of selecting custom teanant on tenant switch panel #1112
Conversation
29e5233
to
79a3020
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1112 +/- ##
==========================================
+ Coverage 74.39% 74.43% +0.04%
==========================================
Files 86 86
Lines 1871 1874 +3
Branches 241 244 +3
==========================================
+ Hits 1392 1395 +3
Misses 424 424
Partials 55 55 ☔ View full report in Codecov by Sentry. |
Hi @shanilpa, thank you for the instruction: #819 (comment). The fix has been implemented. |
79a3020
to
04c1fd9
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.
Looks fine to me, might need some work to get the CI working
f1a9d30
to
563cef0
Compare
Hi @peternied, thanks for the review. I just fixed the tests. |
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.
Thanks @RyanL1997 !
@@ -297,8 +298,18 @@ export function TenantSwitchPanel(props: TenantSwitchPanelProps) { | |||
|
|||
<EuiButton | |||
data-test-subj="confirm" | |||
fill | |||
disabled={!isMultiTenancyEnabled} | |||
fill={ |
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 we move the logic into a local variable it is not duplicated it on both lines?
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.
Thanks for the review! I just made an update on this.
f68680d
to
9565e3d
Compare
@@ -297,8 +301,8 @@ export function TenantSwitchPanel(props: TenantSwitchPanelProps) { | |||
|
|||
<EuiButton | |||
data-test-subj="confirm" | |||
fill | |||
disabled={!isMultiTenancyEnabled} | |||
fill={isMultiTenancyEnabled && !invalidCustomTenant} |
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 see we've now added a condition on fill
here. I just want to confirm if this is intended behavior.
fill
is related to whether the bg of the button is filled in or transparent. See https://eui.elastic.co/pr_3350/#/navigation/button
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.
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.
@RyanL1997 that's correct. We're looking to reduce some of the visual clutter by making use of the ghosted disabled state. Thanks for the review @cwperks.
@RyanL1997 Looks like this branch needs to be re-based, please re-base with the latest changes in main. Should this change be backported to 2.x? |
Signed-off-by: Ryan Liang <[email protected]>
@cwperks Thanks! I just re-pushed with the rebased repo. Yeah, I think we do need to add the 2.x backporting label. |
…el (#1112) Signed-off-by: Ryan Liang <[email protected]> Signed-off-by: Ryan Liang <[email protected]> (cherry picked from commit 3bfd7c5)
…el (#1112) (#1117) Signed-off-by: Ryan Liang <[email protected]> Signed-off-by: Ryan Liang <[email protected]> (cherry picked from commit 3bfd7c5) Co-authored-by: Ryan Liang <[email protected]>
Signed-off-by: Ryan Liang [email protected]
Description
Category
Bug fix
Issues Resolved
Testing
Check List
New functionality has been documentedBy 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.