Skip to content
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

Making conditions nice #11

Open
jenbutongit opened this issue Jun 5, 2020 · 0 comments
Open

Making conditions nice #11

jenbutongit opened this issue Jun 5, 2020 · 0 comments
Labels
enhancement New feature or request

Comments

@jenbutongit
Copy link

As per hack day discussions (sorry I couldn't attend!), conditions need to be more user friendly.

@andymoody

In short, in notify-edit.js take a look at NotifyEdit.usableKeys. It is a bit of a chain hell, sorry! Essentially it's mapping out all of the component names and prepending the section it's in, if it has one. eg yourDetails.name

For context
In the runner Summary.js is doing a flatten on the state so you'll end up with {yourDetails.name: 'jen'}, and so NotifyService can send the personalisation (yourDetails.name) and it's value, jen.

We'd want the new feature (and possibly this notify one, for clarity to the user) to return an object, with the section, name, and title. We would serve the user the title, but use the section.name for the values.

I would imagine we could just construct the condition as a string as they are at the moment. I'd just be careful with what expr-eval accepts (like 'and' rather than &&).

@jenbutongit jenbutongit added the enhancement New feature or request label Jun 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant