-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Display alert in "No seats" scenario #11768
Conversation
/werft run 👍 started the job as gitpod-build-gpl-9972-no-seats.2 With preview this time |
a5a28a7
to
b773e5d
Compare
/hold Until the TEST COMMIT is removed |
@AlexTugarev Could you verify if the approach I took here is legit? @gtsiolis Was the switch to |
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, thanks for looking into this! :)
@@ -78,7 +85,8 @@ export class UserServiceEE extends UserService { | |||
|
|||
// 1. check the license | |||
const userCount = await this.userDb.getUserCount(true); | |||
if (!this.licenseEvaluator.hasEnoughSeats(userCount)) { | |||
if (userCount > -1) { | |||
//!this.licenseEvaluator.hasEnoughSeats(userCount)) { | |||
const msg = `Maximum number of users permitted by the license exceeded`; |
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'd word this slightly more specifically:
const msg = `Maximum number of users permitted by the license exceeded`; | |
const msg = `Unable to log in. The license used for this installation does not have enough seats. Please contact your administrator to increase the number of seats for your license.`; |
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 copy suggestion, @lucasvaltl!
Some thoughts on the suggested copy:
Unable to log in.
Quite clear to read. But maybe we could surface the error instead?
The license used for this installation does not have enough seats.
Do we need to surface the license limits to the users? I'd expect us in the future to be a bit cautious about the error messages here to avoid exposing any relevant information.
Please contact your administrator to increase the number of seats for your license.
While surfacing a call-to-action (CTA) to users sounds good, I'd avoid vague actions like this which are usually not helpful, and sometimes it's not possible to perform in some large organizations.
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.
suggestion: Also, it'd be great if we could surface this CTA to request a new license for the admins when browsing the dashboard.
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.
Nice one, @geropl! ✨
Left one comment about the style of the alert and another one about the copy used there.
Regarding the question in #11768 (comment): Yes, the alert component is exactly what I had in mind for this case. 🏀
Approving from UX perspective. ✔️
Approving as this also needs a review from @gitpod-io/engineering-webapp
. 🏓
@@ -78,7 +85,8 @@ export class UserServiceEE extends UserService { | |||
|
|||
// 1. check the license | |||
const userCount = await this.userDb.getUserCount(true); | |||
if (!this.licenseEvaluator.hasEnoughSeats(userCount)) { | |||
if (userCount > -1) { | |||
//!this.licenseEvaluator.hasEnoughSeats(userCount)) { | |||
const msg = `Maximum number of users permitted by the license exceeded`; |
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 copy suggestion, @lucasvaltl!
Some thoughts on the suggested copy:
Unable to log in.
Quite clear to read. But maybe we could surface the error instead?
The license used for this installation does not have enough seats.
Do we need to surface the license limits to the users? I'd expect us in the future to be a bit cautious about the error messages here to avoid exposing any relevant information.
Please contact your administrator to increase the number of seats for your license.
While surfacing a call-to-action (CTA) to users sounds good, I'd avoid vague actions like this which are usually not helpful, and sometimes it's not possible to perform in some large organizations.
@@ -78,7 +85,8 @@ export class UserServiceEE extends UserService { | |||
|
|||
// 1. check the license | |||
const userCount = await this.userDb.getUserCount(true); | |||
if (!this.licenseEvaluator.hasEnoughSeats(userCount)) { | |||
if (userCount > -1) { | |||
//!this.licenseEvaluator.hasEnoughSeats(userCount)) { | |||
const msg = `Maximum number of users permitted by the license exceeded`; |
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.
suggestion: Adding one more alternative copy with a different copy structure, but we can work on improving the error messages in a later iteration. Cc @lucasvaltl
BEFORE | AFTER |
---|---|
![]() |
![]() |
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'm ok with this in general, but the terminology "instance user cap" seems off to me. We don't use it anywhere else, we usually talk about seats or just users. I'd suggest we go with "Maximum number of users reached. We could not sign you in because this instance has reached the maximum number of allowed users."
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.
Good point, @lucasvaltl ! Agree, let's go with your updated suggestion:
Maximum number of users reached. We could not sign you in because this instance has reached the maximum number of allowed users."
Cc @geropl
Co-authored-by: George Tsiolis <tsiolis.g@gmail.com>
@@ -423,7 +423,7 @@ export class GenericAuthProvider implements AuthProvider { | |||
|
|||
let message = "Authorization failed. Please try again."; | |||
if (AuthException.is(err)) { | |||
message = `Login was interrupted: ${err.message}`; | |||
return this.sendCompletionRedirectWithError(response, { error: err.message }); |
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!
I wonder why that's not done always in L.441. 🤔
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.
/unhold |
@lucasvaltl @gtsiolis I'd like to defer the wording discussion, also because I think @jldec would want to review that is will (he's ooo this week). 👍 |
That's fine with me - feel free to pick something and then we can iterate on it later on :) |
Sounds good! Opened a follow-up issue for the wording in #11791. Cc @lucasvaltl @geropl |
Description
Related Issue(s)
Fixes #9972
How to test
Note: the "feedback" panel is only shown on gitpod.io.
Release Notes
Documentation
Werft options: