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

Port exit this page from 4.7 #3953

Merged
merged 2 commits into from
Jul 14, 2023
Merged

Port exit this page from 4.7 #3953

merged 2 commits into from
Jul 14, 2023

Conversation

owenatgov
Copy link
Contributor

Ports the exit this page component from the 4.7.0 release to main, including refactoring the js to ES2015 in line with #3771

Includes changes from the following PRs:

Additionally supersedes #3880

Fixes #3840

@owenatgov owenatgov requested a review from a team July 11, 2023 17:28
@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-pr-3953 July 11, 2023 17:29 Inactive
Copy link
Contributor

@colinrotherham colinrotherham left a comment

Choose a reason for hiding this comment

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

Nicely done @owenatgov

Few minor snags but nothing big at all. I think we'd best split out non-port changes (like renaming selector properties) unless it was for consistency with v5

packages/govuk-frontend/src/govuk/all.mjs Outdated Show resolved Hide resolved
it('navigates to the href of the button', async () => {
await goToComponent(page, 'exit-this-page')

const pathname = await page.$eval(buttonClass, el => el.getAttribute('href'))
Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for using Element APIs here versus HTMLAnchorElement.href

The const href pathname change makes good sense too

I know the compiler can be annoyingly pedantic 😣

/**
* Initialise component
*/
init () {
Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for moving this higher up 😊

exampleNames = Object.keys(await getExamples('exit-this-page'))
})

it('passes accessibility tests', async () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Fab work. Cheers for moving the accessibility tests into the new format 🙌

@owenatgov owenatgov force-pushed the port-exit-this-page-from-4.7 branch from 2720429 to e311884 Compare July 14, 2023 13:48
@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-pr-3953 July 14, 2023 13:48 Inactive
@owenatgov owenatgov requested a review from colinrotherham July 14, 2023 13:48
@owenatgov owenatgov force-pushed the port-exit-this-page-from-4.7 branch from e311884 to fbe9a4e Compare July 14, 2023 14:00
@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-pr-3953 July 14, 2023 14:01 Inactive
@owenatgov owenatgov force-pushed the port-exit-this-page-from-4.7 branch from fbe9a4e to 1eb79e7 Compare July 14, 2023 14:07
@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-pr-3953 July 14, 2023 14:07 Inactive
@owenatgov owenatgov force-pushed the port-exit-this-page-from-4.7 branch from 1eb79e7 to a97c54f Compare July 14, 2023 15:16
@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-pr-3953 July 14, 2023 15:25 Inactive
Copy link
Contributor

@colinrotherham colinrotherham left a comment

Choose a reason for hiding this comment

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

🚀

@owenatgov owenatgov merged commit 35f6f6a into main Jul 14, 2023
@owenatgov owenatgov deleted the port-exit-this-page-from-4.7 branch July 14, 2023 15:32
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.

Refactor Exit This Page to ES2015 classes for 5.0
3 participants