Skip to content

Retire jQuery#4818

Open
frjo wants to merge 12 commits intomainfrom
maintenance/retire-jquery
Open

Retire jQuery#4818
frjo wants to merge 12 commits intomainfrom
maintenance/retire-jquery

Conversation

@frjo
Copy link
Copy Markdown
Member

@frjo frjo commented Apr 14, 2026

We only have a few scripts using jQuery so time to retire it and go full vanilla js.

This PR rebuilds the js part of the addressfield, merging all js in to a single file using modern vanilla js.

Also make strings in submission-form-copy.js translateble.

Test Steps

  • Make sure the addressfield works just as before.
  • Test submission copy functionality, it had some bugs that are fixed in the PR.
  • Test that form groups works just as before.
  • Test batch action status change where a determination is created.
  • Test invoice batch actions.

@frjo frjo force-pushed the maintenance/retire-jquery branch 2 times, most recently from 3b90f9f to 0f07a7d Compare April 14, 2026 08:43
@frjo frjo added Status: Needs testing Tickets that need testing/qa Type: Maintenance Type: Patch Mini change, used in release drafter Status: Needs dev testing 🧑‍💻 Tasks that should be tested by the dev team labels Apr 14, 2026
Copy link
Copy Markdown
Contributor

@wes-otf wes-otf left a comment

Choose a reason for hiding this comment

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

Small comment re: copy questions to clipboard

I was also only given an issue not populating specific required fields (mainly rich text) until I tried to submit after the preview. Fields like title & amount didn't let me make it to the preview without population which is what I expect of all required fields. Didn't dig too deep into what the issue was with that though.

All else seems to work pretty well though! bye bye jquery!!

Comment on lines +104 to +107
btnLabel: applicationForm.dataset.copyBtnLabel,
btnTitle: applicationForm.dataset.copyBtnTitle,
wordLimit: applicationForm.dataset.copyWordLimit,
selected: applicationForm.dataset.copySelected,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I don't think these are being properly set - I don't have any data attributes on my .application-form element and the copy button shows as an empty undefined button

Image

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

They are only set on applicationsubmission_form.html and not on application_base.html. Will fix that.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Done.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Test is being updated in a few minuts.

@frjo frjo force-pushed the maintenance/retire-jquery branch from 077b131 to 018c30a Compare April 16, 2026 18:58
@frjo
Copy link
Copy Markdown
Member Author

frjo commented Apr 17, 2026

I was also only given an issue not populating specific required fields (mainly rich text) until I tried to submit after the preview. Fields like title & amount didn't let me make it to the preview without population which is what I expect of all required fields.

Not sure I get this issue. Are the required field not working as they should in some way?

If you set SUBMISSION_PREVIEW_REQUIRED=False so users see a preview button they need to fill in all required fields before previewing. This does not change with this PR. Thinking about it we should perhaps add "formnovalidate" to the preview button as we do to the draft button.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Status: Needs dev testing 🧑‍💻 Tasks that should be tested by the dev team Status: Needs testing Tickets that need testing/qa Type: Maintenance Type: Patch Mini change, used in release drafter

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants