-
Notifications
You must be signed in to change notification settings - Fork 327
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
Switch to nested (not flattened) configs with stricter checks #4792
Commits on Mar 7, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 64f72f8 - Browse repository at this point
Copy the full SHA 64f72f8View commit details -
Add config schema to all components
This configured allowed types for config fields so we can check them in future
Configuration menu - View commit details
-
Copy full SHA for 31efb1b - Browse repository at this point
Copy the full SHA 31efb1bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 53024e8 - Browse repository at this point
Copy the full SHA 53024e8View commit details -
Move
normaliseString()
+ tests to separate filesThis prevents circular dependency issues
Configuration menu - View commit details
-
Copy full SHA for 9bb03c3 - Browse repository at this point
Copy the full SHA 9bb03c3View commit details
Commits on Mar 8, 2024
-
Filter
normaliseDataset()
to discard unknown data attributesSince we only pass in `DOMStringMap` values, this removes all tests for `normaliseDataset()` that don’t pass in strings We also prevent unnecessary data attributes (e.g. `data-module="govuk-accordion"’) from being merged into the config See: #4230
Configuration menu - View commit details
-
Copy full SHA for ff1729e - Browse repository at this point
Copy the full SHA ff1729eView commit details -
Update
normaliseDataset()
to output “unflattened” nested configsWe can reduce the code we use by expanding dot-separated data-attributes at the point we read them This lets us remove `flattenConfigs()` since we can use nested configs everywhere
Configuration menu - View commit details
-
Copy full SHA for a748e74 - Browse repository at this point
Copy the full SHA a748e74View commit details -
Update
normaliseString()
to use schema property typesDo you want a `data-example="2024"` to stay as a string? Data attributes now understand component config schema types Extra checks added to guard against objects, arrays and non-finite numbers (NaN, Infinity)
Configuration menu - View commit details
-
Copy full SHA for 7458577 - Browse repository at this point
Copy the full SHA 7458577View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5f7d55e - Browse repository at this point
Copy the full SHA 5f7d55eView commit details -
Configuration menu - View commit details
-
Copy full SHA for c847853 - Browse repository at this point
Copy the full SHA c847853View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9358b72 - Browse repository at this point
Copy the full SHA 9358b72View commit details -
Add tests illustrating the behaviour of merging when both deep and sh…
…allow keys are set
Configuration menu - View commit details
-
Copy full SHA for 8ce1dc4 - Browse repository at this point
Copy the full SHA 8ce1dc4View commit details