randyzwitch / streamlit-folium

Streamlit Component for rendering Folium maps
https://folium.streamlit.app/
MIT License
468 stars 176 forks source link

fix: actually remove the feature group when needed #164

Closed patrontheo closed 10 months ago

patrontheo commented 10 months ago

Fixes #163

blackary commented 10 months ago

That's great! Any chance you would be interested in adding a test to show that it's working?

My typical pattern with adding tests for things like this:

  1. If it doesn't already fit into one of the pages of folium.streamlit.app, add a new one
  2. Run the app locally, and use https://playwright.dev/python/docs/codegen to check that the element exists, or that clicking on some widget makes the element appear (or in this case, disappear) from the map
  3. Add that as a new test in test_frontend.py

That might be a bit overkill for a small change like this, but it means that I can be confident I won't accidentally break it later and not notice it.

If you don't want to add the test, I will probably get around to it eventually, but if you want to, that would be great.

patrontheo commented 10 months ago

Okay! I will close this PR and open a new one with more features and tests