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

Allow using adjustments by name without configs #33

Open
doublejosh opened this issue Jul 31, 2017 · 0 comments
Open

Allow using adjustments by name without configs #33

doublejosh opened this issue Jul 31, 2017 · 0 comments

Comments

@doublejosh
Copy link
Contributor

doublejosh commented Jul 31, 2017

The first implementation of personalized adjustments (#31) requires adding a config to describe selectors and map to user detail properties. You should be able to do this without any configs just by name.

Example

groucho.userSet({'region':'North America'});
<span data-groucho-region="Europe">This is hidden</span>
<span data-groucho-region="North America">This is revealed</span>

If no config exists for that data attribute, then just look for the corresponding user property. Could decide to require all adjustments to be configured once even one is present.

Motivation is for easier adoption of the tool, and avoiding the need for obvious configs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant