Repository navigation
feat(themes): add theme inheritance and Canvas and Daybreak palettes - #8523
Open
somethingwithproof wants to merge 12 commits into
Open
somethingwithproof wants to merge 12 commits into
somethingwithproof wants to merge 12 commits into
Conversation
somethingwithproof
requested review from
cigamit
and removed request for
a team
October 26, 2026 23:43
somethingwithproof
added a commit
that referenced
this pull request
Oct 26, 2026
Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
somethingwithproof
added a commit
that referenced
this pull request
Oct 27, 2026
Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
somethingwithproof
force-pushed
the
feature/theme-token-skins
branch
from
October 27, 2026 00:08
2fde2a9 to
2779f8f
Compare
somethingwithproof
added a commit
that referenced
this pull request
Nov 2, 2026
Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
somethingwithproof
force-pushed
the
feature/theme-token-skins
branch
from
November 2, 2026 20:10
2779f8f to
5d1661f
Compare
github-actions Bot
pushed a commit
that referenced
this pull request
Nov 3, 2026
Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
github-actions
Bot
force-pushed
the
feature/theme-token-skins
branch
from
November 3, 2026 20:46
5d1661f to
cd550fe
Compare
github-actions Bot
pushed a commit
that referenced
this pull request
Nov 4, 2026
Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
github-actions
Bot
force-pushed
the
feature/theme-token-skins
branch
from
November 4, 2026 08:46
cd550fe to
ad46c4b
Compare
github-actions Bot
pushed a commit
that referenced
this pull request
Nov 4, 2026
Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
github-actions
Bot
force-pushed
the
feature/theme-token-skins
branch
from
November 4, 2026 20:46
fb55350 to
6eebd25
Compare
github-actions Bot
pushed a commit
that referenced
this pull request
Nov 5, 2026
Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
github-actions
Bot
force-pushed
the
feature/theme-token-skins
branch
from
November 5, 2026 08:45
6eebd25 to
8dfd5bb
Compare
github-actions Bot
pushed a commit
that referenced
this pull request
Nov 6, 2026
Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
github-actions
Bot
force-pushed
the
feature/theme-token-skins
branch
from
November 6, 2026 08:45
8dfd5bb to
b67b597
Compare
somethingwithproof
added a commit
that referenced
this pull request
Nov 9, 2026
Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
somethingwithproof
force-pushed
the
feature/theme-token-skins
branch
from
November 9, 2026 08:02
9783f4f to
98dfa0c
Compare
somethingwithproof
added a commit
that referenced
this pull request
Nov 12, 2026
Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
somethingwithproof
force-pushed
the
feature/theme-token-skins
branch
from
November 12, 2026 07:51
f7e42a6 to
db94c62
Compare
github-actions Bot
pushed a commit
that referenced
this pull request
Nov 16, 2026
Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
github-actions
Bot
force-pushed
the
feature/theme-token-skins
branch
from
November 16, 2026 08:58
a915fb6 to
631876d
Compare
github-actions Bot
pushed a commit
that referenced
this pull request
Nov 16, 2026
Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
github-actions
Bot
force-pushed
the
feature/theme-token-skins
branch
from
November 16, 2026 20:49
631876d to
23390e6
Compare
somethingwithproof
added a commit
that referenced
this pull request
Nov 17, 2026
Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
somethingwithproof
force-pushed
the
feature/theme-token-skins
branch
from
November 17, 2026 21:52
23390e6 to
eda73cf
Compare
somethingwithproof
added a commit
that referenced
this pull request
Nov 19, 2026
Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
somethingwithproof
force-pushed
the
feature/theme-token-skins
branch
from
November 19, 2026 09:27
388f6d4 to
602a515
Compare
github-actions Bot
pushed a commit
that referenced
this pull request
Nov 19, 2026
Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
github-actions
Bot
force-pushed
the
feature/theme-token-skins
branch
from
November 19, 2026 20:50
ccc4745 to
0cb8ed4
Compare
somethingwithproof
added a commit
that referenced
this pull request
Nov 25, 2026
Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
somethingwithproof
force-pushed
the
feature/theme-token-skins
branch
from
November 25, 2026 08:03
c6e63e6 to
5d022cd
Compare
github-actions Bot
pushed a commit
that referenced
this pull request
Nov 25, 2026
Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
github-actions
Bot
force-pushed
the
feature/theme-token-skins
branch
from
November 25, 2026 20:49
5d022cd to
ce54838
Compare
A theme directory with a parent file now falls back to that parent for any file it does not ship, so a palette variant only needs its own colors, main.css and rrdtheme.php. Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
Each is a midwinter child that ships only its light and dark colors, fonts and graph colors, and includes the parent's rrdtheme.php for fonts and borders. Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
Loads each palette theme's real import chain and asserts its color scheme, body text contrast and font stacks, and runs in the theme correctness job so the new stylesheets count toward changed-line coverage. Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
Loads each rrdtheme.php in-process and requires rrdtool hex colors with matching keys across the base, light and dark sets, since a malformed value breaks every graph drawn in that theme. Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
Chromium reports no used range for an @import rule, so the canvas and daybreak main.css imports could never be covered and held the changed CSS lines at 97.9%, below the 100% gate the theme stack sets. An added @import now counts when the same browser session loaded both the importing file and the imported sheet. Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
Canvas and Daybreak import midwinter/main.css with its md5 as a cache buster, and midwinter/update_hash.php never rewrites another theme's imports. Any later change to the parent leaves browsers on the old sheet without a failing check. The new test recomputes every import hash and checks that main.css and rrdtheme.php load the theme named in the parent file, which the READMEs now describe. Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
The changed-code coverage job runs only its listed native fixtures and browser specs. None of them loaded the Canvas or Daybreak stylesheets or called the theme inheritance helpers, so every changed theme line and the new lib/functions.php code read as uncovered, although the Pest and theme specs assert them. Add a ThemeInheritanceMatrix fixture that runs the checked-in get_include_relpath(), get_theme_candidate_paths(), get_theme_parent() and get_theme_paths() against a private theme tree, covering the child copy, parent fallback, single-level, theme-root and invalid-parent cases, and loads each palette theme's index.php and rrdtheme.php; a Pest test runs the fixture so it cannot drift from the suite. Run the theme correctness, cleanup and palette specs in the same job with CACTI_THEME_COVERAGE set so they record stylesheet coverage. Return the candidate paths on one line: Xdebug attributes a multi-line array return to its elements, and the report counts the bare "return [" line as an unexecuted statement. Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
Selectmenu and autocomplete paint the highlighted item with midwinter's .ui-menu .ui-state-active rule, which puts --text-color-lighter on --background-active-section. Canvas dark set that background to Primer's #1F6FEB, leaving the item text at 4.26:1. Darken it to #1A65DB (4.91:1, and 5.35:1 for the white text on selected navigation items) and test the highlighted item in both dark palettes. Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
Plugins pick per-theme stylesheets by the exact name get_selected_theme() returns, so Canvas and Daybreak users lose a plugin's midwinter.css. get_theme_chain() returns the theme followed by its parent, for example ['canvas', 'midwinter'], reusing get_theme_parent(), so a plugin can try each name in order. get_selected_theme() is unchanged. A theme name that is not a plain directory name yields an empty list, since callers build paths from it. Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
github-actions
Bot
force-pushed
the
feature/theme-token-skins
branch
from
November 26, 2026 08:51
ce54838 to
5b508b7
Compare
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



