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

Deprecate govuk/all.scss and only reference govuk/index.scss internally #5518

Merged
merged 1 commit into from
Nov 29, 2024

Conversation

owenatgov
Copy link
Contributor

A continuation of #4955 to deprecate the root all sass file as well as the all files in the layers. Additionally removes all references to all.scss internally.

Part of #4988 but doesn't resolve it as we also need to update the Frontend docs.

@owenatgov owenatgov requested a review from a team as a code owner November 20, 2024 10:10
Copy link

github-actions bot commented Nov 20, 2024

📋 Stats

File sizes

File Size
dist/govuk-frontend-development.min.css 118.41 KiB
dist/govuk-frontend-development.min.js 42.7 KiB
packages/govuk-frontend/dist/govuk/all.bundle.js 92.79 KiB
packages/govuk-frontend/dist/govuk/all.bundle.mjs 87.12 KiB
packages/govuk-frontend/dist/govuk/all.mjs 1.25 KiB
packages/govuk-frontend/dist/govuk/govuk-frontend-component.mjs 1.74 KiB
packages/govuk-frontend/dist/govuk/govuk-frontend.min.css 118.4 KiB
packages/govuk-frontend/dist/govuk/govuk-frontend.min.js 42.69 KiB
packages/govuk-frontend/dist/govuk/i18n.mjs 5.55 KiB
packages/govuk-frontend/dist/govuk/init.mjs 7.13 KiB

Modules

File Size (bundled) Size (minified)
all.mjs 82.57 KiB 40.4 KiB
accordion.mjs 26.58 KiB 13.41 KiB
button.mjs 9.09 KiB 3.78 KiB
character-count.mjs 25.39 KiB 10.9 KiB
checkboxes.mjs 7.81 KiB 3.42 KiB
error-summary.mjs 10.99 KiB 4.54 KiB
exit-this-page.mjs 20.2 KiB 10.34 KiB
header.mjs 6.46 KiB 3.22 KiB
notification-banner.mjs 9.35 KiB 3.7 KiB
password-input.mjs 18.24 KiB 8.33 KiB
radios.mjs 6.81 KiB 2.98 KiB
service-navigation.mjs 6.44 KiB 3.26 KiB
skip-link.mjs 6.4 KiB 2.76 KiB
tabs.mjs 12.04 KiB 6.67 KiB

View stats and visualisations on the review app


Action run for 6a93d78

Copy link

github-actions bot commented Nov 20, 2024

Other changes to npm package

diff --git a/packages/govuk-frontend/dist/govuk/all.scss b/packages/govuk-frontend/dist/govuk/all.scss
index 1d57cf86e..b29cb4977 100644
--- a/packages/govuk-frontend/dist/govuk/all.scss
+++ b/packages/govuk-frontend/dist/govuk/all.scss
@@ -1,3 +1,9 @@
 @import "index";
 
+@include _warning(
+  "import-using-all",
+  "Importing using 'govuk/all' is deprecated. Update your import statement to import 'govuk/index'.",
+  $silence-further-warnings: false
+);
+
 /*# sourceMappingURL=all.scss.map */

Action run for 6a93d78

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.

Blimey, that was a lot of places we were using that all.scss file, thanks for being super thorough, as always 🙌🏻 .

Only two minor comments on the update, thanks. I think it also needs a CHANGELOG entry announcing the deprecation 😊

@owenatgov owenatgov changed the title Deprecate govuk/all.scss and only reference govuk/index.scss internally Deprecate govuk/all.scss and only reference govuk/index.scss internally Nov 25, 2024
@owenatgov
Copy link
Contributor Author

I've added a changelog that mostly replicates what was written for when we deprecated the all files in the layers.

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.

Cheers for the CHANGELOG and taking onboard the suggestions 🙌🏻 I've pulled @calvin-lau-sig7 and @seaemsi to ask when they prefer to review the content, and noticed two little things in the code that raised questions (and that I may have missed in my initial review).

CHANGELOG.md Outdated
Comment on lines 24 to 34
#### Importing Sass using `govuk/all`

You'll see a warning when compiling your Sass if you import all of GOV.UK Frontend's styling via `govuk/all`. Importing using the `all` file is deprecated, and we’ll remove it in the next major release.

In your import statements, use a trailing `/index` rather than `/all` to load GOV.UK Frontend's files:

- `@import "govuk/index";` instead of `@import "govuk/all";`;

You do not need `/index` at the end of each import path if you’re using Dart Sass, LibSass 3.6.0 or higher, or Ruby Sass 3.6.0 or higher.

This change was introduced in [pull request #5518: Deprecate `govuk/all.scss` and only reference `govuk/index.scss` internally](https://github.com/alphagov/govuk-frontend/pull/5518).
Copy link
Member

Choose a reason for hiding this comment

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

@calvin-lau-sig7 @seaemsi Would you prefer updating this bit as part of this PR or during the release process? Let us know what work best with your current workload 😊

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.

All good code-wise, thanks for making the changes. Let's see how we prefer handling the changelog 😊

@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-pr-5518 November 29, 2024 09:59 Inactive
@owenatgov owenatgov merged commit ce87ed7 into main Nov 29, 2024
50 checks passed
@owenatgov owenatgov deleted the deprecate-govuk/all branch November 29, 2024 11:43
@owenatgov owenatgov mentioned this pull request Jan 9, 2025
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.

4 participants