openlibrary icon indicating copy to clipboard operation
openlibrary copied to clipboard

"More" in search facets not working

Open JeffKaplan opened this issue 7 years ago • 6 comments

Description

After searching, click "more" under, say, authors. Just adds a bullet after the word "more" and does not expand list.

Evidence / Screenshot (if possible)

tmp

Relevant url?

https://openlibrary.org/search?q=title%3A+%22the+art+of+war%22&mode=everything

Expectation

Should show more items

Details

  • Logged in (Y/N)? N
  • Browser type/version? Firefox
  • Operating system? Windows 10

Stakeholders

@jdlrobson (deputy of frontend).

JeffKaplan avatar Apr 19 '19 21:04 JeffKaplan

Can reproduce; expanded issue

cdrini avatar Apr 21 '19 00:04 cdrini

No errors are logged to the JS console on click.

cdrini avatar Apr 21 '19 00:04 cdrini

Likely another jquery live migration problem based on symptoms :(

jdlrobson avatar Apr 21 '19 06:04 jdlrobson

The more function is defined in openlibrary/templates/work_search.html and uses slideDown on an element that has the class .hidden however .hidden uses !important and means always hide this thing.

Two ways to solve this and changes in 2 files necessary: openlibrary/templates/work_search.html openlibrary/plugins/search/templates/advanced_search.html

  1. Replace the class hidden with style="display:none" Replace
<div class="facetEntry hidden">

with

<div class="facetEntry" style="display:none;">
  1. In the JS make sure you remove the hidden class before doing slideDown. If you do this, tests are necessary.

I'm traveling so cannot submit a fix myself right now but that should be all the information anyone needs to fix and review this....

jdlrobson avatar Apr 21 '19 07:04 jdlrobson

What remaining review does this need? @jdlrobson, if no further review is needed, can you remove the label?

brad2014 avatar Apr 29 '19 16:04 brad2014

This is merged now and resolved. The awaiting review tag can safely be ignored on any closed issues (is there an automated way we could do that?)

jdlrobson avatar Apr 30 '19 02:04 jdlrobson