Commit 0fe51e9
committed
Update conditional when rendering search tabs
** Why are these changes being introduced:
Currently, if the initial DOM rendering is done in a condition where
there are no search results, the UI doesn't not include tabs to change
to a different set of results - which prevents the user from potentially
finding results that were initially excluded.
** Relevant ticket(s):
* https://mitlibraries.atlassian.net/browse/use-172
** How does this address that need:
This updates the conditional to look for the presence of a query term,
rather than the presence of results. This allows us to continue to hide
the tabs on initial rendering, prior to a search being done, but should
mean that the tabs are shown in all conditions after a search.
** Document any side effects to this change:
There shouldn't be - the USE application only has a single search
field, so looking for params[:q] should be sufficient to detect a
search. GeoData uses other fields, but it relies on different partials
and doesn't use tabbed results anyway.
Ultimately I could see a helper method for "is there a search?", which
we get close to with the existing readable_param method, but I don't
want to poke this bear until we have a better sense of what a general
solution should look like.1 parent 77970ca commit 0fe51e9
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
| 34 | + | |
35 | 35 | | |
36 | 36 | | |
0 commit comments