-
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
Implement details view for BiG CZ #2150
Conversation
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.
Tested on Chrome, FF, Safari and IE11. Working well! I think this is good to merge, just a few comments:
-
I think the
triggerMethods
are fine, and even fairly easy to follow in this case. If we do want to stay clear of events though, I was thinking we could add a method onto theResultsCollection
likesetActiveResult
that sets a given result to have an attributeisActive=true
(and all other results toisActive=false
). Then theDataCatalogWindow
could listen forchange:isActive
on the active catalog'sResultCollection
. Not sure that this is any simpler — just a thought. -
We could potentially add
date
to the view, as that seems to be a common feature -
Should this at some point make the corresponding result's shape active on the map?
-
When the title wraps, the "x" renders below it. Not sure if now is a good time to address
</p> | ||
{% endif %} | ||
<p> | ||
{{ description }} |
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.
Should we also include the date as part of this card?
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.
I didn't implement this originally because the APIs handle dates in different ways. But after rereading the card, I'm going to take a shot at it.
src/mmw/js/src/data_catalog/views.js
Outdated
@@ -71,18 +72,25 @@ var DataCatalogWindow = Marionette.LayoutView.extend({ | |||
|
|||
ui: { | |||
introText: '.intro-text', | |||
tabs: '.output-tabs-wrapper' | |||
tabs: '.output-tabs-wrapper', | |||
closeDetails: '.close' |
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 was a little unexpected; I didn't know you could query ui elements in child views. Consider putting this on the view that renders the template this button is in, and hooking it back up to DataCatalogWindow
via childEvents
(like you did for the show action).
While the childEvents
aren't ideal, I think not having this ui tag on the view rendering it could trip us up down the line.
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.
Good call. Will do.
Thanks for the thorough review.
Yeah, though that will be handled in a follow up card. The original description of this issue says not to do it as part of this issue. I'll make a follow up card.
I'll see if I can fix this. |
@arottersman I made the requested changes. Ready for another look! |
I left a review but then deleted its only comment to move it somewhere else. Now the whole review is gone.... |
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, looks good. Can approve this is as soon as the build passes:
The linter is failing because options
is defined but never used in data_catalog/views.js
<i class="fa fa-user"></i>{{ author }} | ||
</p> | ||
{% endif %} | ||
{% if activeCatalog != 'cuahsi' %} |
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 also check if there's begin_date
instead of checking on the active catalog.
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.
I tried something similar, but there is a bit of an overlap in fields between the two catalogs, so I wanted to be more explicit. We may end up having to change this in the future too depending on how much the detail panes diverge between the catalogs.
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! "Friendly reminder" to squash fixups
Thanks for the thorough review! |
Clicking on a search result in the BiG CZ results pane will open a pane with the details for that result. Only the fields that were common between all three APIs were added. Refs #1934
7f47418
to
4f3b515
Compare
Overview
Clicking on a search result in the BiG CZ results pane will open a pane with the details for that result. Only the fields that were common between all three APIs were added.
Connects to #1934
Demo
Notes
I tried various approaches to wiring up the events, and unfortunately, the only one I could get working was propagating the event manually. Triggering a collection event didn't work nor did using
childViewEvents
.Testing Instructions