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
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,16 @@ This was added in [pull request #2677: Amend error summary markup to fix page lo

### Deprecated features

#### Stop using the compatibility mode settings

In GOV.UK Frontend v5.0 we will stop supporting compatibility with legacy codebases. We are therefore deprecating the compatibility mode variables associated with legacy codebases:

- `$govuk-compatibility-govukfrontendtoolkit`
- `$govuk-compatibility-govuktemplate`
- `$govuk-compatibility-govukelements`

This was introduced in [pull request #2882: Deprecate compatibility mode settings](https://github.com/alphagov/govuk-frontend/pull/2882).

#### Stop using settings associated with legacy codebases

In GOV.UK Frontend v5.0 we will stop supporting compatibility with legacy codebases. As part of this, we are deprecating settings controlled by compatibility mode variables. This includes the `govuk-compatibility` mixin and the following settings:
Expand All @@ -95,7 +105,7 @@ In GOV.UK Frontend v5.0 we will stop supporting compatibility with legacy codeba
- `$govuk-typography-use-rem`
- `$govuk-font-family-tabular`

This was introduced in [pull request #2844: Deprecate compatibility mode settings](https://github.com/alphagov/govuk-frontend/pull/2844).
This was introduced in [pull request #2844: Remove compatibility mode from govuk-frontend](https://github.com/alphagov/govuk-frontend/pull/2844).

### Fixes

Expand Down
5 changes: 5 additions & 0 deletions app/assets/scss/app-legacy-ie8.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ $govuk-compatibility-govukfrontendtoolkit: true;
$govuk-compatibility-govuktemplate: true;
$govuk-compatibility-govukelements: true;

// Suppress compatibility mode deprecation warnings locally
$govuk-suppressed-warnings: (
"compatibility-mode"
);

// Set Elements assets path
$path: "/vendor/govuk_frontend_toolkit/assets/";

Expand Down
5 changes: 5 additions & 0 deletions app/assets/scss/app-legacy.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ $govuk-compatibility-govukfrontendtoolkit: true;
$govuk-compatibility-govuktemplate: true;
$govuk-compatibility-govukelements: true;

// Suppress compatibility mode deprecation warnings locally
$govuk-suppressed-warnings: (
"compatibility-mode"
);

// Set Elements assets path
$path: "/vendor/govuk_frontend_toolkit/assets/";

Expand Down
26 changes: 26 additions & 0 deletions src/govuk/settings/_compatibility.scss
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,17 @@
///
/// @type Boolean
/// @access public
/// @deprecated Will be removed in v5.0 with the rest of the compatibility mode
/// suite of tools and settings

$govuk-compatibility-govukfrontendtoolkit: false !default;

@if $govuk-compatibility-govukfrontendtoolkit == true {
@include _warning("compatibility-mode", "$govuk-compatibility-govukfrontendtoolkit " +
"is deprecated. From version 5.0, GOV.UK Frontend will remove compatibility " +
"with the legacy library govuk_frontend_toolkit.");
}

/// Compatibility Mode: alphagov/govuk_template
///
/// Enabling this will:
Expand All @@ -41,9 +49,17 @@ $govuk-compatibility-govukfrontendtoolkit: false !default;
///
/// @type Boolean
/// @access public
/// @deprecated Will be removed in v5.0 with the rest of the compatibility mode
/// suite of tools and settings

$govuk-compatibility-govuktemplate: false !default;

@if $govuk-compatibility-govuktemplate == true {
@include _warning("compatibility-mode", "$govuk-compatibility-govuktemplate " +
"is deprecated. From version 5.0, GOV.UK Frontend will remove " +
"compatibility with the legacy library govuk_template.");
}

/// Compatibility Mode: alphagov/govuk_elements
///
/// Enabling this will:
Expand All @@ -56,16 +72,26 @@ $govuk-compatibility-govuktemplate: false !default;
///
/// @type Boolean
/// @access public
/// @deprecated Will be removed in v5.0 with the rest of the compatibility mode
/// suite of tools and settings

$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 remove compatibility " +
"with the legacy library govuk_elements.");
}

/// Compatibility Product Map
///
/// Maps product names to their settings that we can use to lookup states from
/// within the `@govuk-compatibility` mixin.
///
/// @type Map
/// @access private
/// @deprecated Will be removed in v5.0 with the rest of the compatibility mode
/// suite of tools and settings

$_govuk-compatibility: (
govuk_frontend_toolkit: $govuk-compatibility-govukfrontendtoolkit,
Expand Down