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

Rewrite ListEntry as ES Module #5377

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

tombye
Copy link
Contributor

@tombye tombye commented Feb 12, 2025

We want to migrate all of our legacy Javascript files to ESM, so this is the latest in the series
of conversions.

Rewrite follows the same conventions we previously used for FocusBanner, Collapsible checkboxes,
ColourPreview, FileUpload, and others:

https://github.com/alphagov/notifications-admin/pulls?q=is%3Apr+is%3Amerged+%27as+an+ES+Module%27

Added bonus: removes the use of jQuery.

In this PR we:

  • rewrite the module as ES Module
  • update the tests to be ES Module
  • remove old module JS file
  • remove old module from the legacy bundle build

As we want to migrate all of our legacy Javascript
files to ESM, this is a small part.

Rewrite follows the same convention we previously
used for FocusBanner, Collapsible checkboxes,
ColourPreview and others:

https://github.com/alphagov/notifications-admin/pulls?q=is%3Apr+is%3Amerged+%27as+an+ES+Module%27

This also includes the removal of all uses of
jQuery, as a bonus. Otherwise, the code should be
pretty much unchanged, just moved to the new
syntax.
Copy link
Contributor

@kr8n3r kr8n3r left a comment

Choose a reason for hiding this comment

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

great work!

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