Skip to content
SprecherEast
Issue 686

feat: An editor can turn off tap-to-enlarge on one chart

Back to our plan
Done
enhancementfrontendcmsvisualizationpriority: high

Summary

Charts now open bigger in a dialog when a reader taps them (#681, merged). The owner doesn't want that on every chart: the budget post's two-bar chart (2026 against 2027) is already clear at its normal size, so it should just sit in the content. An editor (or an agent writing Markdown) needs a way to turn the enlarge off for one chart and leave it on for the busier ones later, such as the hundred-square grids.

Summary of the owner's decision (2026-11-04, Claude voice session): the two-bar chart is already clear within the content, so it should simply be part of the content and the work should move on. Claude had said it would turn enlarging off per chart rather than drop the feature, and he agreed with that order.

Details

  • Chart already has a zoom prop (#682): off keeps the thumbnail look and size and shows no Enlarge button. No editor field, Markdown prop or Fact-tabs path reaches it yet.
  • Add one yes/no choice to the Chart block, on by default so every existing chart behaves as it does today: shown to editors as a plain checkbox ("Readers can tap to enlarge this chart"), written in Markdown as enlarge="false" only when off, read back by the tag importer with the same rules as the other props, and carried through to Chart (post body charts and Fact tabs charts both).
  • Native first: this is one Payload checkbox field plus a prop through our mapper; no plugin fits. Payload stores rich-text blocks as JSON, so no database migration is expected (confirm with payload migrate:create --skip-empty).
  • Update the Chart block's admin hint, docs/ui/component-set.md, docs/architecture/agent-access.md and intelligence/prompts/draft.md so editors and agents know when to turn it off (a simple chart that is readable at its normal size).
  • Tests first: the stored field maps to zoom, the Markdown round trip (off and default), a Fact tabs chart with it off has no Enlarge button, and with it on keeps it.

Acceptance criteria

  • Not done: A chart with the choice off shows at the same size with no Enlarge button and the drawing is not clickable (no zoom cursor), in a post body and in a Fact tab.
  • Not done: A chart with no value stored (every existing chart) still enlarges.
  • Not done: The Markdown tag round trips enlarge="false"; an invalid value is refused with a reason, like the other props.
  • Not done: The editor field, component-set.md, agent-access.md and draft.md explain it in one line each.
  • Not done: Blocks the editor can't publish when invalid still can't be published through any route (existing tests keep passing).

Blocks #645 (the budget post's chart in the first tab).


Generated by Claude Code, opens in a new tab

See it on GitHub, opens in a new tab