wrolpi/app/src/components/calculators
Roland 851485ef1b ui: Common.js and thirteen more files off Semantic
Phase 2, part 3.  Baseline 63 -> 50.

Common.js is the one that mattered: 51 files import it, so its Semantic usage
was propping up the rest of the migration.  Everything in it now comes from the
library -- Paginator, the two search inputs, DirectorySearch, TabLinks, the
toggles, the messages, APIButton, Breadcrumbs, SimpleAccordion, IframeViewer,
CardPoster, FileIcon, LoadStatistic, the theme menu, and the hotspot icons.

Also migrated: Placeholder, Apps, ArchivePreview, CbzViewer, AddToPlaylist,
TaggedDeleteConfirmModal, the collection edit/tag forms, and four inventory
components.

New in the library, all in the gallery and tested:

  SearchBox     Semantic's `<Search category>` with its grouped results shape
                kept, because four call sites already build it.  A real
                combobox rather than a div that listens for clicks.
  Pagination    Semantic's prop names; onPageChange gets the page number.
  TabBar        the strip only -- routing stays with the caller.
  IconStack     Semantic's IconGroup, named once for assistive technology.
  Table.HeaderCell sorted/onSort -- a real button carrying aria-sort.
  Button/IconButton translate Semantic's size names.

That last one is defensive: unmigrated callers still pass size='tiny', and
Mantine drops a size it does not recognise without a word, so the button
quietly renders at the wrong size.  Mapping here keeps the mixed state honest.

Three real bugs found and fixed on the way, none of them cosmetic:

  * `fileSuffixIconName` returned fourteen icon names the map did not have, so
    opening a folder with a PDF, a Word document or an archive in it logged an
    error and drew a fallback glyph.  All fourteen mapped, with a test that
    walks the mapper's own return values, and another asserting every mapped
    name resolves to a Tabler component that exists.
  * `Statistic` relied on Semantic's `Statistic.Group` for its spacing, so on
    the dashboard the load averages ran together into "1 MIN. LOAD5 MIN.
    LOAD15 MIN. LOAD".  It carries its own spacing now.
  * Semantic's inverted stylesheet colors every descendant of an inverted
    segment, so Toggle labels inherited #dddddd -- white pixels in night mode,
    on the Settings page, which is exactly where someone adjusts their WROLPi
    in the dark.  Restated from tokens.

The baseline ratchet gained a third assertion: a migrated file may still lean
on Semantic's CSS classes without importing the library, which the import check
cannot see and which would collapse silently when Phase 4 deletes the
stylesheet.  There is one such bridge today and it is now declared.
2026-07-30 11:55:39 -06:00
..
DriveCalculator.js Drop spammy console.debug from Drive Ratio render/keystroke paths 2026-05-28 16:19:21 -06:00
DriveCalculator.test.js Add Drive Ratio calculator (pulleys, gears, sprockets) 2026-05-28 15:17:50 -06:00
ElectricalCalculators.js Calculators: never store NaN as the Kelvin temperature. 2026-07-09 15:27:34 -06:00
ElectricalCalculators.test.js Calculators: add 4-Wire Kelvin segment to the Electrical Calculator. 2026-07-09 15:27:34 -06:00
FoodStorageCalculator.js Rebuild Inventory as a config-only system with food catalog and calculators 2026-06-14 17:14:54 -06:00
FoodStorageCalculator.test.js Rebuild Inventory as a config-only system with food catalog and calculators 2026-06-14 17:14:54 -06:00
HamCalculators.js Antenna calculator: harden wavelength/MHz input handlers. 2026-07-15 19:57:48 -06:00
HamCalculators.test.js Antenna calculator: extract pure math, fix bugs, add tests. 2026-07-15 19:57:48 -06:00
mathConfig.js Adding more dashboard unit examples. Adding tests for unit conversion. 2026-04-04 17:56:08 -06:00
mathConfig.test.js Adding more dashboard unit examples. Adding tests for unit conversion. 2026-04-04 17:56:08 -06:00
OneTimePadCalculator.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
OneTimePadCalculator.test.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
QRCodeCalculator.js ui: nine leaf files off Semantic, and the components they needed 2026-07-30 11:55:39 -06:00
RatioCalculator.js Adding quart to ratio calculator. Adding tests. 2025-12-25 18:45:32 -07:00
RatioCalculator.test.js Adding quart to ratio calculator. Adding tests. 2025-12-25 18:45:32 -07:00
RationCalculator.js Add a recommended Food Storage example, a Ration tab, and a supply planner 2026-06-19 12:40:30 -06:00
RationCalculator.test.js ui: Common.js and thirteen more files off Semantic 2026-07-30 11:55:39 -06:00
TemperatureCalculator.js ui: nine leaf files off Semantic, and the components they needed 2026-07-30 11:55:39 -06:00
VinDecoderCalculator.js ui: nine leaf files off Semantic, and the components they needed 2026-07-30 11:55:39 -06:00
VinDecoderCalculator.test.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
WaterCalculator.js Guard preset lookup, drop dead Media import and volume*1 no-op 2026-05-28 18:07:01 -06:00
WaterCalculator.test.js Adding realistic lifecycle test. 2026-05-28 18:06:48 -06:00