-
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
BiG-CZ Map Popups #2173
BiG-CZ Map Popups #2173
Conversation
- Render details of results on popup - Currently reuses ResultView while we determine what is appropriate for the popup content - Add "Details" button to popup to display details in sidebar - To accomplish, some refactoring: * Move triggering of details view out from the views and onto the model. Now each result has a `show_detail` boolean that the ResultsCollection manages. The catalog listens for changes on the collection to set a `detail_result` attribute, which in turn is listened to by the sidebar view. * This way the parent-view orphaned popover can trigger the detail in addition to the main result list view - Apply custom leaflet popup styling
/cc @jfrankl for style review |
// track of which shape came from where | ||
return _.map(filteredResults, function(r) { | ||
if (r.geom) { | ||
r.geom.properties = { |
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.
We could do this on the backend as well, but if we end up exposing the API, our users might not want the duplicate data clogging up the response.
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.
If we ever did #1950 it would assist with this. For now I think this is fine.
When the user clicks on "details" in the popup, the popup should close. Other than that, this is good to go! FYI, @ajrobbins and I have another concept for the bounding box interaction. We'll write that up in a separate issue. |
Waiting for a fixup to come in for the hover issue discussed IRL. Otherwise:
|
* Highlight geom for result with an open popup * Highlight geom for result with open detail panel * Close popup on detail open
Pushed a commit to modify the highlight behavior. One quirk is in the details page you can still open additional popups, and they will highlight. That may or may not be desired. |
I created #2181 for all the hover issues, even some found herein, so I think this is good to merge. Just going to take a quick peek over the code now. |
Thanks, those are good ideas for the hovering. I think it might take some time to get the interactions right, so I'm all for deferring. |
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.
+1 tested. This looks good enough, and works well. We're still evolving our approach to the map / sidebar interaction, and will follow up with #2181. Nice work.
// track of which shape came from where | ||
return _.map(filteredResults, function(r) { | ||
if (r.geom) { | ||
r.geom.properties = { |
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.
If we ever did #1950 it would assist with this. For now I think this is fine.
Thanks! Going to merge. |
Overview
Adds popovers to the BiG-CZ results we display on the map (Currently CINERGI and WDC).
Wireframe
Connects #2136
Demo
Notes
ResultView
for the popups while we determine what they should containui-secondary
seemed much to dark on the white backgroundTesting Instructions
bundle
. There are style changes, make sure the sass compiles.water