Skip to content

feat: start removing jquery usages#19850

Merged
nijel merged 2 commits into
WeblateOrg:mainfrom
KarenKonou:feat-remove-jquery-p1
Jun 1, 2026
Merged

feat: start removing jquery usages#19850
nijel merged 2 commits into
WeblateOrg:mainfrom
KarenKonou:feat-remove-jquery-p1

Conversation

@KarenKonou
Copy link
Copy Markdown
Member

for #19767

@argos-ci
Copy link
Copy Markdown

argos-ci Bot commented Jun 1, 2026

The latest updates on your projects. Learn more about Argos notifications ↗︎

Build Status Details Updated (UTC)
default (Inspect) ⚠️ Changes detected (Review) 10 changed Jun 1, 2026, 12:22 PM

@KarenKonou KarenKonou marked this pull request as ready for review June 1, 2026 11:16
@nijel nijel requested a review from Copilot June 1, 2026 11:20
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.

Comment thread weblate/static/js/accounts/profile/index.js
Comment thread weblate/static/js/accounts/profile/index.js
@nijel nijel enabled auto-merge (squash) June 1, 2026 11:47
@nijel
Copy link
Copy Markdown
Member

nijel commented Jun 1, 2026

Scheduled for merge, thanks for your contribution!

@nijel nijel self-assigned this Jun 1, 2026
@nijel nijel added this to the 2026.7 milestone Jun 1, 2026
@nijel nijel merged commit 5991e0c into WeblateOrg:main Jun 1, 2026
28 of 29 checks passed
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.

3 participants