Skip to content

Comments

Prompt for variation values when updating feature variables#254

Merged
emmawillis merged 1 commit intomainfrom
DVC-8155-variations-prompt
Aug 11, 2023
Merged

Prompt for variation values when updating feature variables#254
emmawillis merged 1 commit intomainfrom
DVC-8155-variations-prompt

Conversation

@emmawillis
Copy link
Contributor

@emmawillis emmawillis commented Aug 9, 2023

  • fix the zod schema so that it knows CreateVariableDTO.defaultValue is optional
  • add a prompt for variation values when adding or updating a variable on an existing feature

note: this is a little bit sketchy because when updating the variables list, we need to essentially update the feature variations list as a semi-related side effect. Because the functions on VariableListOptions have to return a valid list option, i couldn't figure out a cleaner way to update the feature variations than to store them on the VariableListOptions class and access them in the feature update command separately. if there's a better way let me know!!

New prompts when editing a variable within a feature update:
image

this prompt won't show up when updating a single variable outside of a feature, or if you select variables and variations from the chooseFields prompt (since the variations prompt will already ask for the variable values).

@emmawillis emmawillis requested a review from a team August 9, 2023 19:38
@emmawillis emmawillis force-pushed the DVC-8155-variations-prompt branch from 25c24e9 to da06985 Compare August 9, 2023 19:38
@emmawillis emmawillis force-pushed the DVC-8155-variations-prompt branch 3 times, most recently from 2186f4b to e9ecedc Compare August 10, 2023 20:21
@emmawillis emmawillis force-pushed the DVC-8155-variations-prompt branch from e9ecedc to 8282bd6 Compare August 11, 2023 18:03
@emmawillis emmawillis merged commit ab1b4eb into main Aug 11, 2023
@emmawillis emmawillis deleted the DVC-8155-variations-prompt branch August 11, 2023 18:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants