-
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: add toggle to optionally format Calculate output for automations #2468
Conversation
Removed vultr server and associated DNS entries |
"Group2Notice" | ||
] | ||
} | ||
}; |
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.
Having a logic.test.ts
isn't really an existing pattern in @planx/components/
, but I think this feels like a more meaningful organisation than adding more noise to the preview store tests?
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 looks great 🥳
As this develops and gets more complex I'm wondering how this could be handled to differentiate between different multivariate tests and maybe even more complex stuff like nested tests.
I think it's great this has the flexibility of what the passport variable is assigned so it could maybe be managed in a similar way to current passport variables.
I'm really excited to see how this gets used and what we can learn 👀
Solves what we're discussing in this thread: https://opensystemslab.slack.com/archives/C5Q59R3HB/p1700494465669089
Key changes:
output
data format depending on use for automationsPublic.tsx
instead ofPublic/index.tsx
How this works:
By default, calculate writes a single value to the breadcrumbs - eg
"data": { "abPath": 2 }
. This is necessary to use multiple Calculate components in a row and be able to pass in number inputs (as best as I understand!).This PR introduces an Editor-facing toggle to format the output as an array with a single string item which can then be successfully referenced to auto-answer Questions or Checklists - eg
"data": { "abPath": ["2"] }
.SetValue similarly always returns an array of a single string item which is how it's able to power automations. The Pay component can successfully read a value in either format.
Test flow:
https://2468.planx.pizza/testing/a-b-testing