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

[NM-84] Remove AGYW #1037

Merged
merged 10 commits into from
Nov 22, 2024
Merged

[NM-84] Remove AGYW #1037

merged 10 commits into from
Nov 22, 2024

Conversation

M-Kusumgar
Copy link
Contributor

@M-Kusumgar M-Kusumgar commented Nov 20, 2024

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 the downloadPostConfig you can just write one of the existing ones like "coarse-output", it should be about 6 lines of change (3 in downloadConfig.ts and 3 in locals if you want all the translations) to add a fully working new button

Copy link

Remove AGYW

@M-Kusumgar M-Kusumgar changed the base branch from main to nm-82 November 20, 2024 20:44
@M-Kusumgar M-Kusumgar changed the base branch from nm-82 to main November 20, 2024 22:02
@M-Kusumgar M-Kusumgar changed the base branch from main to nm-82 November 20, 2024 22:02
@@ -1,12 +1,10 @@
const urlParams = new URLSearchParams(window.location.search);
const urlParams = new URLSearchParams(globalThis.location?.search);
Copy link
Contributor Author

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

Copy link
Collaborator

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)

Copy link
Collaborator

@r-ash r-ash left a 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);
Copy link
Collaborator

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)

@r-ash r-ash changed the base branch from nm-82 to main November 21, 2024 21:38
@r-ash r-ash merged commit 579f8e4 into main Nov 22, 2024
8 of 9 checks passed
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.

2 participants