Add color themes shared by the components of wicket-extensions

Abierto
#1,638 0 comentarios 0 reacciones 1 asignado Ver en GitHub

Los mantenedores suelen responder en 1 día

@reiern70 ya está trabajando en esto.

Desde el 2/10/2026.

Evaluación

Este issue todavía no se ha evaluado.

Descripción

The components of wicket-extensions each bring their own style sheet with their own hard-coded colors. An application that wants its tables, progress bars and panels to match its look has to override every style sheet separately, and has no way to give one part of a page a different look from another.

This proposes shared color themes, in a new package org.apache.wicket.extensions.theme:

  • Properties: the colors are defined once, as CSS custom properties named --wicket-theme-* (primary, primary-dark, on-primary, accent, text, surface, surface-alt, hover, selected, highlight, toolbar, border, progress, progress-dark, track, color-scheme). The style sheets of the components read them.
  • Themes: a theme is a CSS class setting the properties. Theme ships DEFAULT, BLUE, RED, GREY and GREEN; Theme.CSS is the style sheet defining them. An application defines a theme of its own as a CSS class setting the same properties.
  • ThemeBehavior: puts a theme's class on a component and contributes the style sheet. On the page, the theme applies to every themable component inside it; on a single component, only to that one. The theme comes from a model, so re-rendering the component switches it, for example via Ajax from a drop-down.
  • Form controls: --wicket-theme-color-scheme sets the color scheme of the text fields, selects and check boxes inside themed components, so they match the theme even on a page that declares color-scheme: light dark and is shown in dark mode.
  • Content Security Policy: themes are switched by CSS class only and need no inline style, so they work under a strict CSP.
  • Compatibility: components read the properties only inside a theme, so a component without a theme looks as it does without this change.

Components using it: the DynamicDataTable (header, rows, toolbars, resize handles), the ProgressBar (#1635) and the CollapsiblePanel (#1636). The examples get a theme drop-down on their pages.

Lenguaje dominante
Java
Estrellas
800
Forks
437
Merge medio
21 h 36 min
PR fusionados (30 d)
167

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 apache/wicket

Todos los issues de apache/wicket

Issues similares

Más issues de Java

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.