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 compatibility mode settings #2882

Merged
merged 1 commit into from
Oct 14, 2022
Merged

Conversation

owenatgov
Copy link
Contributor

@owenatgov owenatgov commented Sep 27, 2022

Fixes #2788

What/Why

Deprecates the compatibility mode variables.

Additionally adds a call to $govuk-suppressed-warnings in the legacy review app stylesheets to suppress warnings when developing locally.

Notes

I've attempted to be consistent in my wording with the warnings introduced in #2844.

This also includes a slight history rewrite in a change to the changelog entry for #2844 to reflect a change to the PR's title to better describe the change and differentiate it from this one.

@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-pr-2882 September 27, 2022 16:56 Inactive
@owenatgov owenatgov changed the title Deprecate compatibility mode variables Deprecate compatibility mode settings Sep 27, 2022
@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-pr-2882 September 27, 2022 17:03 Inactive
@owenatgov owenatgov marked this pull request as ready for review September 27, 2022 17:03
@owenatgov owenatgov requested a review from a team September 27, 2022 17:03
@36degrees 36degrees self-requested a review September 29, 2022 09:05
@owenatgov
Copy link
Contributor Author

After a chat with @36degrees and @colinrotherham, we've decided we're going to hold off on this until #2890 is complete. The solution of creating a variable to suppress the warnings locally can be solved by the aforementioned issue and the aforementioned issue can also solve the wider problem of allowing users to suppress warnings.

@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-pr-2882 October 14, 2022 09:43 Inactive
@owenatgov
Copy link
Contributor Author

#2890 is now complete so this has been updated and is ready to be reviewed again.


$govuk-compatibility-govukelements: false !default;

@if $govuk-compatibility-govukelements == true {
@include _warning("compatibility-mode", "$govuk-compatibility-govukelements " +
"is deprecated. From version 5.0, GOV.UK Frontend will not support compatibility " +
Copy link
Contributor

Choose a reason for hiding this comment

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

@owenatgov I think I preferred your wording here? https://github.com/alphagov/govuk-frontend/blob/main/src/govuk/settings/_warnings.scss#L10

Current

…will not support compatibility with the legacy codebase govuk_elements

Suggested

…will remove compatibility with legacy libraries such as govuk_elements

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks Colin! I made a slight tweak to the suggestion so that each warning roughly reads:

{variable} is deprecated. From version 5.0, GOV.UK Frontend will remove compatibility with the legacy library {library}.

I've done this because i'd rather keep each warning separate so that users are clearer on what in their codebase is kicking off the warning and why.

Copy link
Contributor

@colinrotherham colinrotherham left a comment

Choose a reason for hiding this comment

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

Looks fab to me, one comment on wording but not a blocker 😊

@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-pr-2882 October 14, 2022 14:51 Inactive
This includes adding a private setting: `$_govuk-is-legacy-review-app` which is set to `true` in the legacy app stylesheets within the govuk-frontend local review app. We create this temporary dependancy so that warnings aren't fired locally but are fired for users where compatibility mode settings are true in their own sass.
@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-pr-2882 October 14, 2022 14:56 Inactive
@owenatgov owenatgov merged commit 4547d52 into main Oct 14, 2022
@owenatgov owenatgov deleted the deprecate-compatibility-mode branch October 14, 2022 15:00
@romaricpascal romaricpascal mentioned this pull request Nov 10, 2022
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.

Deprecate compatibility mode variables
3 participants