feat(lib): Remove jQuery support#3498
Conversation
✅ Deploy Preview for boosted ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
87d0704 to
10e744e
Compare
There was a problem hiding this comment.
Pull request overview
Removes all jQuery integration/support from the OUDS Web JavaScript API and documentation, aligning with upstream Bootstrap’s direction and reducing dependency/bundle surface.
Changes:
- Removed jQuery plugin bridge (
defineJQueryPlugin,* .jQueryInterface), jQuery event integration, and jQuery-specific element handling from core JS. - Deleted/updated unit tests and Karma config that previously validated jQuery behavior.
- Removed jQuery references from docs and dropped
jqueryfrom tooling/dependencies (plus updated bundlewatch thresholds).
Reviewed changes
Copilot reviewed 42 out of 43 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| site/src/content/docs/getting-started/javascript.mdx | Removes “Optionally using jQuery” documentation section. |
| site/src/content/docs/foundation/reboot.mdx | Removes jQuery compatibility note for [hidden]. |
| package.json | Removes jquery devDependency and js-test-jquery script path. |
| js/tests/unit/util/index.spec.js | Removes Util tests for jQuery object detection/unwrap and getjQuery. |
| js/tests/unit/tooltip.spec.js | Removes jQuery-related tooltip tests and fixture helper import. |
| js/tests/unit/toast.spec.js | Removes jQueryInterface tests and fixture helper import. |
| js/tests/unit/tab.spec.js | Removes jQueryInterface tests and fixture helper import. |
| js/tests/unit/scrollspy.spec.js | Removes jQueryInterface tests and fixture helper import. |
| js/tests/unit/quantity-selector.spec.js | Removes jQueryInterface tests and fixture helper import. |
| js/tests/unit/popover.spec.js | Removes jQueryInterface tests and fixture helper import. |
| js/tests/unit/orange-navbar.spec.js | Removes jQueryInterface tests and fixture helper import. |
| js/tests/unit/offcanvas.spec.js | Removes jQueryInterface tests and fixture helper import. |
| js/tests/unit/modal.spec.js | Removes jQueryInterface tests and fixture helper import. |
| js/tests/unit/jquery.spec.js | Deletes dedicated jQuery integration test suite. |
| js/tests/unit/dropdown.spec.js | Removes jQuery-related tests and fixture helper import. |
| js/tests/unit/collapse.spec.js | Removes jQuery parent-config test and jQueryInterface tests; updates wording. |
| js/tests/unit/carousel.spec.js | Removes jQueryInterface tests and fixture helper import. |
| js/tests/unit/button.spec.js | Removes jQueryInterface tests and fixture helper import. |
| js/tests/unit/base-component.spec.js | Removes jQuery object acceptance from BaseComponent tests. |
| js/tests/unit/alert.spec.js | Removes jQueryInterface tests and fixture helper import. |
| js/tests/karma.conf.js | Removes JQUERY-only test mode; runs all unit specs normally. |
| js/tests/helpers/fixture.js | Removes jQueryMock helper. |
| js/src/util/index.js | Removes jQuery element unwrapping, getjQuery, and defineJQueryPlugin export. |
| js/src/tooltip.js | Drops jQuery bridge (jQueryInterface + defineJQueryPlugin). |
| js/src/toast.js | Drops jQuery bridge (jQueryInterface + defineJQueryPlugin). |
| js/src/tab.js | Drops jQuery bridge (jQueryInterface + defineJQueryPlugin). |
| js/src/scrollspy.js | Drops jQuery bridge (jQueryInterface + defineJQueryPlugin). |
| js/src/quantity-selector.js | Drops jQuery bridge (jQueryInterface + defineJQueryPlugin). |
| js/src/popover.js | Drops jQuery bridge (jQueryInterface + defineJQueryPlugin). |
| js/src/orange-navbar.js | Drops jQuery bridge (jQueryInterface + defineJQueryPlugin). |
| js/src/offcanvas.js | Drops jQuery bridge (jQueryInterface + defineJQueryPlugin). |
| js/src/modal.js | Drops jQuery bridge (jQueryInterface + defineJQueryPlugin). |
| js/src/dropdown.js | Drops jQuery bridge (jQueryInterface + defineJQueryPlugin). |
| js/src/dom/event-handler.js | Removes jQuery-trigger integration; always dispatches native events only. |
| js/src/collapse.js | Drops jQuery bridge (jQueryInterface + defineJQueryPlugin). |
| js/src/carousel.js | Drops jQuery bridge (jQueryInterface + defineJQueryPlugin). |
| js/src/button.js | Drops jQuery bridge (jQueryInterface + defineJQueryPlugin). |
| js/src/alert.js | Drops jQuery bridge (jQueryInterface + defineJQueryPlugin). |
| .github/dependabot.yml | Removes jquery from ignored dependency list. |
| .bundlewatch.config.json | Updates bundle size thresholds to new expected outputs. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
MaxLardenois
left a comment
There was a problem hiding this comment.
Absolutely love deleting code 🧹
Just a non blocking question
| @@ -439,8 +439,4 @@ HTML5 adds [a new global attribute named `[hidden]`](https://developer.mozilla.o | |||
|
|
|||
| <Code lang="html" buttonLabel="hidden attribute" code={`<input type="text" hidden />`} /> | |||
There was a problem hiding this comment.
Two questions:
- should we remove 'HTML5"? it's quite old now so proabably no need to be specific on the version
- I did not know about this attribute, should we use it more extensively?
There was a problem hiding this comment.
We are never too safe, let people remove it on their side if they want, but I think we can keep it.
The hidden attribute ? I think it's not much used cause there isn't much use cases. But yeah, keep it in mind. We might want to display some new attributes such as inert and others that we don't have ?
|
On hold until the study about dual mode is done. |
|
Add a line about it in the dual mode |
Types of change
Related issues
NA
Context & Motivation
Following BS6 with twbs/bootstrap#41682, we remove jQuery support, since almost no one uses it nowadays, to lighten our bundle and dependencies.
Description
Remove every reference to jquery in our doc and in our package.
Checklists
Checklist (for Core Team only)
Progression (for Core Team only)
ouds/mainfollowing conventional commitLive previews