Skip to content
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

Cleanup MacroElements #2088

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

hansthen
Copy link
Collaborator

During an earlier change, I noted that many MacroElement subclasses do not fully use the templating facilities of their parent class.

This PR makes the code more internally consistent by using the template route where possible. I skipped the DualMap, Vega and Vegalite classes because I do not fully understand what is happening there.

Earlier I noted many macroelements do not fully use
the facilities of Figure, but instead in render manipulate
the parent Figure.

Step 1: remove GlobalSwitches as Element
Step 2: cleanup Map.

Remove unused code and imports
Move style headers to the template

All tests still pass.
Step 3: make Popups proper MacroElements
Check parameters during construction. This misses out on the
assertion about needing Map as parent, but I doubt this will be a real
issue anywhere.
Fixed the Draw plugin. Unfortunately there is no automated test
for the Draw plugin. Instead I tested using the example app from
streamlit-folium.
raster_layers.py
Do heat_map_withtime.py
@hansthen hansthen requested a review from Conengmo January 27, 2025 07:09
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.

1 participant