Plots2: Width refinement to map popup display in CSS

Created on 10 Mar 2020  路  4Comments  路  Source: publiclab/plots2

This has been marked as a good candidate for becoming a first-timers-only issue like these, meaning that it's simple, self-contained, and with some extra formatting, could be a great entry point for a new contributor. If you're familiar enough with this code, please consider reformatting or reposting it as a first-timers-only issue, and then ping @publiclab/reviewers to get it labelled. Or, if this is not your first time, try to solve it yourself!


You can now see this mapping library on by default at:

https://stable.publiclab.org/map#7/41.14399650184958/-71.81762695312501

I'd like to suggest we narrow the popups a bit, to maybe 300px? They seem excessively wide. Is there a way to let them auto-size, or use the default?

image

Citing @jessibreen below:

It looks like the width of the popup is set in the css for that page. It has an important flag on it, so it is overriding the leaflet default of 300.

The bug is at lines 20 and 21 in https://github.com/publiclab/plots2/tree/master/app/assets/map.css

Get rid of this:

.leaflet-popup-content {
width: 800px !important;
}

...and the popup boxes will default to their usual 300 px width.

fto-candidate help wanted

Most helpful comment

Screen Shot 2020-03-10 at 10 05 57 PM
It looks like the width of the popup is set in the css for that page. It has an important flag on it, so it is overriding the leaflet default of 300.

The bug is at lines 20 and 21 in plots2/app/assets/stylesheets/map.css. Get rid of this:

.leaflet-popup-content {
width: 800px !important;
}
...and the popup boxes will default to their usual 300 px width.

All 4 comments

Screen Shot 2020-03-10 at 10 05 57 PM
It looks like the width of the popup is set in the css for that page. It has an important flag on it, so it is overriding the leaflet default of 300.

The bug is at lines 20 and 21 in plots2/app/assets/stylesheets/map.css. Get rid of this:

.leaflet-popup-content {
width: 800px !important;
}
...and the popup boxes will default to their usual 300 px width.

I converted this to an FTO candidate and moved it to plots2 !! Thanks, @jessibreen !!

Hey I was wondering if I could try and help fix this issue. I see that jessibreen has made a pull request already, so if it's already resolved then that's fine. But I'd like to help as much as I can.

@AidenOliver, let me know if you need help finding another issue

Was this page helpful?
0 / 5 - 0 ratings

Related issues

first-timers[bot] picture first-timers[bot]  路  3Comments

first-timers[bot] picture first-timers[bot]  路  3Comments

keshavsethi picture keshavsethi  路  3Comments

keshavsethi picture keshavsethi  路  3Comments

jywarren picture jywarren  路  3Comments