wrolpi/app/src/components
Roland 2ee81fae14
ui: media filtering is a per-theme setting, not a night-mode hardcode
Filtering media was keyed on `data-theme="night"`, which made it a property of
the theme that no user could turn off.  Some people want their media tinted to
match the interface; some want to see the actual image.

A theme now declares a filter and whether it starts on, and the user decides:

  night   night-red    on by default.  An unfiltered thumbnail undoes dark
                       adaptation, which is the whole point of the mode.
  amber   amber-mono   off by default.  Amber is a look, not a night-vision
                       aid, so media keeps its real colors until asked for.
  light   -            no filter offered, so no toggle is shown.
  dark    -

The choice is stored per theme, so wanting amber's tint says nothing about
wanting night's.  The toggle lives in the theme picker, which puts it on the
Settings page and in the gallery at once.

Mechanically the rules now key on a `data-media-filter` attribute rather than
`data-theme`: a rule keyed on the theme could not be turned off.  index.html
stamps that attribute before first paint alongside data-theme -- without it,
night mode paints a screen of unfiltered thumbnails while the bundle arrives
over a hotspot, costing the user the adaptation the theme exists to protect.
Tests cover both the attribute rule and the fact that the inline script's
duplicated ids and defaults still agree with names.ts.

The amber matrix is the same luminance collapse tinted to #ff9500 (red full,
green 0.584, blue zero) with a gentler gamma than night's: amber carries far
more luminance and clips to a flat wash otherwise.

The gallery gains a Media filtering section showing the WROLPi logo filtered,
beside an unfiltered copy that opts out with `night-unfiltered`.  That copy is
behind a click on purpose -- an unfiltered image is a bright patch, and night
mode should not spring one on someone reading in the dark.

