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

Remove GOVUKFrontend prefix from GOVUKFrontendComponent #5515

Merged
merged 5 commits into from
Feb 12, 2025

Conversation

patrickpatrickpatrick
Copy link
Contributor

@patrickpatrickpatrick patrickpatrickpatrick commented Nov 18, 2024

What

  • Remove GOVUKFrontend prefix from Component
  • Update components to import Component
  • Update ConfigurableComponent to extend Component
  • Add deprecated JavaScript files to package build (a measure to ensure that deprecated JS will still be present in the dist folder after the build process, thus avoiding a breaking change in any PR)
  • Add new documentation for Managing Change

Why

Fixes #5497

Copy link

github-actions bot commented Nov 18, 2024

📋 Stats

File sizes

File Size
dist/govuk-frontend-development.min.css 118.52 KiB
dist/govuk-frontend-development.min.js 42.59 KiB
packages/govuk-frontend/dist/govuk/all.bundle.js 92.42 KiB
packages/govuk-frontend/dist/govuk/all.bundle.mjs 86.71 KiB
packages/govuk-frontend/dist/govuk/all.mjs 1.21 KiB
packages/govuk-frontend/dist/govuk/component.mjs 1.67 KiB
packages/govuk-frontend/dist/govuk/govuk-frontend.min.css 118.51 KiB
packages/govuk-frontend/dist/govuk/govuk-frontend.min.js 42.58 KiB
packages/govuk-frontend/dist/govuk/i18n.mjs 5.55 KiB
packages/govuk-frontend/dist/govuk/init.mjs 6.64 KiB

Modules

File Size (bundled) Size (minified)
all.mjs 82.32 KiB 40.4 KiB
accordion.mjs 26.58 KiB 13.41 KiB
button.mjs 9.09 KiB 3.79 KiB
character-count.mjs 25.37 KiB 10.91 KiB
checkboxes.mjs 7.76 KiB 3.42 KiB
error-summary.mjs 10.99 KiB 4.55 KiB
exit-this-page.mjs 20.2 KiB 10.34 KiB
header.mjs 6.41 KiB 3.22 KiB
notification-banner.mjs 9.35 KiB 3.71 KiB
password-input.mjs 18.16 KiB 8.34 KiB
radios.mjs 6.76 KiB 2.98 KiB
service-navigation.mjs 6.39 KiB 3.26 KiB
skip-link.mjs 6.34 KiB 2.76 KiB
tabs.mjs 11.99 KiB 6.67 KiB

View stats and visualisations on the review app


Action run for ab05f56

This comment was marked as off-topic.

This comment was marked as off-topic.

@patrickpatrickpatrick patrickpatrickpatrick changed the title move the component Remove GOVUKFrontend prefix from GOVUKFrontendComponent and GOVUKFrontendComponentConfigurable Nov 19, 2024
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.

Thanks for reworking the history, looks good to go! 🙌🏻 ⛵

- `GOVUKFrontendComponent` is now `Component`. Renamed
`govuk-frontend-component.mjs` to `component.mjs` and the associated
test. Changed references to `GOVUKFrontendComponent` to `Component` in
the test.
Components that extended `GOVUKFrontendComponent` now extend `Component`
from `component.mjs`.
Copy link
Contributor

@owenatgov owenatgov left a comment

Choose a reason for hiding this comment

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

🤙🏻

romaricpascal and others added 2 commits February 12, 2025 09:21
Because they're not imported by `all.mjs` deprecated JavaScript files were not included in the package (in which they need to remain until the next breaking release).

This adds a module to store the list of deprecated JavaScript files and helper functions that are then used:
- in the Gulp configuration, to add a new task building each deprecated file individually
- in the Rollup configuration, to prevent the bundled output of the deprecated files as all we want is for them to be in the package as a module

Add new section to documentation `Managing Change` which details the
process of marking a JS file for deprecation.

Co-authored-by: Patrick Cartlidge <[email protected]>
Co-authored-by: Brett Kyle <[email protected]>
Co-authored-by: seaemsi <[email protected]>
`compile:js 'deprecations'` now will only run if there are files present
in the `deprecatedFilesPaths` array.
@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-pr-5515 February 12, 2025 09:23 Inactive
@patrickpatrickpatrick patrickpatrickpatrick merged commit b48c9aa into main Feb 12, 2025
49 checks passed
@patrickpatrickpatrick patrickpatrickpatrick deleted the rename-component branch February 12, 2025 09:31
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.

Remove GOVUKFrontend prefix from GOVUKFrontendComponent class
5 participants