Increase width of views
Closed this issue ยท 5 comments
Eg, I have a map view on my Geojson data here (which is working great btw with multiple layers ๐) but its width is a bit narrow which makes it difficult to read. This is not a bug but an idea that probably very secondary ๐
How to reproduce
- step 1: go to https://datahub.io/@anuveyatsu/datahub-fluvius
- step 2: see it ๐
Expected behavior
Have it wider.. but again this might not be the case on other examples so I'm not sure if that should be even fixed but a good one to have in the issue tracker.
@anuveyatsu this is great and please tag me next time for visibility, we will add this to our backlog and it's a great suggestion
It's not so easy to implement as width of data vis components used in markdown is constrained by the layout's content width. I tried applying dynamic negative margin to these components and it did work well for some components but for other it would require extra tweaks as by default they would look weird.
E.g. map component looks ok:
But Plotly line charts looks like this:
As a quick fix, which I think is needed anyway as we're dealing with "data-vis-rich" pages by definition, I'd increase the overall data story layout's content width a bit.
And in the future we might 1) make sure every portaljs component allows for passing custom styles in style
prop (e.g. Map does allow to do that so it should be possible to apply negative margin) 2) create additional prop like width = 'normal' | 'full' | 'medium' | 'wide'
. But that would require some shaping first I think.
@rufuspollock let me know what you think
Ok, lets just make it a bit wider. For me most important is images and charts. I wonder if some hack for prose somehow in tailwind.
Ok, I've increased the content width (https://github.com/datopian/datahub-next/commit/1a1a39d01c62ec5b448260189396dd1af4cda550)
Closing as FIXED for now