-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Front end: Solara icons integration #2933
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
This comment was marked as off-topic.
This comment was marked as off-topic.
|
Thanks for this effort! At over 2000 lines of code this is an insanely large PR. That also makes it difficult to review.
|
|
Hello, --> This PR is a finished implementation, not just a proof of concept. The large diff is mainly due to the Solara demo and documentation, the core backend changes are much smaller. |
|
Thanks for the quick and detailed reply.
Yes please. Target a "production ready" PR, so production code + essential documentation. What we often do when integrating a new feature, is updating one example model in |
|
I did Adding a new dependency ( |
|
Thank you for the feedback . Regarding the cairosvg dependency: I agree that requiring users to install non-pip system libraries (like libcairo) is not ideal. I’ll investigate alternatives to avoid this requirement. |
Summary
Adds opt-in icon (image) rendering to Mesa's Altair-based visualization, allowing agents to be displayed as SVG icons instead of simple markers.
Changes
Core Implementation
icon_cache.py: Caches rasterized icons as base64 data URLs to avoid per-frame conversion overheadicons.py: Utility functions for loading bundled and custom iconsicons/*.svg: Three bundled icons (smiley, sad_face, neutral_face) usingcurrentColorfor dynamic coloringaltair_backend.py: Addedmark_imagelayer support for icon rendering alongside existingmark_pointDemo
solara_viz_icon.py: Interactive demo showing grid-based icon visualization with SolaraTests
How It Works
"icon": "smiley"(or path to custom SVG/PNG)cairosvgand cached as base64 data URLsmark_imagelayer on top of the base chartUsage Example