Skip to content

Allow LineChart series to be a reactive template - #470

Open
AngelaZhang915 wants to merge 1 commit into
PrefectHQ:mainfrom
AngelaZhang915:main
Open

Allow LineChart series to be a reactive template#470
AngelaZhang915 wants to merge 1 commit into
PrefectHQ:mainfrom
AngelaZhang915:main

Conversation

@AngelaZhang915

@AngelaZhang915 AngelaZhang915 commented Jun 22, 2026

Copy link
Copy Markdown

Accept a {{ ... }} template (RxStr) for LineChart.series, not just a
static list, so series can be visibility-filtered from state at render
time. Updates the Python model, the Zod series schema (array | string),
and guards PrefabLineChart against an unresolved/non-array series.

Closes #472

@marvin-context-protocol marvin-context-protocol Bot added enhancement Improvement to existing functionality or new capabilities. python Related to the Python SDK: components, actions, serialization. labels Jun 22, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e02b95d87d

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".


export const lineChartSchema = cartesianBase.extend({
type: z.literal("LineChart"),
series: z.union([z.array(chartSeriesSchema), z.string()]),

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Commit regenerated renderer outputs

This schema/renderer change is not reflected in the generated committed outputs: src/prefab_ui/renderer/app.html still embeds the old LineChart code/schema, so bundled/dev renderer still rejects a reactive series template, and renderer/src/playground/bundle.json still embeds the old Python series: list[ChartSeries] contract. dev-docs/build-pipeline.md documents these as generated outputs for build-renderers/build-docs; please regenerate and commit them with this change.

Useful? React with 👍 / 👎.

Args:
data: Row data or reactive interpolation reference.
series: Series to render as lines.
series: Series to render as lines, or a sole ``{{ ... }}`` template

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Use markdown backticks in the docstring

AGENTS.md says component docstrings are markdown and explicitly says not to use the rST `` `` convention; this new Args entry uses double backticks around the template, and search_components() surfaces these docstrings directly to LLMs. Please switch this to single markdown backticks around {{ ... }}.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Improvement to existing functionality or new capabilities. python Related to the Python SDK: components, actions, serialization.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow LineChart series to be a reactive template

1 participant