Allow LineChart series to be a reactive template - #470
Conversation
There was a problem hiding this comment.
💡 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()]), |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 👍 / 👎.
Accept a
{{ ... }}template (RxStr) forLineChart.series, not just astatic list, so series can be visibility-filtered from state at render
time. Updates the Python model, the Zod
seriesschema (array | string),and guards
PrefabLineChartagainst an unresolved/non-array series.Closes #472