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
6641 search ui bug #7154
6641 search ui bug #7154
Conversation
@sekmiller, the suggestion from @pdurbin above is correct. The intention of opening the issue and reporting the bug was to return those selected facet components to their original functionality, as outlined in the 4.6.1 screenshot. Comparing the screenshot above, to the screenshot provided in the original issue, I can see the duplicates were fixed, but there are still the "strange" subTreePaths and Type selected facets displayed. As stated in the original issue, "we do not want to display the strange ID facet, but also I believe that displaying the Type: (files) is a bug." Removing those still needs to be done. |
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 haven't actually run the code but I left a few questions and comments in my review.
The primary one I'm wondering about is if we can simply revert setFilterQueries
to what it was two releases ago.
If not, that's fine. Whatever we end up with, we should update "What this PR does / why we need it" so it's clear to QA what has changed since the initial pull request.
There's also an if
that would benefit from some curlies.
src/main/java/edu/harvard/iq/dataverse/search/SearchIncludeFragment.java
Outdated
Show resolved
Hide resolved
dataversePage.setQuery(query); | ||
dataversePage.setFacetCategoryList(facetCategoryList); | ||
dataversePage.setFilterQueries(filterQueriesFinal); | ||
dataversePage.setFilterQueries(filterQueriesDisplay); |
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.
Is this setFilterQueries the crux of the bug? Of #6641? I see some conversation at cbad027#r360054910 about it was switched from filterQueries
to filterQueriesFinal
in cbad027 (part of pull request #6473). I guess I'm wondering if a one line change to switch it back from filterQueriesFinal
to filterQueries
would fix it the bug.
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.
A one line fix, of course would be nice (and preferred) though we should make sure we understand why that line was changed in the first place. @sekmiller can you look at this and try to understand? Maybe build a branch with the one line change to see if it fixes it, then we can decide if how to get both issues to work?
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.
More than a one line fix but fairly simple. The addition of the DVobject types and subtree to the list of filter queries was necessary for the fix in #6268. I added a method to the SearchIncludeFragment getTypeFromFilterQuery in order to not render those filter queries in the search-include-fragment (see lines 341-342)
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 see. I kept wondering why we're adding more code in this pull request when I thought we'd be reverting something. Because the new types were added recently (DvObject and subtree), now we need to hide them, it sounds like.
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.
Right and also during development I noticed that the filter queries were being added multiple times hence the isFilterQueryAlreadyInMap method.
What this PR does / why we need it:
This PR prevents the display of duplicate filter query facets on the Dataverse Page. It also removes the subtree and dvobject type facets from the selected filter queries display.
Which issue(s) this PR closes:
Closes #6641 Search UI Bug
Special notes for your reviewer:
Suggestions on how to test this:
From a sub-dataverse select multiple facets and verify that search works as expected.
Does this PR introduce a user interface change? If mockups are available, please link/include them here:
Bug fix
Is there a release notes update needed for this change?:
No
Additional documentation:
None