Skip to content
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

UI: Improve Error Message for Invalid Team Name Input #178

Closed
jonasbg opened this issue Sep 22, 2023 · 5 comments
Closed

UI: Improve Error Message for Invalid Team Name Input #178

jonasbg opened this issue Sep 22, 2023 · 5 comments
Labels
bug Something isn't working

Comments

@jonasbg
Copy link
Contributor

jonasbg commented Sep 22, 2023

Currently, when a user attempts to input an illegal team name, the system only displays a generic error message: Failed to create / join the team. This error message could be more descriptive and provide specific feedback on what went wrong with the suggested team name.

Here are some rules for valid team names that should be communicated in the error message (these are already available in the tooltip menu):

  • The team name should not contain uppercase letters.
  • The '-' character is not allowed.
  • Special characters are not allowed.

By providing a more detailed error message, we can guide the user to correct their input, thus enhancing the user experience.

@J12934
Copy link
Member

J12934 commented Sep 22, 2023

Mhh that used to work, we have a specifc error message for that which used to be shown if the team name didn't match the regex in the frontend. https://github.com/juice-shop/multi-juicer/blob/main/juice-balancer/ui/src/pages/JoinPage.js#L14

@J12934 J12934 added the bug Something isn't working label Sep 22, 2023
@J12934
Copy link
Member

J12934 commented Sep 23, 2023

This is how it looks for me (after pressing create=

Screenshot 2023-09-23 at 12 04 17

@jonasbg
Copy link
Contributor Author

jonasbg commented Sep 25, 2023

I apologize for the confusion earlier. I had tested this on an older version 5.3.

I've now tested this on the latest version, ghcr.io/juice-shop/multi-juicer/juice-balancer:v7.0.0@sha256:3357a9aeb3f9d98017c14fc2d01589e12fe3d7a2c00ca9e37b18b5b2af45681e and I am getting the same screenshot as you are.

Tested with the following browsers:

  • Firefox 117.0.1 (same result as you)
  • Edge 117.0.2045.31 (same result as you)
  • Safari 16.6 (Safari is unique in its own way)

The safari version is not as elegant as those other browsers, however.
image

Given that Safari tends to behave differently, this issue can be considered resolved from my perspective.

@stuebingerb
Copy link
Contributor

stuebingerb commented Oct 4, 2023

This was fixed with #174 😉

I wonder if it would make sense to align the error message for this and #179, though, to have a consistent UI. But I'll leave this up to @J12934.

@J12934
Copy link
Member

J12934 commented Dec 9, 2023

This was fixed with #174 😉

I wonder if it would make sense to align the error message for this and #179, though, to have a consistent UI. But I'll leave this up to @J12934.

Sorry I overlooked your comment earlier.

To me this is fine right now. I think having a different style for validation and for an actual error which was thrown for a valid input is totally fine.

I'm closing this ticket now. Thank you all for the input and feedback here 🙌

@J12934 J12934 closed this as completed Dec 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants