Skip to content

Conversation

@hansthen
Copy link
Collaborator

@hansthen hansthen commented Jan 1, 2025

This change involves several classes that require being added to a Figure. Since these classes follow the render semantics of a MacroElement it makes more sense to make them also inherit from MacroElement.

Excluded from this change is actually making use of the template mechanics of the MacroElement.

This change involves several classes that require being added to a
Figure. Since these classes follow the `render` semantics of a
MacroElement it makes more sense to make them also inherit from
MacroElement.

Excluded from this change is actually making use of
the template mechanics of the MacroElement.
@hansthen hansthen requested a review from Conengmo January 1, 2025 13:47
Copy link
Member

@Conengmo Conengmo left a comment

Choose a reason for hiding this comment

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

Nice change! It's interesting how these classes are not exactly MacroElements either, since they don't use macros. But at least we get the return type of the render method correct.

I added two comments about the todo comments, after addressing those this should be good to merge.

hansthen and others added 2 commits January 1, 2025 20:20
Co-authored-by: Frank Anema <[email protected]>
Co-authored-by: Frank Anema <[email protected]>
@hansthen
Copy link
Collaborator Author

hansthen commented Jan 1, 2025

Before you merge this, do you have some example usage of the Vega and VegaLite classes? I wanted to run some tests for myself, but I could not find anything in the documentation (or in the doc-string).

@hansthen hansthen requested a review from Conengmo January 1, 2025 19:24
@Conengmo
Copy link
Member

Conengmo commented Jan 1, 2025

We have examples for both classes in the Popup documentation: https://python-visualization.github.io/folium/latest/user_guide/ui_elements/popups.html#Vega-chart-in-popup

Copy link
Member

@Conengmo Conengmo left a comment

Choose a reason for hiding this comment

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

Code looks good! If you manually check these classes still work as expected, go ahead and merge it 👍 I'm less available next few days.

@hansthen hansthen merged commit 3a2afb1 into python-visualization:main Jan 4, 2025
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants