Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat: handle update build for dynamic params#18226

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
jaaydenh merged 16 commits intomainfromjaaydenh/update-build-parameters
Jun 5, 2025

Conversation

jaaydenh
Copy link
Contributor

@jaaydenhjaaydenh self-assigned thisJun 4, 2025
@jaaydenhjaaydenh requested a review fromCopilotJune 4, 2025 22:57
Copy link
Contributor

@CopilotCopilotAI 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

Adds support for dynamic parameters during workspace build updates by wiring a feature flag through the UI, hooks, and API layers.

  • IntroduceisDynamicParametersEnabled flag in batch actions, update dialogs, and mutation calls
  • Provide an opt-out hook (useDynamicParametersOptOut) and branch between classic/experimental parameter flows in multiple components
  • Extend API methods to fetch and apply “dynamic parameters” when the feature is enabled

Reviewed Changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 2 comments.

Show a summary per file
FileDescription
site/src/modules/workspaces/WorkspaceUpdateDialogs.tsxWire dynamic-params feature flag into update workspace mutation and dialogs
site/src/hooks/useDynamicParametersOptOut.tsNew hook to read opt-out state from localStorage
site/src/api/api.tsAddgetDynamicParameters and branch inupdateWorkspace/changeWorkspaceVersion for dynamic vs. rich parameters
site/src/api/queries/workspaces.tsPassisDynamicParametersEnabled throughchangeVersion andupdateWorkspace query definitions
site/src/pages/**Pass feature flag andtemplateVersionId through workspace pages and dialogs, refactor various routers
site/src/components/Dialog/Dialog.tsxExpose additional exports and update spacing/typography in dialog primitives
Comments suppressed due to low confidence (2)

site/src/modules/workspaces/WorkspaceUpdateDialogs.tsx:60

  • [nitpick] The boolean flag is nameddynamicParametersEnabled here butisDynamicParametersEnabled elsewhere; consider standardizing on theis* prefix for consistency.
const dynamicParametersEnabled = experiments.includes("dynamic-parameters");

site/src/hooks/useDynamicParametersOptOut.ts:1

  • New feature logic in this hook isn’t covered by tests; consider adding unit tests for the opt-out default behavior and localStorage reads.
import { useQuery } from "react-query";

jaaydenhand others added10 commitsJune 4, 2025 22:59
The updateWorkspace function now requires additional parameters:- buildParameters (array, defaults to [])- isDynamicParametersEnabled (boolean, defaults to false)Updated all test calls to include these parameters to fix test failures.
When the dynamic-parameters experiment is not enabled, the parameterdialogs were showing a loader indefinitely instead of the classicparameter dialog. This was causing e2e tests to fail because theycouldn't find the parameter fields.Fixed by:- Only showing loader when experiment is enabled AND optOut data is loading- Using classic dialog when experiment is disabled OR user opted out- This ensures e2e tests work correctly without the experiment flag
@jaaydenhjaaydenh marked this pull request as ready for reviewJune 5, 2025 17:25
@jaaydenhjaaydenh requested a review fromEmyrkJune 5, 2025 17:26
@jaaydenhjaaydenh merged commit508fba8 intomainJun 5, 2025
33 checks passed
@jaaydenhjaaydenh deleted the jaaydenh/update-build-parameters branchJune 5, 2025 20:35
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsJun 5, 2025
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

Copilot code reviewCopilotCopilot left review comments

@EmyrkEmyrkEmyrk approved these changes

Assignees

@jaaydenhjaaydenh

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Update BuildParametersDialog to use DynamicParameters
2 participants
@jaaydenh@Emyrk

[8]ページ先頭

©2009-2025 Movatter.jp