-
Notifications
You must be signed in to change notification settings - Fork 894
feat: Add template display name (backend) #4966
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
Merged
Merged
Changes from 17 commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
03d8456
Rename to nameValidator
mtojek e3a1b7d
Merge branch 'main' into 3321-template-space-b
mtojek 9c7cae6
Refactor: NameValid
mtojek 5fac8e9
Fix: comment
mtojek 61074d9
Define new migration
mtojek dbd96c0
Include display_name
mtojek bf26ba9
Update typesGenerated.ts
mtojek 9a7d35f
Update meta
mtojek 4aaff3e
Adjust tests
mtojek c3532a1
CLI tests
mtojek fa778d3
Fix: audit
mtojek 64c6fe2
Fix: omitempty
mtojek b2c122b
site: display_name is optional
mtojek 75c79d3
unit: TestUsernameValid
mtojek cfa4ca7
entities.ts: add display_name
mtojek 9eb443e
site: TemplateSettingsPage.test.tsx
mtojek 20018f8
Fix: TemplateSettingsForm.tsx
mtojek 53c463d
Adjust tests
mtojek a24eac4
Add comment to display_name column
mtojek ed56c3b
Merge branch 'main' into 3321-template-space-b
mtojek 7490d45
Fix: rename
mtojek 88c6ddc
Fix: make
mtojek 01dae76
Merge branch 'main' into 3321-template-space-b
mtojek 361a428
Loosen regexp
mtojek d935a41
Fix: err check
mtojek a837fae
Fix: template name length
mtojek d32247d
Merge branch 'main' into 3321-template-space-b
mtojek 2da0147
Allow for whitespaces
mtojek 2301f5c
Merge branch 'main' into 3321-template-space-b
mtojek a3652b2
Update migration number
mtojek File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
1 change: 1 addition & 0 deletions
1
coderd/database/migrations/000072_template_display_name.down.sql
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ALTER TABLE templates DROP COLUMN display_name; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ALTER TABLE templates ADD COLUMN display_name VARCHAR(64) NOT NULL DEFAULT ''; | ||
mafredri marked this conversation as resolved.
Show resolved
Hide resolved
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
What do you think about changing
name
toslug
instead? We could make this naming consistent as well across all objects. This can happen in another PR, just thinking about the API moving forward.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.
That's an interesting idea, let me think loud...
We could define a policy that every database object has a mandatory unique ID, unique slug, and optional display name. Potentially slugs can be used as source data for a global search feature and we won't need to index descriptions, like in OSX cmd+space.
Yup, I can raise an issue and we can continue the discussion there. Otherwise, it will be scattered across different comments :)