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

Validate short_names of the dataChoices.js #536

Open
NealHumphrey opened this issue Sep 12, 2017 · 0 comments
Open

Validate short_names of the dataChoices.js #536

NealHumphrey opened this issue Sep 12, 2017 · 0 comments

Comments

@NealHumphrey
Copy link
Collaborator

Our url encoding now uses the short_name property to encode data in the urls. We should add a validation step that raises an error if there are any duplicated short_names, to make sure that future developers do not break the encoding accidentally when adding new dataChoices and filters. Also be sure to include in the list any hardcoded url elements that are used elsewhere (ie. the codes for the sidebar and active project).

To protect against accidentally adding additional url codes that are not in dataChoices, we could also create a routine in the url encoding that makes sure that all encoded urls are in an approved master-list of codes. This would be created from the dataChoices list plus manually added ones that are used elsewhere. The effect of this requirement would be that if a coder adds a new short code that is manually hardcoded somewhere in the code, the encoding would fail when they test it until they added it also to the master list.

This is a post-launch enhancement.

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