feat: start removing jquery usages#19850
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Argos notifications ↗︎
|
Contributor
There was a problem hiding this comment.
Pull request overview
This PR begins migrating Weblate’s frontend code away from jQuery (per #19767) by rewriting several small UI behaviors using native DOM APIs and Bootstrap’s JS APIs, reducing reliance on jQuery for incremental bundle simplification.
Changes:
- Replaced jQuery DOM-ready and selector usage with
DOMContentLoaded,getElementById,querySelector(All), and DOM property/attribute APIs. - Updated the keyboard shortcuts modal to use
bootstrap.Modal.getOrCreateInstance(...).show()instead of the jQuery modal plugin. - Removed jQuery DOM mutation / iteration patterns in widget configuration and screenshot clipboard paste UI.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| weblate/static/js/widgets.js | Migrates widgets page interactions (preview, embed code, extra params) from jQuery to native DOM. |
| weblate/static/js/screenshots/clipboard-paste.js | Migrates clipboard-paste UI from jQuery to native DOM and safer message rendering. |
| weblate/static/js/keyboard-shortcuts.js | Migrates modal opening behavior from jQuery to Bootstrap’s JS API. |
| weblate/static/js/accounts/profile/index.js | Migrates watched-project link handling from jQuery to native DOM + MutationObserver. |
| weblate/static/editor/browse.js | Migrates next/prev hotkey navigation from jQuery to native DOM. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Member
|
Scheduled for merge, thanks for your contribution! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
for #19767