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

All field values should be saved as Enums and saved in isolated modules. #576

Open
tiansu-yu-idealo opened this issue Mar 17, 2023 · 0 comments

Comments

@tiansu-yu-idealo
Copy link

A general observation is that the acceptable values for almost all fields are either saved as plain constants or not at all, this gives a huge amount of headache when one tries to configure each field. Often times I find myself toggle editor generated JSON and grafana docs for configuring panel styles.

In general, all such values should be saved as Enums in a separate module and quoted as e.g. ReduceCalcs.Last.value and all validations can be done via in ReduceCalcs.values. This should be a preferred approach.

Looking forward to hear your opinions and would love to contribute some PRs for this.

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

No branches or pull requests

1 participant