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

PLATUI-3352: patch accessible autocomplete #430

Merged
merged 4 commits into from
Jan 7, 2025
Merged

Conversation

oscarduignan
Copy link
Contributor

@oscarduignan oscarduignan commented Dec 20, 2024

also swaps to use playwright for backstopjs

because we needed to udpate playwright and the latest version was timing out a lot when using puppeteer

playwright already swapped in separately

@@ -27,6 +27,9 @@
"rules": {
"import/prefer-default-export": "off"
},
"parserOptions": {
"ecmaVersion": "latest"
},
"overrides": [
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think new stuff will still be transpiled away by babel, but eslint would reject using new (well supported) stuff before this - this lets us use it - would be good to review how we are bundling stuff with babel/rollup/gulp to more closely match govuk-frontend as a default so we aren't reinventing stuff if we consider them a safe default (future stuff)

@@ -43,4 +43,4 @@ backstop_data/html_report/*

webjar/
webjar-dist/

core
Copy link
Contributor Author

Choose a reason for hiding this comment

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

when I run backstop this core file gets generated? some artifact of docker

.npmrc Outdated
@@ -1,2 +1 @@
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1
Copy link
Contributor Author

Choose a reason for hiding this comment

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

now using playwright

@@ -1,3 +1,3 @@
module.exports = async (page, scenario, vp) => {
await require('./loadCookies')(page, scenario);
// await require('./loadCookies')(page, scenario);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

not sure what this was used for, should be removed

@oscarduignan
Copy link
Contributor Author

oscarduignan commented Dec 20, 2024

will finish this off on monday, just pushing because I want to see if playwright runs ok in build or if it fails because it's blocked - if so then we need to get it unblocked / or figure out how to get it from artifactory

worked ok, just had to run playwright install first - can ignore the errors about deps missing as we don't use the things those deps are for - the slight "eh" now from this is that it means we are now downloading playwright binaries and puppeteer binaries, and playwright is installing more than we need (edge and firefox)

@oscarduignan oscarduignan force-pushed the PLATUI-3352-add-fix branch 4 times, most recently from 74564db to 4a48ba0 Compare December 20, 2024 15:37
@oscarduignan oscarduignan force-pushed the PLATUI-3352-integrate-fixes-from-adams-polyfill branch from 2bf9f07 to 96a7a94 Compare January 6, 2025 14:34
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I tried a few small css tweaks to fix this case, but I couldn't get anything that I was happy with that wouldn't possibly break other stuff so have left fixing this out for now - if someone has increased their base font size then the position of the dropdown arrow won't be centered

selectElement.value = '';
const chosenOptionOrCurrentValue = (typeof chosenOption !== 'undefined')
? chosenOption
: document.getElementById(autocompleteId)?.value;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

just to double check, I looked at the compiled output and ?. is not passed through, so won't be any compatibility issues by using it here

@oscarduignan oscarduignan marked this pull request as ready for review January 6, 2025 16:30
PatrykRudnicki
PatrykRudnicki previously approved these changes Jan 7, 2025
Copy link

@PatrykRudnicki PatrykRudnicki left a comment

Choose a reason for hiding this comment

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

LGTM

Base automatically changed from PLATUI-3352-integrate-fixes-from-adams-polyfill to main January 7, 2025 13:30
@oscarduignan oscarduignan dismissed PatrykRudnicki’s stale review January 7, 2025 13:30

The base branch was changed.

Copy link
Contributor

@TimothyFothergill TimothyFothergill left a comment

Choose a reason for hiding this comment

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

lgtm

@oscarduignan oscarduignan merged commit 8bf6b9d into main Jan 7, 2025
1 check passed
@oscarduignan oscarduignan deleted the PLATUI-3352-add-fix branch January 7, 2025 14:39
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.

3 participants