- library/components/WARNING.md, library/dashboards/README.md and documentation/contributing/README.md taught "graduate into the library at the second consumer". They now teach the plugin-designer skill's rule (section 3): a component that could serve more than one map is built once in library/, driven by props, and landed through the build owner; one-off or experimental pieces stay in a map's folder; a new pattern is a pilot, then approved, then rolled out. The contributing guide's "full reasoning" link pointed to an index without it; it now points to the skill. - The app shell doxa-maps-spa is labelled Deep Research. Ten docs still called it the Research Gallery (15 mentions): DEPLOY.md, the desktop how-to, embeddability, develop-a-plugin, reference-universal-props, reference.md, the shell's EMBED.md, and the plugin-designer skill with two of its references. Identifiers (doxa-maps-spa, branch and route names) are unchanged; README.md is not touched.
1.4 KiB
1.4 KiB
⚠️ Read before you touch these components
These are the SHARED, REUSABLE components — every map in plugin-designs/ depends on them.
A change here does not affect one map. It ripples to all of them. So:
- Prototyping or experimenting? Don't edit these. Put your custom, one-off, not-yet-proven component
inside your own map's folder (
plugin-designs/<your-map>/), where it can be as messy as you need and breaks nothing else. - Reusable by default. If a component could serve more than one map, build it here once, driven by props, and land it through the build owner, so other maps adopt it instead of copying it. If it has hard-coded values or assumptions about one specific map, it is not ready to live here: parameterize it first.
- A reusable component takes props, not assumptions. Before you move something in, make it parameterized: the map, the legend, the controls, the search bar all take configuration — yours should too.
- If you must change a shared component, check every map that uses it. Run
bun run devand click through the maps before you commit. The whole point of this library is that maps don't have to be rewritten — don't undo that by breaking the shared pieces.
Rule of thumb: custom code in your app-profile, reusable code in the library — and things only move from the first to the second once they've earned it.