-
Notifications
You must be signed in to change notification settings - Fork 99
[NU-2197] save and deploy buttons changes #8130
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
Conversation
# Conflicts: # designer/client/src/components/modals/SaveProcessDialog.tsx
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.
Pull Request Overview
This PR implements changes to the save and deploy buttons by updating import paths, refactoring the button interactions to use new preset options, and renaming button labels for consistency with the updated UI.
- Updated the import reference for the save scenario dialog.
- Refactored the DeployButton and SaveButton to use preset options and updated their callback structures.
- Renamed button labels (e.g., "deploy" to "start" and "cancel" to "stop") for clarity.
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.
Show a summary per file
File | Description |
---|---|
designer/client/src/windowManager/ContentGetter.tsx | Updated import path for the save scenario dialog. |
designer/client/src/components/toolbars/scenarioActions/buttons/DeployButton.tsx | Refactored deployment callbacks and integrated new preset handling. |
designer/client/src/components/toolbars/scenarioActions/buttons/CancelDeployButton.tsx | Updated button label from "cancel" to "stop" (note potential spelling in translation key). |
designer/client/src/components/toolbars/process/buttons/SaveButton.tsx | Adjusted save callback logic with new preset options and validation. |
designer/client/src/components/toolbarComponents/toolbarButtons/ButtonRoot.tsx | Added conditional styling for the indicator based on button variant. |
designer/client/src/components/modals/saveScenario/useSaveScenario.ts | Introduced hook for handling scenario save actions. |
designer/client/src/components/modals/saveScenario/SaveScenarioDialog.tsx | New dialog component for saving scenarios integrating the updated save hook. |
designer/client/src/components/modals/SaveProcessDialog.tsx | Removed in favor of the new SaveScenarioDialog. |
designer/client/src/components/modals/saveScenario/SaveScenarioDialog.tsx
Outdated
Show resolved
Hide resolved
designer/client/src/components/toolbars/scenarioActions/buttons/CancelDeployButton.tsx
Outdated
Show resolved
Hide resolved
# Conflicts: # designer/client/src/components/toolbarComponents/toolbarButtons/ButtonRoot.tsx
none: #8159 |
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.
In movie, looks good, I didn't check the code
# Conflicts: # designer/client/src/components/modals/SaveProcessDialog.tsx # designer/client/src/components/toolbars/process/buttons/SaveButton.tsx # designer/client/src/components/toolbars/scenarioActions/buttons/DeployButton.tsx
This reverts commit 0070cd2
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.
Pull Request Overview
This PR adds quick-save and quick-deploy options, introduces a new save-scenario dialog, and refactors related toolbar buttons to support presets and loading states.
- Added
scenario.allowQuickSave
andscenario.allowQuickDeploy
user settings and default flags. - Replaced the old
SaveProcessDialog
withSaveScenarioDialog
and auseSaveScenario
hook. - Enhanced Save, Deploy, Redeploy, and Cancel buttons with loading indicators, presets, and quick-action behavior.
Reviewed Changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
designer/client/src/windowManager/ContentGetter.tsx | Updated import to SaveScenarioDialog |
designer/client/src/reducers/userSettings.ts | Added scenario.allowQuickSave and scenario.allowQuickDeploy |
designer/client/src/reducers/selectors/scenarioState.ts | New selectors getIsDeploying and getIsRedeploying |
designer/client/src/components/toolbars/.../DeployButton.tsx | Added quick-deploy presets, loading state, and notification handling |
designer/client/src/components/toolbars/.../RedeployButton.tsx | Added quick-redeploy presets, loading state, and notification handling |
designer/client/src/components/toolbars/.../CancelDeployButton.tsx | Added quick stop option; updated label and settings check |
designer/client/src/components/toolbars/process/buttons/SaveButton.tsx | Added quick-save presets, loading state, and validation flow |
designer/client/src/components/toolbarComponents/toolbarButtons/ButtonRoot.tsx | Updated badge logic to show a dot or * indicator |
designer/client/src/components/modals/saveScenario/* | New useSaveScenario hook and SaveScenarioDialog modal |
Comments suppressed due to low confidence (3)
designer/client/src/windowManager/ContentGetter.tsx:43
- The constant name
SaveProcessDialog
no longer matches the importedSaveScenarioDialog
component—consider renaming it toSaveScenarioDialog
for clarity.
const SaveProcessDialog = loadable(() => import("../components/modals/saveScenario/SaveScenarioDialog"), {
designer/client/src/components/toolbars/scenarioActions/buttons/CancelDeployButton.tsx:38
- The variable
available
is not defined in this component, which will cause a runtime error—defineavailable
(e.g. viauseSelector(isCancelPossible)
) or adjust thedisabled
prop.
disabled={!available}
designer/client/src/components/toolbars/process/buttons/SaveButton.tsx:21
- [nitpick] The preset values mix lowercase (
save
) and PascalCase (SaveWithComment
); consider using a consistent casing (e.g.saveWithComment
) for both.
type SavePresetValue = "save" | "SaveWithComment";
designer/client/src/components/toolbars/scenarioActions/buttons/DeployButton.tsx
Outdated
Show resolved
Hide resolved
designer/client/src/components/toolbars/scenarioActions/buttons/CancelDeployButton.tsx
Show resolved
Hide resolved
Co-authored-by: Dzuming <[email protected]>
…changes' into NU-2197-save-and-deploy-buttons-changes
Describe your changes
Provide quick save
https://github.com/user-attachments/assets/48cc2262-be3c-4d72-8791-7b6920d6c00f
Provide quick deploy/redeploy
Screen.Recording.2025-05-27.at.10.50.12.mov
Checklist before merge