Skip to content

feat: add frontend for locked workspaces #8655

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 16 commits into from
Aug 4, 2023
Prev Previous commit
Next Next commit
fix a stray banner
  • Loading branch information
sreya committed Aug 2, 2023
commit 6873a95da5ae934bd80c4c6adfd93c8923ec3f38
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ export const LockedWorkspaceBanner = ({
)

if (
(!hasLockedWorkspaces ||
// Banners should be redisplayed after dismissal when additional workspaces are newly scheduled for deletion
!shouldRedisplayBanner) &&
// Only show this if the experiment is included.
experimentEnabled
!experimentEnabled ||
!hasLockedWorkspaces ||
// Banners should be redisplayed after dismissal when additional workspaces are newly scheduled for deletion
!shouldRedisplayBanner
) {
return null
}
Expand Down
2 changes: 1 addition & 1 deletion site/src/pages/WorkspacesPage/WorkspacesPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ const WorkspacesPage: FC = () => {
// like locked workspaces don't exist.
setLockedWorkspaces([])
}
}, [experimentEnabled])
}, [experimentEnabled, data, filterProps.filter.query])

Copy link
Collaborator

Choose a reason for hiding this comment

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

This logic feels very similar to the useWorkspacesToBeLocked, why not use it here as well?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The useWorkspacesToBeLocked takes a template which the workspaces page doesn't mandate. I could refactor it, but I'd rather merge this as-is and go back and clean up things as we move it out of experimental.

const updateWorkspace = useWorkspaceUpdate(queryKey)

Expand Down