Refactor Accordion
to extend from a GOVUKFrontendConfigurableComponent
class
#5456
Milestone
Accordion
to extend from a GOVUKFrontendConfigurableComponent
class
#5456
What
After regrouping the helpers related to configuration in their own module, add a new
GOVUKFrontendConfigurableComponent
class to the module and use it in theAccordion
to replace how the accordion gathers the different configuration to merge and merges them.Why
This will factor some shared code across components and allow us to provide the helper as a public API to our users.
Providing this as a function will allow its name to be mangled by minifiers, and, as discovered during the spikes, make it easier to type.
Who needs to work on this
Developers
Who needs to review this
Developers
Done when
normaliseDataset
,mergeConfigurations
andvalidateConfig
) have been moved to acommon/configuration.mjs
fileGOVUKFrontendConfigurableComponent
helper function has been added to the file, with its own test suiteAccordion
component uses this new function to compute its configurationThe text was updated successfully, but these errors were encountered: