Conversation
Dark mode now uses Bootstrap's native data-bs-theme attribute instead of the parallel data-theme hook. Bootstrap themes its own components (inputs, placeholders, tables, dropdowns, modals), so most of the hand-written dark override block is replaced by theme tokens plus a few brand overrides. - Fix unreadable dark-mode search results header: Bootstrap does not darken the .table-secondary contextual variant, leaving light text on a light background, so its cells are now themed explicitly. - Fix dark-mode search input placeholder (was dark-on-dark) and map alerts onto Bootstrap's dark subtle palette instead of light strips. - Theme the health "refresh period" strip (was a hardcoded inline light blue). - Accessibility: associate the login labels with their inputs (for/id mismatch), label the search and tag inputs, and name the logout and branding links. - Markup: remove the duplicate id="menu" wrapper in the common layout.
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.
What this fixes
piler's web UI loads Bootstrap 5.3.3, but dark mode was built as a separate
[data-theme="dark"]attribute with about 260 lines of manual per-component overrides. That left several dark mode bugs and some accessibility problems..table-secondaryvariant, so the header showed light text on a light background.for="floatingInput"andfor="floatingPassword", which did not match the input ids.Changes
assets/js/dark-mode.jsnow toggles Bootstrap's nativedata-bs-themeattribute instead of the customdata-theme.assets/css/piler.cssis reduced to a small set of design tokens plus brand overrides, so Bootstrap themes its own components (inputs, placeholders, tables, dropdowns) from the--bs-*variables. Net change is about 83 lines removed..table-secondaryheader cells, map alerts onto Bootstrap's dark subtle palette, and replace the hardcoded inline health strip with a themed class.id="menu"wrapper incommon/layout.tpl, where the layout and the menu both emitted the same id.There are no PHP logic, configuration or schema changes. It uses the Bootstrap version already loaded by
config.php.in.Verification
Computed style checks in both themes, against WCAG AA:
Search results header: 16.35:1 in light, 10.87:1 in dark.
Search placeholder: 6.78:1 in light, 7.99:1 in dark.
The login fields now report
labels === ["Email address"], so the association is correct.Light and dark toggling was checked on login, search, health, users and message views, at desktop and phone widths.
Light mode values are unchanged.
Tested against piler 1.4.9. The
webui/tree is identical between thepiler-1.4.9tag andmaster.