-
Notifications
You must be signed in to change notification settings - Fork 2
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
[NM-84] Remove AGYW #1037
[NM-84] Remove AGYW #1037
Conversation
@@ -1,12 +1,10 @@ | |||
const urlParams = new URLSearchParams(window.location.search); | |||
const urlParams = new URLSearchParams(globalThis.location?.search); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
playwright now loads this code because we import in the DownloadType
into a playwright file, however it runs in a "node" environment not a browser env which means theres no window
object. globalThis
object is just the global this object so in a browser it is window
and in a "node" env its just the global
object, which means we can use this with playwright
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(Can you stick that in a comment above, I'll definitely forget about this)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great, though let's leave open until we merge #1036
@@ -1,12 +1,10 @@ | |||
const urlParams = new URLSearchParams(window.location.search); | |||
const urlParams = new URLSearchParams(globalThis.location?.search); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(Can you stick that in a comment above, I'll definitely forget about this)
Description
this was a bigger diff because AGYW has a switch associated with it and also it doesnt have adr metadata support which means i had to put some if statements with it, but the diff would be even smaller when we remove buttons.
to test out how easy adding a button is (given the adr endpoint) you can just add a new value to the enum and follow the typescript errors, for the
url
in thedownloadPostConfig
you can just write one of the existing ones like"coarse-output"
, it should be about 6 lines of change (3 indownloadConfig.ts
and 3 in locals if you want all the translations) to add a fully working new button