Skip to content

Conversation

@koaning
Copy link
Contributor

@koaning koaning commented Nov 24, 2025

Altair has an annoying default

CleanShot 2025-11-24 at 15 56 20

The normal fix in altair is to declare this:

alt.renderers.set_embed_options(actions=False)

However, this effect is ignored when we do mo.ui.altair_chart over any altair chart. This PR fixes that.

CleanShot 2025-11-24 at 15 58 44

Note

Propagates Altair renderer embed_options (e.g., actions=False) to the frontend Vega component and uses them to control VegaLite embed actions.

  • Frontend (Vega plugin/component):
    • Add embedOptions to plugin validator and Data interface; plumb through VegaPlugin -> VegaComponent -> LoadedVegaComponent.
    • Compute actions from embedOptions.actions when provided; default to { source: false, compiled: false } otherwise. Remove hardcoded actions constant.
  • Backend (Altair UI element):
    • Read global alt.renderers.options["embed_options"] if set and include as "embed-options" in component args.
    • Result: global Altair embed options now affect the rendered Vega chart (e.g., hiding action buttons).

Written by Cursor Bugbot for commit befb438. This will update automatically on new commits. Configure here.

@vercel
Copy link

vercel bot commented Nov 24, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
marimo-docs Ready Ready Preview Comment Nov 24, 2025 6:17pm
return {
source: false,
compiled: false,
...embedOptions,
Copy link
Contributor

Choose a reason for hiding this comment

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

should this spread be here? i think we can just return:

{
      source: false,
      compiled: false,
}
mscolnick
mscolnick previously approved these changes Nov 24, 2025
@mscolnick
Copy link
Contributor

@copilot can you fix the typecheck issues and commit directly

Copy link
Contributor

Copilot AI commented Nov 24, 2025

@mscolnick I've opened a new pull request, #7285, to work on those changes. Once the pull request is ready, I'll request review from you.

- [x] Understand the problem: typecheck error in vega-component.tsx
- [x] Fix the type error for `actions` variable (line 251)
- [x] Run typecheck to verify the fix
- [x] Improve type assertion to include all action options
- [x] Reply to the comment with the fix

<!-- START COPILOT CODING AGENT TIPS -->
---

💡 You can make Copilot smarter by setting up custom instructions,
customizing its development environment and configuring Model Context
Protocol (MCP) servers. Learn more [Copilot coding agent
tips](https://gh.io/copilot-coding-agent-tips) in the docs.

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: mscolnick <2753772+mscolnick@users.noreply.github.com>
@github-actions
Copy link


Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


I have read the CLA Document and I hereby sign the CLA


1 out of 2 committers have signed the CLA.
✅ (koaning)[https://github.com/koaning]
❌ @Copilot
You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

@mscolnick mscolnick merged commit 99b9858 into main Nov 24, 2025
26 of 41 checks passed
@mscolnick mscolnick deleted the altair-embed-options branch November 24, 2025 20:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

3 participants