Skip to content

Add pievisible pipe - #471

Open
AngelaZhang915 wants to merge 2 commits into
PrefectHQ:mainfrom
AngelaZhang915:add-pievisible-pipe
Open

Add pievisible pipe#471
AngelaZhang915 wants to merge 2 commits into
PrefectHQ:mainfrom
AngelaZhang915:add-pievisible-pipe

Conversation

@AngelaZhang915

@AngelaZhang915 AngelaZhang915 commented Jun 22, 2026

Copy link
Copy Markdown

For charts with lots of data, Pie charts need a computed "Other" slice that shrinks when users toggle individual segments in Options. selectattr:visible cannot aggregate hidden rows, so add a built-in pievisible expression pipe and rebuild the bundled renderer.
Closes #473

@marvin-context-protocol marvin-context-protocol Bot added enhancement Improvement to existing functionality or new capabilities. renderer Related to the TypeScript/React renderer. 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: 5cb520a34b

ℹ️ 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".

!!(item as Record<string, unknown>)[key],
);
},
pievisible(value) {

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 Regenerate the tracked renderer outputs

This new pipe is only present in source: I checked the tracked generated artifacts and src/prefab_ui/renderer/app.html still has the older pipe registry without pievisible, while renderer/src/playground/bundle.json and docs/protocol/line-chart.mdx still contain the old LineChart Python/schema output. In dev-version fallback or mode="bundled", users will load app.html and the pipe will be unavailable, and the playground/docs will describe the stale API until the prefab dev build-renderers and prefab dev build-docs outputs are committed.

Useful? React with 👍 / 👎.

!!(item as Record<string, unknown>)[key],
);
},
pievisible(value) {

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 Expose the new pipe through Rx

All of the existing built-in renderer pipes are paired with public Rx helpers in src/prefab_ui/rx/__init__.py, but this new pipe is only added to the TypeScript evaluator. Python code following the established style, such as STATE.chart_segments.pievisible(), currently resolves pievisible as a dot path via __getattr__ and then fails because Rx is not callable, forcing users back to hand-written template strings for this one pipe.

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

/workspace/prefab/AGENTS.md says component docstrings are Markdown and specifically forbids rST double-backtick conventions. This new series line uses {{ ... }} markup, which is surfaced by prefab_ui.generative.search_components() as non-Markdown doc text; use normal Markdown inline backticks instead.

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. renderer Related to the TypeScript/React renderer.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add pievisible pipe

1 participant