-
Notifications
You must be signed in to change notification settings - Fork 2
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
feat: Append, replace, removeOne, & removeAll operations for SetValue
#2914
Conversation
Removed vultr server and associated DNS entries |
1432489
to
de31065
Compare
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.
V exciting 🎉 a couple questions after a quick first pass!
SetValue
SetValue
editor.planx.uk/src/pages/FlowEditor/components/Flow/components/Node.tsx
Show resolved
Hide resolved
367fd74
to
80abf01
Compare
- Useful for tests!
580f985
to
ff7f22e
Compare
5e1ae08
to
3d0c6e2
Compare
3d0c6e2
to
8894929
Compare
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.
This file should represent the inputs/outputs described in this "Logic Camp" diagram -
Source: https://miro.com/app/board/uXjVN9K07PQ=/?moveToWidget=3458764578921902831&cot=14
SetValue
SetValue
* Handle modifying passport values when passing through a SetValue component | ||
* Called by computePassport() | ||
*/ | ||
export const handleSetValue: HandleSetValue = ({ |
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.
Following previous conversations, I've refactored this logic to be co-located with the component rather than being purely within the store.
The motivations here were two-fold -
- This is SetValue logic and doesn't relate to any other components - it just can't get called by this component directly
- We actually want to use some of this code within the Editor modal to show the Editor examples of how this component works (upcoming PR). Locating this within the store would make this harder to re-use in a different context.
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.
Sorry it's taken me a minute to get back to this one. Most recent changes all look good here - any final testing/coordination needed with Content team before merging? Let's aim to get this out in the wild this week!
What does this PR do?
Testing
Basic test flow here - https://2914.planx.pizza/testing/set-value-playground
This (hopefully!) illustrates that the behaviour matches the desired outcomes discussion at our recent "Logic Camp" - full details here - https://miro.com/app/board/uXjVN9K07PQ=/?moveToWidget=3458764588027715730&cot=14
I feel like there's a decent level of unit testing here, as well as more psuedo-integration level tests calling store functions to mock a user's journey.
What I'm really interested in testing feedback on would be -
Next steps...