Skip to content

Commit

Permalink
PLATUI-2618: Add styling for link scaling on account-menu including v…
Browse files Browse the repository at this point in the history
…isual regression test (#335)
  • Loading branch information
JoPintoPaul committed Dec 13, 2023
1 parent af9397c commit 1eaf1a6
Show file tree
Hide file tree
Showing 29 changed files with 20 additions and 4 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased]

## [5.61.0] - 2023-12-04

### Changed

- Ensure `account-menu` links in `account-header` scale correctly with browser settings

## [5.60.0] - 2023-11-29

### Changed
Expand Down
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@ module.exports = async (page, { beforeTakingScreenshot }) => {
}
}

allowedPageActions.increaseFontSizes = async fontSize => {
await page.evaluate((fontSize) => {
document.documentElement.style.fontSize = fontSize
}, fontSize);
}

if (beforeTakingScreenshot) {
for (const step of beforeTakingScreenshot) {
const [action, params] = Object.entries(step)[0];
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "hmrc-frontend",
"version": "5.60.0",
"version": "5.61.0",
"description": "Design patterns for HMRC frontends",
"scripts": {
"start": "gulp dev",
Expand Down
5 changes: 4 additions & 1 deletion src/components/account-header/account-header.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,9 @@ examples:
width: 320
height: 480
alternateStates:
account-menu-with-larger-browser-font:
beforeTakingScreenshot:
- increaseFontSizes: 32px
account-menu-dropdown-open:
beforeTakingScreenshot:
- click: ".hmrc-account-menu__link[aria-expanded='false']"
Expand All @@ -212,4 +215,4 @@ examples:
account-menu-dropdown-open-active-link-focused:
beforeTakingScreenshot:
- click: ".hmrc-account-menu__link[aria-expanded='false']"
- focus: ".hmrc-account-menu__link[href='/messages/href']"
- focus: ".hmrc-account-menu__link[href='/messages/href']"
3 changes: 2 additions & 1 deletion src/components/account-menu/_account-menu.scss
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,13 @@ $hmrc-transition-type: "all";
}

.hmrc-account-menu__link {
@include govuk-typography-responsive($size: 16);

box-sizing: border-box;
display: inline-block;
padding: 12px 16px 8px;
border-bottom: 4px solid transparent;
color: $hmrc-account-menu-grey-1;
font-size: 16px;
font-weight: 300;
line-height: 1.25;
text-decoration: none;
Expand Down

0 comments on commit 1eaf1a6

Please sign in to comment.