Skip to content

docs(compositions): remove Variables section referencing unshipped syntax#421

Closed
jrusso1020 wants to merge 1 commit intomainfrom
docs/remove-unshipped-variables-section
Closed

docs(compositions): remove Variables section referencing unshipped syntax#421
jrusso1020 wants to merge 1 commit intomainfrom
docs/remove-unshipped-variables-section

Conversation

@jrusso1020
Copy link
Copy Markdown
Collaborator

What

Removes the Variables section from docs/concepts/compositions.mdx (lines 128–136 on main).

Why

Reported in #416. The docs example shows a syntax that doesn't exist:

<div data-composition-id="card" data-var-title="string" data-var-color="color">

Grep confirms data-var- appears only in that one docs snippet (and its bundled copy at packages/cli/dist/docs/compositions.md). The parser and generator don't read per-attribute data-var-<name> at all — they read data-composition-variables (schema JSON on <html>) and data-variable-values (instance JSON on the composition element).

Beyond the wrong attribute name, the variable system isn't really author-facing yet:

  • No Studio UI for editing or surfacing declared variables
  • No example composition in the repo uses variables
  • No runtime helper or documented consumer pattern — an author would have to manually read URLSearchParams(location.search) inside their composition script (the generator encodes values as iframe query-string params), and nothing in the docs says so

So the section was actively misleading — it advertised a reusability feature with a syntax that isn't wired up and a consumer story that isn't documented.

How

Deleted the ## Variables heading and its three content lines. No other docs referenced the removed section (grepped for #variables anchors; none exist), so no dangling links.

The underlying parser/generator support (extractCompositionMetadata, data-variable-values serialization) stays in place and can be re-documented once there is a real author-facing surface — Studio UI + consumer helper + example composition.

Test plan

  • Unit tests added/updated — N/A (docs-only)
  • Manual testing performed — grepped docs/ for broken anchor refs to the removed section; none found
  • Documentation updated (if applicable) — this PR is the doc update

Closes #416

…ntax

The documented `data-var-*` attribute pattern is not implemented — the
parser reads `data-composition-variables` (schema JSON on <html>) and
`data-variable-values` (instance JSON on the composition element), not
per-attribute `data-var-<name>`. There is no Studio UI, example
composition, or author-facing consumer API for variables today, so the
section left readers with no way to actually use what it described.

Cut the section for now. The underlying parser/generator support stays
in place and can be re-documented once there is a real author-facing
surface (Studio UI + example + consumer pattern).

Closes #416
@mintlify
Copy link
Copy Markdown

mintlify Bot commented Apr 22, 2026

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
hyperframes 🟢 Ready View Preview Apr 22, 2026, 6:32 PM

💡 Tip: Enable Workflows to automatically generate PRs for you.

@jrusso1020
Copy link
Copy Markdown
Collaborator Author

Superseded by #420 — Miguel's PR takes the better approach: keeps the Variables section but rewrites it with the real data-variable-values pattern and a working consumer example, plus cross-references in the data-attributes table, html-schema reference, core docs, and CLI bundled docs. That directly answers #416 instead of deferring the question. Closing in favor of that.

@jrusso1020 jrusso1020 closed this Apr 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Are composition variables actually supported?

1 participant