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

Cookie banner extends ConfigurableComponent #4305

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

patrickpatrickpatrick
Copy link
Contributor

@patrickpatrickpatrick patrickpatrickpatrick commented Nov 14, 2024

What

Make the cookie banner extends ConfigurableComponent which is now exported from the latest version of govuk-frontend. Remove redundant code and update references to the config. Use the defaults functionality of ConfigurableComponent and provide a schema.

Why

Fixes #4275

Copy link

netlify bot commented Nov 14, 2024

You can preview this change here:

Name Link
🔨 Latest commit 0ef3cf4
🔍 Latest deploy log https://app.netlify.com/sites/govuk-design-system-preview/deploys/6737453960091300089e652e
😎 Deploy Preview https://deploy-preview-4305--govuk-design-system-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Member

@romaricpascal romaricpascal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like it's all working as intended and we'll be able to merge it once 5.8.0 is released with the new component 🥳

/**
* Check support of CookieBanner
*/
static checkSupport() {
Component.checkSupport()
ConfigurableComponent.checkSupport()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion I think super should work here to avoid further updates 😁

Suggested change
ConfigurableComponent.checkSupport()
super.checkSupport()

Make the cookie banner extends `ConfigurableComponent` which is now exported
from the latest version of `govuk-frontend`. Remove redundant code and
update references to the config. Use the `defaults` functionality of
`ConfigurableComponent` and provide a `schema`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use ConfigurableComponent in the Design System's Cookie Banner
2 participants