A theme can now name a parent in a
parentfile and ship only what differs.get_theme_paths()falls back to the parent's copy of any file the child does not provide, so nothing loads twice. The parent name must be a lowercase directory name with its ownmain.css, cannot be the theme itself, and only one level is followed. Each child still shipsmain.css,rrdtheme.phpandindex.php, sois_valid_theme()andcacti_validate_theme()are unchanged.Canvas and Daybreak are the first children of Midwinter. Each one is a color and font token set with light and dark modes plus matching RRDtool colors, and inherits Midwinter's layout, scripts and graph fonts. Canvas follows GitHub Primer's functional colors (MIT, credited in its README), and Daybreak pairs a bright primary palette with a near-black dark mode and an amber accent.
Validation: every text and background pair in the new palettes meets 4.5:1. The new palette spec checks color scheme, body text contrast and font stacks for each theme in both modes, and runs in the theme correctness job; changed CSS line coverage is 97.9% locally. A new test loads every theme's
rrdtheme.phpand rejects invalid RRDtool colors. Inheritance tests cover child precedence, parent fallback and rejected parent names (2 of 9 fail against the old resolver). Ui Pest suite (287), PHPStan and PHP CS Fixer pass.Bundled fonts follow in #8524. No 1.2.x backport.
Plugin authors:
get_selected_theme()still returns the theme name alone, so a plugin that loadscss/<theme>.cssfinds nothing for Canvas or Daybreak. Useget_theme_chain(), which returns the selected theme followed by its parent (for example['canvas', 'midwinter']), and load the first stylesheet that exists:Inheritance is a single level, so the list holds at most two names. An invalid theme name returns an empty list. Monitor, Thold, MacTrack, QuickTree, IntroPage, ServCheck, Syslog, APCUPSD and HMIB ship a
midwinter.cssand need this change to style Canvas and Daybreak.