Removed all govuk css (#2814)

* Removed all govuk css

* Updated reference files

* Removing govuk js

* Fixed casing for modules, removed unused page

* Got more reference images

* Updated template page

* Removed govuk padding util

* Updated hint to uswds hint

* More govuk cleanup

* Commiting backstopjs ref files

* Fixed all unit tests that broke due to brittleness around govuk styling

* Added new ref images

* Final removal of govuk

* Officially removed all govuk references

* Updated reference file

* Updated link to button

* UI modernization

* Cleanup

* removed govuk escaping tests since they are no longer needed

* Fix CodeQL security issue in escapeElementName function

- Escape backslashes first before other special characters
- Prevents potential double-escaping vulnerability
- Addresses CodeQL alert about improper string escaping

* Found more govuk removal. Fixed unit tests

* Add missing pipeline check to pre-commit

* updated test

* Updated e2e test

* More update to e2e test

* Fixed another e2e test

* Simple PR comments addressed

* More updates

* Updated backstop ref files

* Refactored folder selection for non-admins

* Updated redundant line

* Updated tests to include correct mocks

* Added more ref files

* Addressing carlos comments

* Addressing Carlo comments, cleanup of window initing

* More cleanup and addressing carlo comments

* Fixing a11 scan

* Fixed a few issues with javascript

* Fixed for pr

* Fixing e2e tests

* Tweaking e2e test

* Added more ref files and cleaned up urls.js

* Fixed bug with creating new template

* Removed brittle test - addressed code ql comment

* e2e race condition fix

* More e2e test fixes

* Updated e2e tests to not wait for text sent

* Updated test to not wait for button click response

* Made tear down more resilent if staging is down

* reverted e2e test to what was working before main merge

* Updated backstopRef images

* Updated gulp to include job-polling differently
This commit is contained in:
Alex Janousek
2025-10-06 09:38:54 -04:00
committed by GitHub
parent a366a10865
commit 6f5750f095
323 changed files with 2731 additions and 2796 deletions

View File

@@ -2,14 +2,7 @@
## Installation
See the [main README quick start guide](https://github.com/alphagov/govuk-frontend#quick-start) for how to install this component.
## Guidance and Examples
Find out when to use the back link component in your service in the [GOV.UK Design System](https://design-system.service.gov.uk/components/back-link).
See the [main README quick start guide](https://designsystem.digital.gov/) for how to install this component.
## Component options
Use options to customize the appearance, content and behavior of a component when using a macro, for example, changing the text.
See [options table](https://design-system.service.gov.uk/components/back-link/#options-example-default) for details.

View File

@@ -1,6 +1,9 @@
<nav class="usa-breadcrumb" aria-label="Breadcrumb">
<a href="{{ params.href.url or params.href or '#' }}" class="usa-link usa-back-link display-inline-flex {{ params.classes or '' }}"
<a href="{{ params.href.url or params.href or '#' }}" class="usa-button usa-button--outline {{ params.classes or '' }}"
{%- for attribute, value in params.attributes %} {{ attribute }}="{{ value }}" {% endfor %}>
<svg class="usa-icon margin-right-05" aria-hidden="true" focusable="false" role="img">
<use xlink:href="{{ url_for('static', filename='img/sprite.svg') }}#arrow_back"></use>
</svg>
{{- params.html | safe or params.href.text or 'Back' -}}
</a>
</nav>

View File

@@ -2,14 +2,12 @@
## Installation
See the [main README quick start guide](https://github.com/alphagov/govuk-frontend#quick-start) for how to install this component.
See the [USWDS documentation](https://designsystem.digital.gov/components/button/) for how to use this component.
## Guidance and Examples
Find out when to use the button component in your service in the [GOV.UK Design System](https://design-system.service.gov.uk/components/button).
Find out when to use the button component in your service in the [U.S. Web Design System](https://designsystem.digital.gov/components/button/).
## Component options
Use options to customize the appearance, content and behavior of a component when using a macro, for example, changing the text.
See [options table](https://design-system.service.gov.uk/components/button/#options-example-default) for details.

View File

@@ -15,11 +15,8 @@
{# Define attributes for button/input -#}
{%- set buttonAttributes %}{% if params.name %} name="{{ params.name | trim }}"{% endif %} type="{{ params.type if params.type else 'submit' }}"{% if params.disabled %} disabled="disabled" aria-disabled="true"{% endif %}{% if params.preventDoubleClick %} data-prevent-double-click="true"{% endif %}{% endset %}
{# Auto-append .dot-anim span for Send/Schedule buttons -#}
{%- set isSendOrSchedule = params.name and (params.name | lower == 'send' or params.name | lower == 'schedule') -%}
{%- set textContent %}
{{ params.html | safe if params.html else params.text }}
{%- if isSendOrSchedule -%}<span class="dot-anim" aria-hidden="true"></span>{%- endif -%}
{%- endset %}
{# Render the appropriate element -#}

View File

@@ -2,14 +2,7 @@
## Installation
See the [main README quick start guide](https://github.com/alphagov/govuk-frontend#quick-start) for how to install this component.
## Guidance and Examples
Find out when to use the checkboxes component in your service in the [GOV.UK Design System](https://design-system.service.gov.uk/components/checkboxes).
See the [main README quick start guide](https://designsystem.digital.gov/) for how to install this component.
## Component options
Use options to customize the appearance, content and behavior of a component when using a macro, for example, changing the text.
See [options table](https://design-system.service.gov.uk/components/checkboxes/#options-example-default) for details.

View File

@@ -1,3 +1,5 @@
{% macro usaCheckboxes(params) %}
{%- include "./template.njk" -%}
{% endmacro %}
{{ usaCheckboxes(params) }}

View File

@@ -1,5 +1,5 @@
{% from "../error-message/macro.njk" import usaErrorMessage -%}
{% from "../fieldset/macro.njk" import govukFieldset %}
{% from "../fieldset/macro.njk" import usaFieldset %}
{% from "../hint/macro.njk" import usaHint %}
{% from "../label/macro.njk" import usaLabel %}
@@ -95,7 +95,7 @@
<div class="usa-form-group {%- if params.errorMessage %} usa-form-group--error{% endif %} {%- if params.formGroup.classes %} {{ params.formGroup.classes }}{% endif %}">
{% if params.fieldset %}
{% call govukFieldset({
{% call usaFieldset({
describedBy: describedBy,
classes: params.fieldset.classes,
attributes: params.fieldset.attributes,

View File

@@ -2,14 +2,7 @@
## Installation
See the [main README quick start guide](https://github.com/alphagov/govuk-frontend#quick-start) for how to install this component.
## Guidance and Examples
Find out when to use the details component in your service in the [GOV.UK Design System](https://design-system.service.gov.uk/components/details).
See the [main README quick start guide](https://designsystem.digital.gov/) for how to install this component.
## Component options
Use options to customize the appearance, content and behavior of a component when using a macro, for example, changing the text.
See [options table](https://design-system.service.gov.uk/components/details/#options-example-default) for details.

View File

@@ -2,14 +2,7 @@
## Installation
See the [main README quick start guide](https://github.com/alphagov/govuk-frontend#quick-start) for how to install this component.
## Guidance and Examples
Find out when to use the error message component in your service in the [GOV.UK Design System](https://design-system.service.gov.uk/components/error-message).
See the [main README quick start guide](https://designsystem.digital.gov/) for how to install this component.
## Component options
Use options to customize the appearance, content and behavior of a component when using a macro, for example, changing the text.
See [options table](https://design-system.service.gov.uk/components/error-message/#options-example-default) for details.

View File

@@ -2,14 +2,7 @@
## Installation
See the [main README quick start guide](https://github.com/alphagov/govuk-frontend#quick-start) for how to install this component.
## Guidance and Examples
Find out when to use the fieldset component in your service in the [GOV.UK Design System](https://design-system.service.gov.uk/components/fieldset).
See the [main README quick start guide](https://designsystem.digital.gov/) for how to install this component.
## Component options
Use options to customize the appearance, content and behavior of a component when using a macro, for example, changing the text.
See [options table](https://design-system.service.gov.uk/components/fieldset/#options-example-default) for details.

View File

@@ -53,6 +53,6 @@
"name": "caller",
"type": "nunjucks-block",
"required": false,
"description": "Not strictly a parameter but [Nunjucks code convention](https://mozilla.github.io/nunjucks/templating.html#call). Using a `call` block enables you to call a macro with all the text inside the tag. This is helpful if you want to pass a lot of content into a macro. To use it, you will need to wrap the entire fielset component in a `call` block. See [checkboxes component](https://github.com/alphagov/govuk-frontend/blob/master/src/components/checkboxes/template.njk#L86) for an example."
"description": "Not strictly a parameter but [Nunjucks code convention](https://mozilla.github.io/nunjucks/templating.html#call). Using a `call` block enables you to call a macro with all the text inside the tag. This is helpful if you want to pass a lot of content into a macro. To use it, you will need to wrap the entire fielset component in a `call` block."
}
]
]

View File

@@ -1,3 +1,3 @@
{% macro govukFieldset(params) %}
{% macro usaFieldset(params) %}
{%- include "./template.njk" -%}
{% endmacro %}

View File

@@ -2,14 +2,12 @@
## Installation
See the [main README quick start guide](https://github.com/alphagov/govuk-frontend#quick-start) for how to install this component.
See the [main README quick start guide](https://designsystem.digital.gov/) for how to install this component.
## Guidance and Examples
The label component is used in other input components, to see an example of it in use see the [text input component](https://design-system.service.gov.uk/components/text-input/#using-hint-text).
The label component is used in other input components, to see an example of it in use see the [text input component](https://designsystem.digital.gov/components/text-input).
## Component options
Use options to customize the appearance, content and behavior of a component when using a macro, for example, changing the text.
See [options table](https://design-system.service.gov.uk/components/file-upload/#options-example-default--hint) for details.

View File

@@ -2,14 +2,12 @@
## Installation
See the [main README quick start guide](https://github.com/alphagov/govuk-frontend#quick-start) for how to install this component.
See the [main README quick start guide](https://designsystem.digital.gov/) for how to install this component.
## Guidance and Examples
Find out when to use the input component in your service in the [GOV.UK Design System](https://design-system.service.gov.uk/components/text-input).
Find out when to use the input component in your service in the [U.S. Web Design System](https://designsystem.digital.gov/components/text-input).
## Component options
Use options to customize the appearance, content and behavior of a component when using a macro, for example, changing the text.
See [options table](https://design-system.service.gov.uk/components/text-input/#options-example-default) for details.

View File

@@ -2,14 +2,4 @@
## Installation
See the [main README quick start guide](https://github.com/alphagov/govuk-frontend#quick-start) for how to install this component.
## Guidance and Examples
Find out when to use the inset text component in your service in the [GOV.UK Design System](https://design-system.service.gov.uk/components/inset-text).
## Component options
Use options to customize the appearance, content and behavior of a component when using a macro, for example, changing the text.
See [options table](https://design-system.service.gov.uk/components/inset-text/#options-example-default) for details.
See the [main README quick start guide](https://designsystem.digital.gov/) for how to install this component.

View File

@@ -2,14 +2,12 @@
## Installation
See the [main README quick start guide](https://github.com/alphagov/govuk-frontend#quick-start) for how to install this component.
See the [main README quick start guide](https://designsystem.digital.gov/) for how to install this component.
## Guidance and Examples
The label component is used in other input components, to see an example of it in use see the [text input component](https://design-system.service.gov.uk/components/text-input/).
The label component is used in other input components, to see an example of it in use see the [text input component](https://designsystem.digital.gov/components/text-input/).
## Component options
Use options to customize the appearance, content and behavior of a component when using a macro, for example, changing the text.
See [options table](https://design-system.service.gov.uk/components/file-upload/#options-example-default--label) for details.

View File

@@ -2,14 +2,12 @@
## Installation
See the [main README quick start guide](https://github.com/alphagov/govuk-frontend#quick-start) for how to install this component.
See the [main README quick start guide](https://designsystem.digital.gov/) for how to install this component.
## Guidance and Examples
The radio label component is used in other input components, to see an example of it in use see the [text input component](https://design-system.service.gov.uk/components/text-input/).
The radio label component is used in other input components, to see an example of it in use see the [text input component](https://designsystem.digital.gov/components/text-input/).
## Component options
Use options to customize the appearance, content and behavior of a component when using a macro, for example, changing the text.
See [options table](https://design-system.service.gov.uk/components/file-upload/#options-example-default--label) for details.

View File

@@ -2,14 +2,12 @@
## Installation
See the [main README quick start guide](https://github.com/alphagov/govuk-frontend#quick-start) for how to install this component.
See the [main README quick start guide](https://designsystem.digital.gov/) for how to install this component.
## Guidance and Examples
Find out when to use the radios component in your service in the [GOV.UK Design System](https://design-system.service.gov.uk/components/radios).
Find out when to use the radios component in your service in the [U.S. Web Design System](https://designsystem.digital.gov/components/radio-buttons).
## Component options
Use options to customize the appearance, content and behavior of a component when using a macro, for example, changing the text.
See [options table](https://design-system.service.gov.uk/components/radios/#options-example-default) for details.

View File

@@ -1,3 +1,5 @@
{% macro usaRadios(params) %}
{%- include "./template.njk" -%}
{% endmacro %}
{{ usaRadios(params) }}

View File

@@ -1,5 +1,5 @@
{% from "../error-message/macro.njk" import usaErrorMessage -%}
{% from "../fieldset/macro.njk" import govukFieldset %}
{% from "../fieldset/macro.njk" import usaFieldset %}
{% from "../hint/macro.njk" import usaHint %}
{% from "../label/macro.njk" import usaLabel %}
@@ -90,7 +90,7 @@
<div class="usa-form-group {%- if params.errorMessage %} usa-form-group--error{% endif %} {%- if params.formGroup.classes %} {{ params.formGroup.classes }}{% endif %}">
{% if params.fieldset %}
{% call govukFieldset({
{% call usaFieldset({
describedBy: describedBy,
classes: params.fieldset.classes,
attributes: params.fieldset.attributes,

View File

@@ -2,11 +2,11 @@
## Installation
See the [main README quick start guide](https://github.com/alphagov/govuk-frontend#quick-start) for how to install this component.
See the [main README quick start guide](https://designsystem.digital.gov/) for how to install this component.
## Guidance and Examples
Find out when to use the select component in your service in the [GOV.UK Design System](https://design-system.service.gov.uk/components/select/).
Find out when to use the select component in your service in the [U.S. Web Design System](https://designsystem.digital.gov/components/select/).
## Component options

View File

@@ -2,14 +2,12 @@
## Installation
See the [main README quick start guide](https://github.com/alphagov/govuk-frontend#quick-start) for how to install this component.
See the [main README quick start guide](https://designsystem.digital.gov/) for how to install this component.
## Guidance and Examples
Find out when to use the skip link component in your service in the [GOV.UK Design System](https://design-system.service.gov.uk/components/skip-link).
Find out when to use the skip link component in your service in the [U.S. Web Design System](https://designsystem.digital.gov/components/skip-link).
## Component options
Use options to customize the appearance, content and behavior of a component when using a macro, for example, changing the text.
See [options table](https://design-system.service.gov.uk/components/skip-link/#options-example-default) for details.