Skip to content

Upgrade select2 to support jQuery v4#3768

Merged
Simrayz merged 3 commits intochore/upgrade-jquery-to-v4from
chore/upgrade-select2
Feb 10, 2026
Merged

Upgrade select2 to support jQuery v4#3768
Simrayz merged 3 commits intochore/upgrade-jquery-to-v4from
chore/upgrade-select2

Conversation

@Simrayz
Copy link
Copy Markdown
Contributor

@Simrayz Simrayz commented Feb 9, 2026

Scope and purpose

Follow-up to #3730.

Upgrade select2 to 4.1.0-rc.0 for native jQuery 4 support, removing the jquery-migrate shim. Update select2 CSS selectors for v4.1.0-rc.0.

Contributor Checklist

Every pull request should have this checklist filled out, no matter how small it is.
More information about contributing to NAV can be found in the
Hacker's guide to NAV.

  • Added a changelog fragment for towncrier
  • Added/amended tests for new/changed code
  • Added/changed documentation
  • Linted/formatted the code with ruff, easiest by using pre-commit
  • Wrote the commit message so that the first line continues the sentence "If applied, this commit will ...", starts with a capital letter, does not end with punctuation and is 50 characters or less long. See https://cbea.ms/git-commit/
  • Based this pull request on the correct upstream branch: For a patch/bugfix affecting the latest stable version, it should be based on that version's branch (<major>.<minor>.x). For a new feature or other additions, it should be based on master.
  • If applicable: Created new issues if this PR does not fix the issue completely/there is further work to be done
  • If it's not obvious from a linked issue, described how to interact with NAV in order for a reviewer to observe the effects of this change first-hand (commands, URLs, UI interactions)
  • If this results in changes in the UI: Added screenshots of the before and after
  • If this adds a new Python source code file: Added the boilerplate header to that file

@Simrayz Simrayz self-assigned this Feb 9, 2026
@Simrayz Simrayz added javascript dependencies Pull requests that update a dependency file nonews No news fragment is necessary for this PR (e.g. refactoring, cleanups, workflow/development changes) labels Feb 9, 2026
@Simrayz Simrayz requested a review from a team February 9, 2026 12:05
@github-actions
Copy link
Copy Markdown

github-actions bot commented Feb 9, 2026

Test results

    26 files      26 suites   45m 16s ⏱️
 2 732 tests  2 732 ✅ 0 💤 0 ❌
20 756 runs  20 756 ✅ 0 💤 0 ❌

Results for commit 734183c.

♻️ This comment has been updated with latest results.

@codecov
Copy link
Copy Markdown

codecov bot commented Feb 9, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 63.14%. Comparing base (3d5d759) to head (734183c).
⚠️ Report is 4 commits behind head on chore/upgrade-jquery-to-v4.

Additional details and impacted files
@@                      Coverage Diff                       @@
##           chore/upgrade-jquery-to-v4    #3768      +/-   ##
==============================================================
- Coverage                       63.18%   63.14%   -0.05%     
==============================================================
  Files                             615      615              
  Lines                           45507    45502       -5     
  Branches                           43       43              
==============================================================
- Hits                            28753    28731      -22     
- Misses                          16744    16761      +17     
  Partials                           10       10              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Simrayz Simrayz force-pushed the chore/upgrade-select2 branch from d9e3bff to d841aae Compare February 9, 2026 12:39
Copy link
Copy Markdown
Contributor

@johannaengland johannaengland left a comment

Choose a reason for hiding this comment

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

When I try to test the IPAM tool it does not load, please have a look at that 🙂

Patch the single jQuery 4 incompatibility ($.camelCase removal) with a
native String.replace equivalent. No other library depends on
jquery-migrate, so it can be fully removed.
Select2 4.1.0-rc.0 replaced aria-attribute selectors with BEM-style
class selectors for option states (selected, highlighted, disabled).
@Simrayz Simrayz force-pushed the chore/upgrade-select2 branch from d841aae to 734183c Compare February 10, 2026 14:35
@sonarqubecloud
Copy link
Copy Markdown

@Simrayz
Copy link
Copy Markdown
Contributor Author

Simrayz commented Feb 10, 2026

When I try to test the IPAM tool it does not load, please have a look at that 🙂

This bug was not related to this PR specifically, but part of the base upgrade-jquery branch. I fixed it in the base branch and rebased :) Just had to use d3 v7 (and some minor syntax updates)

@Simrayz Simrayz merged commit 5691430 into chore/upgrade-jquery-to-v4 Feb 10, 2026
20 checks passed
@Simrayz Simrayz deleted the chore/upgrade-select2 branch February 10, 2026 22:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file javascript nonews No news fragment is necessary for this PR (e.g. refactoring, cleanups, workflow/development changes)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants