-
Notifications
You must be signed in to change notification settings - Fork 7
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
Add support for Blacklight hit-highlighting in the full-text field #1030
Conversation
} | ||
} | ||
|
||
dd.blacklight-full_text_tesimv { |
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.
Avoid qualifying class selectors with an element.
padding-left: 2ch; | ||
} | ||
|
||
&.collapsed:after { |
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.
Begin pseudo elements with double colons: ::
@@ -0,0 +1,32 @@ | |||
dt.blacklight-full_text_tesimv { |
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.
Avoid qualifying class selectors with an element.
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 unfortunately have to provide element because the same class is on two elements that we want to treat differently. This was pulled over from the previous PR, and seems like is safe to ignore in this case.
@@ -0,0 +1,21 @@ | |||
Blacklight.onLoad(function(){ |
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.
'Blacklight' is not defined.
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 addressed by the global
above.
675fefd
to
a84c507
Compare
40a73b3
to
6ecbb0f
Compare
app/helpers/application_helper.rb
Outdated
@@ -25,6 +25,15 @@ def iiif_drag_n_drop(manifest, width: '40px') | |||
end | |||
end | |||
|
|||
def render_fulltext_highlight(args) |
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.
@jkeck what do you think about moving this over to CatalogHelper
?
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.
Yeah, makes sense. I typically think about the purpose of CatalogHelper
as overrides of Blacklight's CatalogHelper
, but clearly that's not the pattern here. Just moved this helper over there. 👍
6ecbb0f
to
6ebd4cd
Compare
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.
👏 👍
Closes #993
Stolen heavily from #99 👏 @cbeer
TODO
This can be tested locally by indexing objects from the Feigenbaum exhibit. zy575vf8599 is used in the example below.