Skip to content

feat(coderd): add ability to mark workspaces as favorite #11673

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

Closed
wants to merge 27 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
46ca00d
feat(coderd): add user_pinned_workspaces table
johnstcn Jan 16, 2024
015aabb
add unique index
johnstcn Jan 17, 2024
0b0dce6
rename migration
johnstcn Jan 17, 2024
9878da7
add queries to pin/unpin workspace
johnstcn Jan 17, 2024
4fba238
add pinned status to GetWorkspaces/GetAuthorizedWorkspaces queries
johnstcn Jan 17, 2024
83b03d9
add API endpoints and test (currently fails)
johnstcn Jan 18, 2024
0961298
rename to favorite workspace
johnstcn Jan 18, 2024
a814b65
move to top-level test
johnstcn Jan 22, 2024
89d618d
s/favored/favorite/g
johnstcn Jan 22, 2024
7238b95
move favorite status to workspaces table to avoid sqlc join sadness
johnstcn Jan 22, 2024
4eef59a
more wiring
johnstcn Jan 22, 2024
0f8904d
improve test to include sort order of favorites
johnstcn Jan 22, 2024
d921aa0
fix swagger summary
johnstcn Jan 22, 2024
b68c18e
make gen
johnstcn Jan 22, 2024
3d0545a
use dbfake for testing sort order
johnstcn Jan 22, 2024
46103a4
reduce scope of TestWorkspaceFavoriteUnfavorite to not include sortin…
johnstcn Jan 22, 2024
f6c0361
beef up sort order test
johnstcn Jan 22, 2024
89f0f50
rm unnecessary fixture
johnstcn Jan 22, 2024
c9ed43c
fix sort ordering, dbfake still TODO
johnstcn Jan 22, 2024
ff3cde2
remove unnecessary change to CreateFirstUser
johnstcn Jan 23, 2024
f735b69
best-effort fix but testing dbmem sort order is a waste of time
johnstcn Jan 23, 2024
f6e9531
requestor->requester
johnstcn Jan 23, 2024
34f2902
fixup! remove unnecessary change to CreateFirstUser
johnstcn Jan 23, 2024
99c7f96
remove unused resource
johnstcn Jan 23, 2024
d530546
fix sort ordering bug in dmem
johnstcn Jan 23, 2024
6392db9
add test case
johnstcn Jan 23, 2024
9979c53
remove need for conditional ordering
johnstcn Jan 23, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
feat(coderd): add user_pinned_workspaces table
  • Loading branch information
johnstcn committed Jan 23, 2024
commit 46ca00df317e9400d785642ff781d21ac6deb37c
5 changes: 5 additions & 0 deletions coderd/database/dump.sql

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
DROP TABLE user_pinned_workspaces;
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
CREATE TABLE user_pinned_workspaces (
user_id uuid NOT NULL,
workspace_id uuid NOT NULL
);
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
INSERT INTO user_pinned_workspaces
(user_id, workspace_id)
VALUES (
'30095c71-380b-457a-8995-97b8ee6e5307',
'3a9a1feb-e89d-457c-9d53-ac751b198ebe'
);

INSERT INTO user_pinned_workspaces
(user_id, workspace_id)
VALUES (
'0ed9befc-4911-4ccf-a8e2-559bf72daa94',
'b90547be-8870-4d68-8184-e8b2242b7c01'
);
5 changes: 5 additions & 0 deletions coderd/database/models.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.