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

Allow Renaming Teams #15754

Merged
merged 4 commits into from
Jan 16, 2023
Merged

Allow Renaming Teams #15754

merged 4 commits into from
Jan 16, 2023

Conversation

svenefftinge
Copy link
Member

Allow updating the team's name

fixes #5067

How to test

rename team name

Release Notes

Allow renaming teams

Documentation

Werft options:

  • /werft with-local-preview
    If enabled this will build install/preview
  • /werft with-preview
  • /werft with-large-vm
  • /werft with-integration-tests=all
    Valid options are all, workspace, webapp, ide, jetbrains, vscode, ssh

@svenefftinge svenefftinge requested a review from a team January 16, 2023 13:34
@werft-gitpod-dev-com
Copy link

started the job as gitpod-build-se-team-rename-ui.1 because the annotations in the pull request description changed
(with .werft/ from main)

@github-actions github-actions bot added the team: webapp Issue belongs to the WebApp team label Jan 16, 2023
@svenefftinge svenefftinge force-pushed the se/team-rename-ui branch 2 times, most recently from 0baed74 to e9fba89 Compare January 16, 2023 14:18
@svenefftinge svenefftinge requested a review from gtsiolis January 16, 2023 14:20
@svenefftinge svenefftinge changed the title Se/team-rename-ui Allow Renaming Teams Jan 16, 2023
@gtsiolis
Copy link
Contributor

Looking at this now! 👀

Copy link
Member

@easyCZ easyCZ left a comment

Choose a reason for hiding this comment

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

LGTM % modulo better signature for the update funcation

/hold

components/server/src/workspace/gitpod-server-impl.ts Outdated Show resolved Hide resolved
Copy link
Contributor

@gtsiolis gtsiolis left a comment

Choose a reason for hiding this comment

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

Thanks for making this change, @svenefftinge! 🍷

UX LGTM!

Left a few non-blocking comments that can be moved to follow-up issues.

components/dashboard/src/teams/TeamSettings.tsx Outdated Show resolved Hide resolved
const newName = event.target.value || "";
setTeamName(newName);
if (newName.trim().length === 0) {
setErrorMessage("Team name must not be empty.");
Copy link
Contributor

Choose a reason for hiding this comment

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

praise: +1 for disabling the update button when users clear this input!

components/dashboard/src/teams/TeamSettings.tsx Outdated Show resolved Hide resolved
components/dashboard/src/teams/TeamSettings.tsx Outdated Show resolved Hide resolved
components/dashboard/src/teams/TeamSettings.tsx Outdated Show resolved Hide resolved
components/dashboard/src/teams/TeamSettings.tsx Outdated Show resolved Hide resolved
components/dashboard/src/teams/TeamSettings.tsx Outdated Show resolved Hide resolved
components/dashboard/src/teams/TeamSettings.tsx Outdated Show resolved Hide resolved
components/dashboard/src/teams/TeamSettings.tsx Outdated Show resolved Hide resolved
@easyCZ
Copy link
Member

easyCZ commented Jan 16, 2023

Should this be dependant on #15749? What's the relationship to that PR? They seem to share the changes

@svenefftinge
Copy link
Member Author

Should this be dependant on #15749? What's the relationship to that PR? They seem to share the changes

I based the UI work on that branch. I can merge just this one as well.

@svenefftinge
Copy link
Member Author

/unhold

<div className="flex flex-row">
<button
className="primary"
disabled={team?.name === teamName || !!errorMessage}
Copy link
Member

Choose a reason for hiding this comment

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

nit: currently, the user is able to change the team name to the same name just with whitespaces around it.

Suggested change
disabled={team?.name === teamName || !!errorMessage}
disabled={team?.name === teamName.trim() || !!errorMessage}

@roboquat roboquat merged commit 8e1ff5d into main Jan 16, 2023
@roboquat roboquat deleted the se/team-rename-ui branch January 16, 2023 17:41
@roboquat roboquat added deployed: webapp Meta team change is running in production deployed Change is completely running in production labels Jan 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deployed: webapp Meta team change is running in production deployed Change is completely running in production release-note size/L team: webapp Issue belongs to the WebApp team
Projects
Status: In Validation
Development

Successfully merging this pull request may close these issues.

Allow users to rename teams
5 participants