doxa-maps/library/colors
Doxa Maps f9020e4910 The legends mirror now, and their labels never became their values
rega's Arabic survey on main 52eeb0db: the research-dashboard legends sat on the
wrong edge with English text, 70 of 85 letters Latin, in Big Picture and in the
Research Gallery. Two faults that look like one, and they fail in opposite
directions if you fix them carelessly.

A PHYSICAL INSET DOES NOT MIRROR. right:8px pins a box to the physical right edge
in every locale, so in Arabic it stays where an English reader expects it while
everything around it flips. Both surfaces the survey named are logical now, and
inset-inline-start:auto travels with inset-inline-end as a pair rather than as
decoration: it cancels a physical inset inherited from a control container, which
otherwise stretches the box across the map once the anchored edge moves.
The second surface is research-map's geocoder column, which studio found in its
own sweep. That column exists ONLY to share an x-edge with the legend below it —
the alignment is recorded in the file — and the legend already mirrored while the
search bar did not, so under ar the pair came apart and the bar was stranded on
the side the legend had vacated. A shared edge that one of the two honours is
worse than no alignment: it reads as a broken layout rather than as a choice.

THE ENGLISH WAS NOT CHROME, AND THAT CHANGES THE FIX ENTIRELY. The legend renders
a facet VALUE, and for the religion donut that value is a family name DERIVED in
English by library/colors/religion.js — the same table people-groups-grid
re-derives per row so the two ends byte-match. Translating those strings is the
obvious fix and the dangerous one: it would work in English and match nothing in
Arabic, SILENTLY, because an empty intersection reads as "no results". That is
the language-link defect one facet over, and it cost a card to learn the first
time.

So the value stays canonical English and only the visible text is projected, the
same rule the shareable URL follows, where the code is canonical and the slug is
display-only. religionFamilyLabel() lives beside the table it projects, so the
next consumer finds it rather than inventing a second spelling, and the table
itself now carries a comment saying these are values and must not be translated.
Ten family names in eleven locales, English wording held.

check:legend-mirrors guards both halves — and its own negative test found a hole
in it. A mutation aimed at the legend's data-key silently hit a DIFFERENT
:data-key, the donut segment, and the gate stayed green while a projection sat on
a wire. There are three such bindings and it was guarding one. It now checks
every :data-key and :data-facet in the file; all three mutants are caught.

★ AND I BROKE THE FILE'S PARSE ON THE WAY, worth recording because the rule is
already written down. I used backticks around CSS property names in a comment
that lives INSIDE a shadow-CSS template literal, where a backtick ends the
literal and everything after it is read as code. check:sfc-parse and
check:no-free-identifiers both caught it immediately. The comment now says so, in
the file, without backticks.

Source only. STUDIO: needs a rebuild of research-dashboard, dashboard-plus-grid,
doxa-research-map and research-map-plus-grid.
2026-09-26 22:06:58 +00:00
..
_registry.js Complete app-profiles->plugin-designs sweep across comments/docs; build green; layouts kept at root (load-bearing) 2026-09-17 18:18:19 +00:00
adoption.js Research tabs read at 15px; the status red is a step brighter 2026-09-17 02:38:38 -05:00
affinity-block.js C1a: the affinity-block and doxa-region palettes move to library/colors/ 2026-09-26 08:39:53 +00:00
doxa-region.js C1a: the affinity-block and doxa-region palettes move to library/colors/ 2026-09-26 08:39:53 +00:00
engagement.js Research tabs read at 15px; the status red is a step brighter 2026-09-17 02:38:38 -05:00
language-family.js Land the swarm's dashboard work: colour, rails, cascade, scroll 2026-09-22 18:57:39 +00:00
prayer-progress.js Research tabs read at 15px; the status red is a step brighter 2026-09-17 02:38:38 -05:00
README.md consolidate docs into documentation/ and deployment shells into deployment/ 2026-09-21 23:23:23 +00:00
religion.js The legends mirror now, and their labels never became their values 2026-09-26 22:06:58 +00:00
resource.js C1b: the resource palette moves to library/colors/, and the local colour globs go with it 2026-09-26 08:51:39 +00:00
wagf-region.js C1b: the resource palette moves to library/colors/, and the local colour globs go with it 2026-09-26 08:51:39 +00:00

library/colors/ — how pins get colored

Each file here is one color strategy — a way to color the map's pins (by language family, prayer progress, religion, …). Drop a <name>.js in and it's auto-discovered; no registration.

  library/colors/                        a map picks a mode
  ┌──────────────────────────┐           ┌───────────────────────┐
  │ language-family.js        │           │ getColorStrategy(      │
  │ prayer-progress.js        │──auto───► │   'language-family')    │──► colored pins
  │ religion.js   engagement.js│  glob     │                        │
  │ _registry.js (the scanner)│           └───────────────────────┘
  └──────────────────────────┘
        shared set                  a single map can add/override its own in
                                    plugin-designs/<map>/src/colors/ (that map only)
  • Shared here = reused by every map. Your map's own color → put it in your bundle's src/colors/ (it merges over the shared set, for your map only — never edit the library to recolor one map).
  • Filename = mode key (prayer-progress.js → prayerProgress). Files starting with _/. are skipped.

Writing or overriding a strategy? The full contract (required exports, legend wiring, checklist) is in ../../documentation/architecture/color-strategies.md.