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

Dashboard UI for adding users to a team #334

Merged
merged 5 commits into from
Nov 11, 2024
Merged

Dashboard UI for adding users to a team #334

merged 5 commits into from
Nov 11, 2024

Conversation

fomalhautb
Copy link
Contributor

@fomalhautb fomalhautb commented Nov 8, 2024

image

Copy link

vercel bot commented Nov 8, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
stack-backend ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 11, 2024 10:14am
stack-dashboard ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 11, 2024 10:14am
stack-demo ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 11, 2024 10:14am
stack-partial-prerendering ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 11, 2024 10:14am

@fomalhautb fomalhautb requested a review from N2D4 November 8, 2024 15:35
toast({ title: 'User added to team', variant: 'success' });
} catch (error) {
if (error instanceof KnownErrors.TeamMembershipAlreadyExists) {
toast({ title: 'User already a member of this team', variant: 'destructive' });
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO toasts are for things that are not crucial to the user flow (eg. "everything went as planned") — this should be an alert

Copy link
Contributor Author

@fomalhautb fomalhautb Nov 8, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, I think it is better to show an "added" button (see the updated image in the PR description). It will be a bit more annoying when we later paginate the team-member tables as we will need to do it on the server side, but we can worry about that later

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happens if the user was not added successfully because they're already in the team?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah nvm I get what you mean now

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SGTM

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The toast is not necessary though — from a user perspective, "the user has been added" and "the user has already been on the team" is equivalent

Copy link

github-actions bot commented Nov 8, 2024

Copy link

github-actions bot commented Nov 8, 2024

Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants