You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Remove GOVUKFrontend prefix from the GOVUKFrontendComponent class, so it's named Component. Because of the name change, we'll also want to rename the file that holds it to component.mjs.
This file move could be a breaking change for people importing from govuk-frontend/dist/govuk/govuk-frontend-component.mjs. To avoid a breaking change, we'll need to keep the govuk-frontend-component.mjs class and ensure it re-exports Component as GOVUKFrontendComponent.
Why
To implement the decision we made on Slack to drop the GOVUKFrontend prefix from both GOVUKFrontendComponent and the new GOVUKFrontendConfigurableComponent (or whatever name it ends up with) in favour of simpler Component and ConfigurableComponent.
This decision was motivated by the fact that:
in our own codebase, it's pretty clear components are of GOV.UK Frontend
for external codebases, we export it as Component to not give the impression that extending the class makes the component 'automatically' part of GOV.UK Frontend
if a naming collision with another library happens, import aliases can be used to clarify which Component is which.
Who needs to work on this
Developers
Who needs to review this
Developers
Done when
We've added a deprecation to the changelog for govuk-frontend-component.mjs and its GOVUKFrontendComponent class
GOVUKFrontendComponent has been renamed Component
The text was updated successfully, but these errors were encountered:
What
Remove
GOVUKFrontend
prefix from theGOVUKFrontendComponent
class, so it's namedComponent
. Because of the name change, we'll also want to rename the file that holds it tocomponent.mjs
.This file move could be a breaking change for people importing from
govuk-frontend/dist/govuk/govuk-frontend-component.mjs
. To avoid a breaking change, we'll need to keep thegovuk-frontend-component.mjs
class and ensure it re-exportsComponent
asGOVUKFrontendComponent
.Why
To implement the decision we made on Slack to drop the
GOVUKFrontend
prefix from bothGOVUKFrontendComponent
and the newGOVUKFrontendConfigurableComponent
(or whatever name it ends up with) in favour of simplerComponent
andConfigurableComponent
.This decision was motivated by the fact that:
Component
to not give the impression that extending the class makes the component 'automatically' part of GOV.UK Frontendimport
aliases can be used to clarify whichComponent
is which.Who needs to work on this
Developers
Who needs to review this
Developers
Done when
govuk-frontend-component.mjs
and itsGOVUKFrontendComponent
classGOVUKFrontendComponent
has been renamedComponent
The text was updated successfully, but these errors were encountered: