-
Notifications
You must be signed in to change notification settings - Fork 31
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
Compare View Revamp: wire up maps and modification popovers #2154
Conversation
- Create a map view for each scenario - Set extent of map view to that scenarios modifications if they exist, or the aoi
- if a scenario has modifications, add a popover over its map to display them
@@ -0,0 +1,23 @@ | |||
{% macro modificationsTable(caption, modifications) %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! Didn't know this was possible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same! I stole this from the original implementation of the mod table. Nunjunks has a quite a few tricks up its sleeves
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me! Tested it out in Chrome, FF, Safari, and IE 11 and it's working well in each.
There's a slight quirk with the font-weight changing in Safari on opening one of the popovers; not sure whether it's related to something changed here or something already in the new compare view CSS (see similar quirks here #2148 (comment)).
If that's fixable here it may be worth doing; otherwise we should make a new card to track compare view style quirks which need fixing.
Thanks, @kellyi! I went over this with Jeff. I'll be adding a commit that adds some placeholder text to popovers for scenarios that can't/don't have modifications with the intention that someday:
I'll also look into that safari styling quirk. |
src/mmw/js/src/compare/views.js
Outdated
var title = this.model.get('name'), | ||
text; | ||
|
||
if (this.model.get('is_pre_columbian')) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could be easily done in the template as well, but I figured it was easier to debug if we kept the logic here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually on second thought I'm going to move it to the template.
@kellyi, before I merge, mind giving this a final look with the new popovers? |
Sure, happy to test it out again! |
- Add a new popover view to show if a scenario can't or doesn't have modifications - Current Conditions and 100% Forest Cover explain what they are - Regular Scenarios without modifications, describe how to add modifications
- Safari was updating the font-smoothing when the modification popovers opened. Set it explicitly so it doesn't flicker
0f4d887
to
cc6656f
Compare
Thanks for all the testing and review! Squashed the fixup. Will merge this once the build completes. |
Overview
Connects #2071
Demo
Notes
@jfrankl, two things:
![screen shot 2017-08-15 at 5 17 50 pm](https://user-images.githubusercontent.com/7633670/29336993-c49786f2-81dd-11e7-9622-0bc9b4e09daa.png)
I kept them in for now.Testing Instructions
./scripts/bundle.sh