Add an option to stop loading jQuery

Abierto
#6,778 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
20/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
javascript, jquery, php
Área
full-stack

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.
Lenguaje dominante
PHP
Estrellas
248
Forks
147
Merge medio
17 min
PR fusionados (30 d)
21

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de WoltLab/WCF

Todos los issues de WoltLab/WCF

Issues similares

Más issues de PHP

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.