-
Notifications
You must be signed in to change notification settings - Fork 334
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
Add configuration helpers to the public JavaScript API #5373
Labels
Comments
romaricpascal
added
epic
Epics are used in planning project boards to group related stories
javascript
labels
Oct 3, 2024
A couple of thoughts:
|
Closing this as the final non-stretch issue has a PR almost ready to go (only missing a changelog entry) and the stretch issue can be tackled anytime. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Brief
Design and document a public API to enable components outside of GOV.UK Frontend to receive a configuration in the same fashion the components from GOV.UK Frontend do.
This will allow further code sharing between code from GOV.UK Frontend and that of services or other Design Systems, leading less duplication in the compiled bundles sent to users, as well as avoiding to recreate a solution to the problem for services and other Design Systems.
This will also open the door to offering helpers for internationalising components, which we could start looking at as a stretch goal towards the end of the epic if time allows.
Relevant links
mergeConfigs
helper that helps merging configuration from different sources (defaults, HTML Element attributes, JavaScript object)Epic lead
@romaricpascal
Driving role(s)
@seaemsi , @patrickpatrickpatrick, @Izabela-16
Further detail
Publish new API
GOVUKFrontendComponent
#5326Component
class govuk-design-system#4156Dev
Config
class if defined by child class ofGOVUKFrontendComponent
#5427Config
class if defined byGOVUKFrontendComponent
#5426Config
class if defined byGOVUKFrontendComponentConfigurable
#5430Accordion
to extend from aGOVUKFrontendConfigurableComponent
class #5456Button
to extend from aGOVUKFrontendConfigurableComponent
class #5457CharacterCount
to extend from aGOVUKFrontendConfigurableComponent
class #5458ErrorSummary
to extend from aGOVUKFrontendConfigurableComponent
class #5459ExitThisPage
to extend from aGOVUKFrontendConfigurableComponent
class #5460NotificationBanner
to extend from aGOVUKFrontendConfigurableComponent
class #5461PasswordInput
to extend from aGOVUKFrontendConfigurableComponent
class #5462GOVUKFrontendConfigurableComponent
as part of the public API #5463ConfigurableComponent
in the Design System's Cookie Banner govuk-design-system#4275GOVUKFrontend
prefix fromGOVUKFrontendComponent
class #5497config
instead ofdefaults
increateAll
to get the configuration type #5465ConfigurableComponent
class to further encapsulate receiving a configuration #5466ConfigurableComponent
as part of the public API #5468ConfigurableComponent
in the Design System's Cookie Banner govuk-design-system#4276Documentation
Community
The text was updated successfully, but these errors were encountered: