Architecture decision record · ADR-0002

Yielded components and a yielded map instance

<MeridianMap as |map|> yields map.Source, map.Layer, map.Marker, map.Popup, the controls and map.instance.

Status
Proposed
Deciders
Joe Gaudet
Created
Updated
PRD
PRD
Related
None

Context

The React library finds the map through a context. Ember has no built-in context. A child component needs the map, and a consumer sometimes needs the imperative maplibregl.Map.

Decision drivers

Not recorded in the original ADR.

Options considered

Not recorded in the original ADR.

Decision

  • <MeridianMap as |map|> yields map.Source, map.Layer, map.Marker, map.Popup, the controls and map.instance.
  • <map.Source as |source|> yields source.Layer with the source already set.
  • @onLoad sends the map instance to the consumer.
  • There is no map service and no registry by id.
  • The root component name is MeridianMap, because Map hides the JavaScript global.

Consequences

  • No context library and no owner lookup.
  • A component outside the block gets the map only if the consumer passes it.
  • Extra packages (draw, deck) take the yielded map as an argument or curry from it.

Confirmation

Not recorded in the original ADR.

Interview record

Each question of the interview with its answer and its source. A fact from the code or a document, a question that the author did not ask, and an assumption are rows too.

QuestionAnswerSource
Where does the text of this page come from?From the Markdown file docs/adr/0002-yielded-components.md at commit ece53da. The text of each section is the text of the Markdown file. A section that the Markdown file does not have says so.Document: docs/adr/0002-yielded-components.md

Changelog

DateAuthorChange
2026-12-02Joe GaudetStatus in the Markdown file: Proposed (plan, 2026-12-02). M0 confirms it.
2026-12-02Joe GaudetCommit bca5c8f: Add the plan and the decisions for Meridian
2026-12-04Joe Gaudet (agent)Converted from docs/adr/0002-yielded-components.md to this page. The text is the text of the Markdown file.

The adr skill of skillsaw wrote this page. The HTML in this file is the source of truth. The diagrams are the Mermaid sources in it.