Add an option to stop loading jQuery

オープン
#6,778 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
20/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
javascript, jquery, php
領域
full-stack

調査の方向性

Start by locating where headIncludeJavaScript.tpl and acp/templates/header.tpl are included and how the core decides which JavaScript assets to load per request. Then read the package-update search and cache paths, since the allowlist must be fetched, cached, refreshed, and fall back to the last known copy. Also identify how ACP options are registered and read, so the three-state setting can gate jQuery, jQuery UI, and plugin loading. Done means all three modes behave as described, including the fallback when no allowlist has ever been fetched.

索引モデルが issue の本文から書いたものです。

説明

Background

The core and all official WoltLab packages no longer depend on jQuery. It is still loaded on every request (headIncludeJavaScript.tpl, acp/templates/header.tpl), together with jQuery UI and its plugins, because third-party plugins may still rely on it. This adds download size and parse time, and it keeps legacy code paths from being removed.

Proposal

Add a new option that controls whether jQuery (including jQuery UI and its plugins) is loaded:

Value Behavior
Automatic (default) jQuery is only loaded if needed. It is skipped if every installed package is either an official WoltLab package or a third-party plugin on the allowlist. As soon as any other package is installed, jQuery is loaded.
Yes jQuery is always loaded.
No jQuery is never loaded. Plugins that still depend on it may break.
Allowlist of third-party plugins
  • The list of third-party plugins known to work without jQuery comes from the plugin store, so it can be updated without a new core release.
  • The list is cached locally and refreshed regularly, for example alongside the regular package update search. If the plugin store can't be reached, the last known list is used. If no list has ever been fetched, "automatic" falls back to loading jQuery.
主要言語
PHP
スター
248
フォーク
147
平均マージ
17分
マージ済み PR(30日)
21

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

WoltLab/WCF のほかの issue

WoltLab/WCF の issue をすべて見る

似ている issue

PHP の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。