Skip to content

feat: create experimental CreateWorkspacePage and dynamic-parameters experiment #17240

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 4 commits into from
Apr 3, 2025

Conversation

jaaydenh
Copy link
Contributor

@jaaydenh jaaydenh commented Apr 3, 2025

The purpose of the PR is to make a copy of the CreateWorkspacePage and create an experimental version that will use when the dynamic-parameters experiment is enabled.

The Figma designs for this page are still in progress but this first PR will start to move to the new designs.

Figma design: https://www.figma.com/design/SMg6H8VKXnPSkE6h9KPoAD/UX-Presets?node-id=2121-2383&t=CtgPUz8eNsTI5b1t-1

Much of the existing code will be left behind and will slowly migrated over the course of several PRs to make sure no existing functionality is forgotten in the migration to dynamic paramaters.

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces an experimental workspace creation page and enables a dynamic-parameters experiment mode. Key changes include:

  • Routing update in site/src/router.tsx to use an experimental router component.
  • Creation of a new experimental workspace page (CreateWorkspacePageExperimental) with enhanced dynamic parameter and auto-create logic.
  • Updates to experiment flags and documentation across API, deployment, and apidoc files.

Reviewed Changes

Copilot reviewed 8 out of 9 changed files in this pull request and generated no comments.

Show a summary per file
File Description
site/src/router.tsx Updates the route to reference the experimental workspace creation router.
site/src/pages/CreateWorkspacePage/CreateWorkspacePageExperimental.tsx Adds a new experimental workspace creation flow with dynamic parameters and auto-creation logic.
site/src/pages/CreateWorkspacePage/CreateWorkspaceExperimentRouter.tsx Routes to the experimental or standard workspace page based on the dynamic-parameters flag.
site/src/api/typesGenerated.ts Registers the new "dynamic-parameters" experiment.
docs/reference/api/schemas.md Documents the new "dynamic-parameters" experiment.
codersdk/deployment.go Introduces the dynamic parameters experiment flag in deployment settings.
coderd/apidoc/docs.go Updates API documentation to include the dynamic parameters experiment.
Files not reviewed (1)
  • coderd/apidoc/swagger.json: Language not supported
Comments suppressed due to low confidence (2)

site/src/pages/CreateWorkspacePage/CreateWorkspaceExperimentRouter.tsx:3

  • [nitpick] Consider aligning naming conventions between CreateWorkspacePageExperimental and CreateWorkspaceExperimentRouter for consistency, such as using 'Experimental' in both component names.
import CreateWorkspacePage from "./CreateWorkspacePage";

site/src/pages/CreateWorkspacePage/CreateWorkspacePageExperimental.tsx:122

  • Consider adding tests to cover the automatic workspace creation logic and dynamic parameter processing to ensure correct behavior under various scenarios.
const automateWorkspaceCreation = useEffectEvent(async () => {

@jaaydenh jaaydenh requested a review from aslilac April 3, 2025 11:01
Copy link
Member

@aslilac aslilac left a comment

Choose a reason for hiding this comment

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

looks good!

@jaaydenh jaaydenh merged commit 54ff17b into main Apr 3, 2025
41 checks passed
@jaaydenh jaaydenh deleted the jaaydenh/dynamic-params-experiment branch April 3, 2025 20:39
@github-actions github-actions bot locked and limited conversation to collaborators Apr 3, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants