Skip to content

Commit

Permalink
Plat UI 2847 (#344)
Browse files Browse the repository at this point in the history
* PLATUI-2823: Update govuk-frontend to v4.8.0 to include new Tudor crown, updated header with feature flag, added new HMRC Crest Logo to banner and internal header with feature flag

* PLATUI-2817: Updated PR to use old Crown by default, and only Tudor Crown when passed as param

* PLATUI-2817: Bump version to 5.65.0

* PLATUI-2817: Bump version to 5.66.0

* pass through the tudor crown option in the account-header layout (#343)

* fix tests, and refactor header

* accept backstop changes

* update tests due to change in position of banners in header

* Update hmrc footer to delegate to govuk footer

* update character count params with new additions

* PLATUI-2847: revert back to previous structure

In trying to create an example of the issue that I changed the structure
to fix, I realised that the issue came not from a govuk change but from
changing back to follow the govuk convention. Because of that, even
though I still think it would be good to match GOV.UK - it's not worth
making that change as part of this - especially because we still have
the language select and sign out links within the header which mean we
wouldn't be able to get rid of our fork all together.

* PLATUI-2847: remove banner ref in changelog

* PLATUI-2847: add back in the hmrc-header__service-name classes

Noticed that this would break a few tests - now the only difference is
the labels for the menu on mobile - however that is something we don't
seem to have explicitly diverged on from the govuk implementation.

* PLATUI-2847: remove redundant styles for hmrc-header__service-name

* Revert "PLATUI-2847: remove redundant styles for hmrc-header__service-name"

This reverts commit 76e5406.

* PLATUI-2847: remove IE8 fallbacks and shorten svg tests

---------

Co-authored-by: JoPintoPaul <[email protected]>
Co-authored-by: Kyle Bowden <[email protected]>
  • Loading branch information
3 people authored Mar 6, 2024
1 parent 26b50b3 commit 1b2084f
Show file tree
Hide file tree
Showing 142 changed files with 759 additions and 584 deletions.
1 change: 1 addition & 0 deletions .nsprc
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"GHSA-4gmj-3p3h-gm8h": "es5-ext - no risk given our usage - test coverage should catch",
"GHSA-78xj-cgh5-2h22": "ip - devDependency, no risk given our usage",
"GHSA-67hx-6x53-jw92": "@babel/traverse - devDependency, no risk given our usage",
"GHSA-j8xg-fqg3-53r7": "word-wrap - devDependency, no risk given our usage",
Expand Down
40 changes: 40 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased]

## [6.3.0] - 2024-02-27

### Changed

- Tudor crown incorporated, and now enabled by default
- Updated govuk-frontend to v5.2.0
- Updated npm audit exclusions

## [6.2.0] - 2024-02-26

### Changed
Expand All @@ -25,6 +33,38 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

- Updated to work with govuk-frontend v5

## [5.67.0] - 2024-02-19

### Changed

- add useTudorCrown option to account-header layout for prototypes and the design-system

## [5.66.0] - 2024-02-09

### Changed

- version number bumped to trigger release - no other changes

## [5.65.0] - 2024-02-09

### Changed

- updated api for using the tudor crown to match govuk-frontend, and started passing through the value to child
components that need it

## [5.64.0] - 2024-02-08

### Changed

- Updated `govuk-frontend` to `v4.8.0`. Updated `header` to use new Tudor Crown logo via feature flag. Update `banner`
and `internal-header` to use new HMRC Crest via feature flag.

## [5.63.0] - 2024-02-06

### Changed

- Test release updating `govuk-frontend` to `v4.8.0` and testing new Tudor Crown logo changes. Do not use this release.

## [5.62.0] - 2024-01-03

### Changed
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 9 additions & 2 deletions lib/helper-functions.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,23 @@
// Component names are lowercase, dash-separated strings (button, date-input),
// whilst macro names have a `govuk` prefix and are camel cased (govukButton,
// govukDateInput).
const componentNameToMacroName = (componentName) => {
const GOVUK_COMPONENTS_PATH = '/components/';

const componentNameToMacroName = (componentPath) => {
const [componentName, library = 'hmrc'] = componentPath
.split(GOVUK_COMPONENTS_PATH)
.reverse();

const macroName = componentName
.toLowerCase()
.split('-')
// capitalize each 'word'
.map((word) => word.charAt(0).toUpperCase() + word.slice(1))
.join('');

return `hmrc${macroName}`;
return `${library}${macroName}`;
};

exports.componentNameToMacroName = componentNameToMacroName;

exports.componentNameToComponentDirectory = (componentName) => [componentName].join('-'
Expand Down
Loading

0 comments on commit 1b2084f

Please sign in to comment.