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

[Feature] Add a column with example values and/or a format to targeting attributes #2511

Open
tim06927 opened this issue May 13, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@tim06927
Copy link

Description of Feature

Regularly, our users make mistakes in the format and possible values a targeting attribute can contain. It would be great if in the UI there are additional columns for targeting attributes that contain possible and example values and describe the formatting. For example in an attribute like country it is not instantly clear if a user should enter the long name of a country ("United States", "Germany") or something shorter ("us", "de"). Further, in many environments, the field is case-sensitive. Best case, there would be some Regex validation when setting up a rule with an attribute.

@tim06927 tim06927 added the enhancement New feature or request label May 13, 2024
@jdorn
Copy link
Member

jdorn commented May 14, 2024

On thing we can do, which is fairly easy, is add more built-in options for string format when configuring attributes. Most obvious are various ISO date and ISO country code formats, but we could also do email, uri, ipv4, etc. These formats can be used for validation, but also providing a better UI (e.g. datetime picker or dropdown with all possible country codes).

A more advanced version, which will be harder to implement, is full JSON Schema support to allow arbitrary regex validation, min/max length, and more.

@fabianmarinog
Copy link

@jdorn what if a text field is added to configure the values of the targeting attribute? It would be like typing the only possible and case-sensitive values of the attribute. Of course, this would be optional and the current option would be the default.

@jdorn
Copy link
Member

jdorn commented May 21, 2024

@fabianmarinog I believe what you're asking for already exists. You can set up an "enum" attribute and then list out all the possible values. Users will be shown a drop-down instead of a freeform text box.

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

3 participants