Make ModalDialog follow the shared themes of wicket-extensions

Open
#1,645 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
63/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
css, java
Domain
frontend

Research direction

Start with ajax/markup/html/modal/theme/theme.css and compare how the shared themes used by DynamicDataTable set their theme properties. Then find the modal dialog example and use its theme drop-down as a reference. Done means the dialog and its optional header, body, and footer follow the shared theme properties, retain their current appearance without a theme, and require no inline styles.

Written by the indexing model from the issue text.

Description

Part of #1639.

ModalDialog's default look comes from its DefaultTheme behavior (ajax/markup/html/modal/theme/theme.css): a dimmed overlay, a white dialog with a shadow, and nothing for a title bar or buttons, which every application styles itself. A page using the shared themes of #1638 (DynamicDataTable, ProgressBar, CollapsiblePanel, FloatingPanel) therefore shows a modal dialog that ignores the theme: white on a dark theme, with the application's own colors for its header.

Proposal:

  • theme.css reads the theme properties, with the current colors as fallbacks: the overlay dims with --wicket-theme-veil, the dialog takes --wicket-theme-surface, --wicket-theme-text and --wicket-theme-border, and its color scheme follows --wicket-theme-color-scheme, so form controls inside a dark-themed dialog are dark too.
  • Optional classes for the usual parts of a dialog (a header in the theme's primary colors, like a table header or the title bar of a FloatingPanel, a body and a footer), so a dialog content panel gets the themed look by using them, without CSS of its own.
  • As for the other themed components: the properties are only set inside a theme class, so an application that does not use a theme sees no change, and no inline style is needed, so it keeps working under a strict Content Security Policy.
  • The modal dialog example gets a theme drop-down, like the DynamicDataTable example.
Dominant language
Java
Stars
800
Forks
437
Avg merge
21h 36m
Merged PRs (30d)
167

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from apache/wicket

All issues in apache/wicket

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.