fix(ui): set defaultValue to null for empty strings in workflow variable creation and updates [FLOW-DEV-30]#2017
Draft
billcookie wants to merge 11 commits into
Draft
fix(ui): set defaultValue to null for empty strings in workflow variable creation and updates [FLOW-DEV-30]#2017billcookie wants to merge 11 commits into
billcookie wants to merge 11 commits into
Conversation
…ble creation and updates
Contributor
There was a problem hiding this comment.
Pull request overview
Updates workflow-variable persistence in the Editor UI so that an empty-string defaultValue is sent as null during create/update operations (likely to represent “unset” more explicitly).
Changes:
- Convert
defaultValue === ""tonullwhen buildingcreatespayloads for batch updates. - Convert
defaultValue === ""tonullwhen buildingupdatespayloads for batch updates.
Comments suppressed due to low confidence (1)
ui/src/features/Editor/components/OverlayUI/components/Homebar/components/WorkflowVariablesDialog/hooks.ts:268
createscurrently setsindex: localWorkflowVariables.lengthfor every new variable. If multiple variables are created (or temp variables are reordered before submit), this sends the same index for each create and can produce incorrect ordering server-side. Consider deriving the index per created variable based on its current position inlocalWorkflowVariables(or base existing count + map index).
type: change.workflowVariable.type,
required: change.workflowVariable.required,
publicValue: change.workflowVariable.public,
index: localWorkflowVariables.length,
}));
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
|
🚀 Cloud Run Preview Deployed |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
Updates workflow-variable persistence in the Editor UI so that an empty-string
defaultValueis sent asnullduring create/update operations (likely to represent “unset” more explicitly).What I've done
defaultValue === ""tonullwhen buildingcreatespayloads for batch updates.defaultValue === ""tonullwhen buildingupdatespayloads for batch updates.defaultValue === ""tonullonAdd` for single workflow variable creation (if creates fails).defaultValue === ""tonullonChange` for single workflow variable creation (if updates fails).What I haven't done
How I tested
Screenshot
Which point I want you to review particularly
Memo