Skip to content
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

Merged
merged 14 commits into from Aug 7, 2020
Merged

6641 search ui bug #7154

merged 14 commits into from Aug 7, 2020

Conversation

sekmiller
Copy link
Contributor

@sekmiller sekmiller commented Jul 31, 2020

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

@coveralls
Copy link

coveralls commented Jul 31, 2020

Coverage Status

Coverage decreased (-0.005%) to 19.539% when pulling be40d35 on 6641-search-ui-bug into d002459 on develop.

@sekmiller sekmiller added this to the Dataverse 5 milestone Jul 31, 2020
@pdurbin
Copy link
Member

pdurbin commented Aug 4, 2020

I'm a little confused about the fix. I thought we wanted to go back to how things were. If I look at ADA running 4.6.1 for example (screenshot below), we only see "Publication Date" and nothing about subtreePaths or Type. Sort of a clean look, in my opinion.

4.6.1

Screen Shot 2020-08-04 at 10 33 59 AM

This pull request

Screen Shot 2020-08-04 at 10 33 53 AM

@mheppler
Copy link
Contributor

mheppler commented Aug 4, 2020

@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.

@sekmiller sekmiller moved this from Code Review 🦁 to IQSS Team - In Progress 💻 in IQSS/dataverse (TO BE RETIRED / DELETED in favor of project 34) Aug 4, 2020
@sekmiller sekmiller self-assigned this Aug 4, 2020
@sekmiller sekmiller removed their assignment Aug 4, 2020
@sekmiller sekmiller moved this from IQSS Team - In Progress 💻 to Code Review 🦁 in IQSS/dataverse (TO BE RETIRED / DELETED in favor of project 34) Aug 4, 2020
@pdurbin pdurbin self-assigned this Aug 4, 2020
Copy link
Member

@pdurbin pdurbin left a 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.

dataversePage.setQuery(query);
dataversePage.setFacetCategoryList(facetCategoryList);
dataversePage.setFilterQueries(filterQueriesFinal);
dataversePage.setFilterQueries(filterQueriesDisplay);
Copy link
Member

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.

Screen Shot 2020-08-04 at 12 21 56 PM

Copy link
Contributor

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?

Copy link
Contributor Author

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)

Copy link
Member

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.

Copy link
Contributor Author

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.

@pdurbin pdurbin removed their assignment Aug 4, 2020
@pdurbin pdurbin moved this from Code Review 🦁 to IQSS Team - In Progress 💻 in IQSS/dataverse (TO BE RETIRED / DELETED in favor of project 34) Aug 4, 2020
@sekmiller sekmiller moved this from IQSS Team - In Progress 💻 to Code Review 🦁 in IQSS/dataverse (TO BE RETIRED / DELETED in favor of project 34) Aug 5, 2020
@sekmiller sekmiller removed their assignment Aug 5, 2020
@pdurbin pdurbin assigned pdurbin and unassigned pdurbin Aug 6, 2020
IQSS/dataverse (TO BE RETIRED / DELETED in favor of project 34) automation moved this from Code Review 🦁 to QA 🔎✅ Aug 6, 2020
@kcondon kcondon self-assigned this Aug 6, 2020
@kcondon kcondon merged commit c859b16 into develop Aug 7, 2020
IQSS/dataverse (TO BE RETIRED / DELETED in favor of project 34) automation moved this from QA 🔎✅ to Done 🚀 Aug 7, 2020
@kcondon kcondon deleted the 6641-search-ui-bug branch August 7, 2020 19:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

Search - UI bug: Strange dataverse ID and duplicate selected facets displaying above results table
6 participants