-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Allow renaming project #18630
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 project #18630
Conversation
d447efd
to
ede45e5
Compare
Looking at UX changes now! 👀 |
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.
Flawless. 💯
It's nice to see how easy we can reuse existing patterns like this one. 😃
Looks shippable!
<TextInputField | ||
hint="The name can be up to 32 characters long." | ||
value={projectName} | ||
error={badProjectName} |
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.
praise: Thanks for adding the validation here! 🐈
<Heading2>Project Name</Heading2> | ||
<form onSubmit={updateProjectName}> | ||
<TextInputField | ||
hint="The name can be up to 32 characters long." |
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.
nitpick: Help text look useful, but is needed here all the time? Since we catch this with the validation anyway, thoughts on dropping the help text all together?
@@ -34,10 +38,30 @@ export default function ProjectSettingsView() { | |||
const { setProject } = useContext(ProjectContext); | |||
const { project } = useCurrentProject(); | |||
const [showRemoveModal, setShowRemoveModal] = useState(false); | |||
const [projectName, setProjectName] = useState(project?.name || ""); | |||
let badProjectName = projectName.length > 0 ? undefined : "Project name can not be blank."; | |||
if (projectName.length > 32) { |
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.
Should not we have it rather on server that it is aligned among all clients? Is it enforced by DB?
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 did not try, code wise looks good. Not sure about 32 limit, it is 255 in DB, and we don't enforce it server-sider.
remove project#slug
ede45e5
to
e946fc3
Compare
Description
Allows to rename a project in the prject settings.
Removes the obsolete
Project#slug
propertySummary generated by Copilot
🤖 Generated by Copilot at 94c9882
This pull request removes the
slug
field from the project and team objects and protocols, and replaces it with thename
field as the primary identifier. This simplifies the project and team models and avoids potential conflicts or inconsistencies with theslug
field. It also adds a feature to the dashboard that allows users to change the project name. It affects several files in the components directory, including TypeScript, Go, and proto files.Related Issue(s)
Fixes EXP-529
How to test
Documentation
Preview status
Gitpod was successfully deployed to your preview environment.
Build Options
Build
Run the build with werft instead of GHA
Run Leeway with
--dont-test
Publish
Installer
Add desired feature flags to the end of the line above, space separated
Preview Environment / Integration Tests
If enabled this will build
install/preview
If enabled this will create the environment on GCE infra
Valid options are
all
,workspace
,webapp
,ide
,jetbrains
,vscode
,ssh
. If enabled,with-preview
andwith-large-vm
will be enabled./hold