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 settings associated with compatibility mode #2844

Merged
merged 6 commits into from
Sep 26, 2022

Conversation

owenatgov
Copy link
Contributor

@owenatgov owenatgov commented Sep 14, 2022

Fixes #2787

What/Why

Deprecates the public settings influenced by compatibility mode. This PR specifically targets instances when these settings are being used in user-authored sass outside the bounds of the compatibility mode variables. This scenario is unlikely but means we're covering all bases with our deprecation.

More details can be found in the original issue and descriptions of commits.

@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-pr-2844 September 14, 2022 11:30 Inactive
@owenatgov owenatgov marked this pull request as ready for review September 14, 2022 11:35
@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-pr-2844 September 14, 2022 11:36 Inactive
///
/// @access public

@mixin govuk-compatibility($product) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Love this approach.

Copy link
Contributor

@36degrees 36degrees left a comment

Choose a reason for hiding this comment

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

I've generally not reviewed the content of the deprecation warnings – suggest it'd be a good idea to loop @claireashworth in on them, if you haven't already.

src/govuk/tools/_compatibility.scss Outdated Show resolved Hide resolved
src/govuk/tools/_compatibility.scss Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
@owenatgov owenatgov force-pushed the deprecate-compatibility-mode-settings branch from 8ffb9d0 to 3715abc Compare September 15, 2022 14:36
@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-pr-2844 September 15, 2022 14:36 Inactive
@owenatgov owenatgov requested review from claireashworth and a team September 15, 2022 14:37
@owenatgov
Copy link
Contributor Author

I just realised I've changed all the warning text but didn't updated the associated tests 🤦🏻 Will sort out.

@owenatgov owenatgov force-pushed the deprecate-compatibility-mode-settings branch 2 times, most recently from 796399e to 3b1e449 Compare September 15, 2022 16:30
@owenatgov
Copy link
Contributor Author

Tests fixed, ready for re-review!

@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-pr-2844 September 15, 2022 16:31 Inactive
Copy link
Contributor

@36degrees 36degrees left a comment

Choose a reason for hiding this comment

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

Technical implementation looks solid – thanks @owenatgov 🆒

I think some of the deprecation notices could be clearer, so I've made a some suggestions. I'd also personally prefer we use the full product name ('GOV.UK Frontend') where possible.

CHANGELOG.md Outdated Show resolved Hide resolved
src/govuk/settings/_colours-palette.scss Outdated Show resolved Hide resolved
src/govuk/settings/_typography-font.scss Outdated Show resolved Hide resolved
src/govuk/settings/_colours-palette.scss Show resolved Hide resolved
src/govuk/settings/_typography-font.scss Outdated Show resolved Hide resolved
src/govuk/settings/_typography-responsive.scss Outdated Show resolved Hide resolved
src/govuk/tools/_compatibility.scss Outdated Show resolved Hide resolved
@owenatgov owenatgov force-pushed the deprecate-compatibility-mode-settings branch from 3b1e449 to 3d5df6d Compare September 21, 2022 11:06
@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-pr-2844 September 21, 2022 11:06 Inactive
To suppress lots of warnings when team members run this code locally due to parts of our own code currently using compatibility mode, we temporarily split `govuk-compatibility` into a public and private mixin. The private mixin is just `_govuk-compaitbility` as is and the public mixin references the private mixin but adds a warning. This is specifically to catch when users are using `govuk-compatibility` in their own code.
@owenatgov owenatgov force-pushed the deprecate-compatibility-mode-settings branch from 3d5df6d to 2ccbba4 Compare September 26, 2022 11:08
@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-pr-2844 September 26, 2022 11:08 Inactive
@owenatgov owenatgov merged commit 69e5c32 into main Sep 26, 2022
@owenatgov owenatgov deleted the deprecate-compatibility-mode-settings branch September 26, 2022 11:13
@owenatgov owenatgov changed the title Deprecate compatibility mode settings Deprecate settings associated with compatibility mode Sep 27, 2022
@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 settings managed by compatibility mode variables
5 participants