-
Notifications
You must be signed in to change notification settings - Fork 39
feat(sdk): remove name from project create #1314
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
base: main
Are you sure you want to change the base?
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
| ); | ||
| const slug = slugify(data.title, { lower: true, strict: true }); | ||
| const suffix = generateHashFromString(organization.id); | ||
| const name = `${slug}-${suffix}`; |
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 think we should name the var slug instead of name.
Pull Request Test Coverage Report for Build 19925604353Details
💛 - Coveralls |
| if (error instanceof ConnectError && error.code === Code.AlreadyExists) { | ||
| setError('title', { | ||
| message: | ||
| 'A project with a similar title already exist. Please tweak the title and try again.' |
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.
similar vs same?
I think same should be the copy. A Project with the same title already exists. or A Project with the title already exists. Thoughts?
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.
The slug is in lower case.
So Title and title will create same slug
Summary
This PR removes the name field from the project creation form.
Changes
The name will be auto-generated from the title, and a hash from the org ID will be added as a suffix.
Due to this.
Technical Details
We are using the
djb2hashing algorithm to generate a hash from the string.The error capture has been moved from
onErrorto catch block TanStack/query#1784Test Plan