ui-design.md gains the media filtering contract it never got in Phase 0,
including the note that a Phase 3 custom theme names an existing filter id and
cannot ship its own matrix, since that would be code rather than data.
2026-08-05 18:34:47 -06:00
..
admin ui: migrate the extension pages and Configs; five components they needed 2026-08-05 18:34:46 -06:00
calculators Antenna calculator: harden wavelength/MHz input handlers. 2026-07-15 19:57:48 -06:00
collections Consolidating deletion endpoints. 2026-05-03 19:14:30 -06:00
inventory Focusing on lone input when opening modals. 2026-07-06 15:35:23 -06:00
ui ui: media filtering is a per-theme setting, not a night-mode hardcode 2026-08-05 18:34:47 -06:00
AddToPlaylist.js Focusing on lone input when opening modals. 2026-07-06 15:35:23 -06:00
Apps.js Moving OTP and Vin decoder to calculators to save Navbar space. Reworking calculators to purpose groups, and adding colors. 2026-07-01 18:48:06 -06:00
Archive.js app: handle form fetch failures without unhandled rejection 2026-07-16 19:40:28 -06:00
ArchivePreview.js Showing preview of zip file contents, allowing user to download individual files without full extraction. 2026-03-15 12:58:40 -06:00
BulkTagModal.js Converting Theme.js to typescript so we can use shorthands like Card.Icon. 2025-12-07 12:41:10 -07:00
BulkTagModal.test.js Converting Theme.js to typescript so we can use shorthands like Card.Icon. 2025-12-07 12:41:10 -07:00
Calculators.js Moving OTP and Vin decoder to calculators to save Navbar space. Reworking calculators to purpose groups, and adding colors. 2026-07-01 18:48:06 -06:00
CbzViewer.js Reworking file preview buttons to be consistent across screens. 2026-04-15 13:18:45 -06:00
Channels.cy.js Moving form fields. 2025-12-06 15:11:37 -07:00
Channels.js Add ordered collections (playlists): polymorphic items + item API (#475) 2026-06-11 19:46:34 -06:00
Common.js ui: theme picker in Settings, and ship the component gallery 2026-08-05 18:34:45 -06:00
Common.test.js Fixing error where focusing on an empty Directory search would throw an error. 2026-06-24 15:23:32 -06:00
DatesSelector.js Consolidate search options into a single Filter modal (#497) 2026-06-23 19:49:25 -06:00
DesktopToggle.test.js controller: Desktop start/stop toggle; rename hotspot/bluetooth actions to what they do 2026-07-29 15:19:36 -06:00
Docs.js Search: fast ABC mode by default, opt-in deep search 2026-07-03 10:32:16 -06:00
DomainEditPage.test.js app: handle form fetch failures without unhandled rejection 2026-07-16 19:40:28 -06:00
DomainsPage.test.js Reformatting code. 2025-12-06 15:11:37 -07:00
DomainTagging.test.js Reformatting code. 2025-12-06 15:11:37 -07:00
DonatePage.js Adding noreferrer to all external links. 2026-02-15 17:26:36 -07:00
Download.cy.js Adding edit form for Scrape downloader. 2024-12-03 12:44:38 -07:00
Download.js Archives can be compressed (SingleFileZ self-extracting HTML) (#477) 2026-06-11 19:46:35 -06:00
Download.test.js Reformatting code. 2025-12-06 15:11:37 -07:00
ErrorBoundary.js Adding Upload button to the FileBrowser. Adding ErrorBoundaries to prevent entire app from crashing. 2025-12-25 09:14:00 -07:00
FileBrowser.js Focusing on lone input when opening modals. 2026-07-06 15:35:23 -06:00
FileBrowser.test.js File Browser: add filter input and collapse-all button 2026-07-03 11:31:41 -06:00
FilePreview.js Open in Slicer: launch slicer programmatically from dropdown items. 2026-07-05 13:31:40 -06:00
FilePreview.test.js File preview: Open in Slicer button for STL/3MF files. 2026-07-05 13:31:40 -06:00
Files.js Module pages: always show the deep-search reminder during fast searches 2026-07-03 10:50:57 -06:00
Flasher.js Flasher: show connect error next to the detect button too 2026-07-02 17:26:45 -06:00
Flasher.test.js Address Greptile review: fix chip-id map (17=C5, 18=P4) and drop stale mock 2026-07-02 17:26:37 -06:00
Headline.js Remove stale Postgres references after SQLite cutover. 2026-07-18 13:28:54 -06:00
HelpModal.js Adding videos page hotkeys to help play and navigate videos. Adding f hotkey for all local search fields (channel/domain/etc). Focusing when opening cookie modals. 2026-02-23 17:29:09 -07:00
KeyboardShortcutsProvider.js Adding fullscreen keyboard shortcut. 2026-03-27 17:59:36 -06:00
Map.js Add ordered collections (playlists): polymorphic items + item API (#475) 2026-06-11 19:46:34 -06:00
MapSearchView.js Map search added to global search. Preview cards are displayed for all results in new Map tab. 2026-04-13 12:17:08 -06:00
MapViewer.js Map search added to global search. Preview cards are displayed for all results in new Map tab. 2026-04-13 12:17:08 -06:00
Nav.js Moving OTP and Vin decoder to calculators to save Navbar space. Reworking calculators to purpose groups, and adding colors. 2026-07-01 18:48:06 -06:00
otp.js Move One-Time Pad encryption to the browser (#479) 2026-06-13 13:52:34 -06:00
otp.test.js Move One-Time Pad encryption to the browser (#479) 2026-06-13 13:52:34 -06:00
Placeholder.js Configs are displayed in new ConfigsPage under Admin. 2024-10-16 18:56:45 -06:00
Playlists.js Playlists can be tagged on creation. Playlist destination is no longer empty by default. 2026-06-11 19:46:35 -06:00
Playlists.test.js Add ordered collections (playlists): polymorphic items + item API (#475) 2026-06-11 19:46:34 -06:00
Search.js Search: fast ABC mode by default, opt-in deep search 2026-07-03 10:32:16 -06:00
SearchFilterModal.test.js Search: fast ABC mode by default, opt-in deep search 2026-07-03 10:32:16 -06:00
Share.js Converting Theme.js to typescript so we can use shorthands like Card.Icon. 2025-12-07 12:41:10 -07:00
ShortcutHint.js Displaying cmd+k/ctrl+k global search keyboard shortcut suggestion. 2026-02-23 16:07:22 -07:00
SortableTable.js Adding default 'No results' row when sortable table has no rows. 2024-01-01 17:10:51 -07:00
Tables.js Reworking empty-states for all pages and tables. Removing custom isEmpty in favor of lodash. 2023-01-04 09:14:33 -07:00
TaggedDeleteConfirmModal.js Models like Archive/Video/Doc can be deleted, even if they are tagged. User is shown a warning and must confirm deletion of tagged files. 2026-05-03 19:14:15 -06:00
TaggedDeleteConfirmModal.test.js Models like Archive/Video/Doc can be deleted, even if they are tagged. User is shown a warning and must confirm deletion of tagged files. 2026-05-03 19:14:15 -06:00
Theme.test.js Fix "node.contains is not a function" crash on Modal/Popup triggers 2026-07-20 11:43:14 -06:00
Theme.tsx ui: media filtering is a per-theme setting, not a night-mode hardcode 2026-08-05 18:34:47 -06:00
ThemeProvider.test.js ui: media filtering is a per-theme setting, not a night-mode hardcode 2026-08-05 18:34:47 -06:00
ThemeSamplePage.js ui: media filtering is a per-theme setting, not a night-mode hardcode 2026-08-05 18:34:47 -06:00
Upload.js Reformatting code. 2025-12-06 15:11:37 -07:00
Vars.js Restore "Most Views" download order 2026-07-07 16:34:50 -06:00
VideoPlayer.js videos: address review — tighten auto-caption detection 2026-07-16 18:29:18 -06:00
VideoPlayer.test.js videos: address review — tighten auto-caption detection 2026-07-16 18:29:18 -06:00
Videos.js Search: fast ABC mode by default, opt-in deep search 2026-07-03 10:32:16 -06:00
VncToggle.test.js controller: VNC toggle, gated on the Desktop running 2026-07-29 18:10:05 -06:00
Zim.js Fixing bug where zim articles were not aligned in modals. 2026-06-11 19:46:34 -06:00