overlay the time slider so it stops hiding the attribution#2242
overlay the time slider so it stops hiding the attribution#2242CodingSelim wants to merge 1 commit into
Conversation
ff6f0d8 to
97c30b0
Compare
the slider was inserted as a block sibling of the map, so with the map at 100% height the page overflowed and the attribution got clipped. position it absolutely over the map instead. fixes python-visualization#1301
97c30b0 to
7de77c1
Compare
|
heads up, the failing docs check is unrelated to this PR. it dies executing user_guide/geojson/geojson.md with an ImportError (pyogrio/fiona not available in the docs env), and this branch only touches time_slider_choropleth. same docs build is currently red on main too, so it looks like a pre-existing env issue not something here. code and geopandas tests pass. |
We are currently working on the pygogrio/fiona errors and I can confirm it is a pre-existing issue. Any idea what could cause the snapshot error? It also does not appear to be related to your change. I will rerun the test to see if it is just flakyness. |
Fixes #1301.
The
TimeSliderChoroplethslider was inserted into the body as a block sibling of the map. Since the map fills 100% of the height, adding the slider pushed the whole page taller than the viewport and the Leaflet/tile attribution got clipped off the bottom. You could see the slider or the attribution, never both.Positioned the slider as an absolute overlay at the top of the map (small translucent background so it stays readable). The map keeps its full height and the attribution is visible again. Matches the maintainer's earlier suggestion of putting the slider on top of the map rather than changing how
Mapsizes itself.Verified in a browser: before, the page overflowed by the slider's height and the attribution sat below the fold; after, no overflow and the attribution shows bottom-right with the slider still working at top-center. Added a small test that doesn't need geopandas.