Store the state of the computed filters#4121
Conversation
|
@alanorth does this address the problem you've seen in 7.6.3? |
|
@kshepherd I will try to test it this week. I still haven't managed to reproduce the bug reliably, but I see it when browsing. |
|
I found a way to reproduce a related issue in Discovery search (see comment in #4097) and this PR fixes it. +1 from me on functionality. |
|
This PR fixes the bug with the filters on the mydspace page for my 7.6.3 based branch. Thumbs up and thank you for providing this. |
|
Anyone willing to review and approve this ? |
|
@sergius02 : Could we get a version of this PR created for the It appears (from discussion in this PR and on the ticket) that this bug is found to impact 7.x, 8.x and In the meantime, anyone else is welcome to provide your reviews/approval on this PR. Reminder that we accept reviews from anyone, and community reviews can help us get PRs merged more rapidly. |
|
For what it's worth, I'm running this in production on DSpace 7.6.3. I didn't notice the bug on the MyDSpace page, but this fixes a bug that I showed with filters on the normal Discovery search page. Surprised nobody noticed that one yet. |
Ok, I'll try to do a port for the main branch |
|
I've made a PR for the main branch here #4160 |
FrancescoMolinaro
left a comment
There was a problem hiding this comment.
Hi @sergius02 , thanks for these changes, the PR looks good to me, I have just a small change request, if you could please have a look that would be great.
Thanks!
src/app/shared/search/search-filters/search-filters.component.ts
Outdated
Show resolved
Hide resolved
|
@sergius02 , thanks for your contribution. This PR fixes the UI freeze, but it does not solve the following problem: after switching the Discovery Configuration in the dropdown, the frontend still requesting filters (facets) from the backend that are no longer valid for the newly selected Discovery Configuration? This is ultimately the reason for the 400 Bad Request errors returned by the backend (can be found in the JS console or in the DSpace backend log file |
FrancescoMolinaro
left a comment
There was a problem hiding this comment.
Hi @sergius02 , thanks again for your changes, I gave a second look to the PR and found a small issue on the component, is not related to your code changes but I think is better if we address it in this PR, could you please have a look?
Thanks in advance!
src/app/shared/search/search-filters/search-filters.component.ts
Outdated
Show resolved
Hide resolved
FrancescoMolinaro
left a comment
There was a problem hiding this comment.
Hi @sergius02 , thanks again for the prompt response.
I think this looks great now and to me is ready to be merged.
tdonohue
left a comment
There was a problem hiding this comment.
👍 Thanks @sergius02 ! I tested this via the main port in #4160. It fixes the main bug in the UI, so it looks good to me. I'm merging this with +2 votes (and some other testers -- thanks all).
I've also flagged this as port to dspace-8_x in order to attempt an automatic port to dspace-8_x. If that automatic port fails, then we may need a manual port.
|
Backport failed for Please cherry-pick the changes locally and resolve any conflicts. git fetch origin dspace-8_x
git worktree add -d .worktree/backport-4121-to-dspace-8_x origin/dspace-8_x
cd .worktree/backport-4121-to-dspace-8_x
git switch --create backport-4121-to-dspace-8_x
git cherry-pick -x 7dd6ab79ffcb26a15b825b5eda46ce1aebc93370 4f42c1e95f9859f8997e2a290263822237b41f8a dc3e84274759bb29b5165dbad4eea5828d65705e |
|
@sergius02 : This was unable to be automatically ported to 8.x (see dspace-bot message above). Could you please create a PR against |
References
Description
Store the state of the computed filters in the array finalFiltersComputed.
Instructions for Reviewers
The counter filtersWithComputedVisibility doesn't store the count of filters computed when you change between options in the select box in /mydspace, causing the ngIf in the HTML is always false, and no filters options render on the web.
List of changes in this PR:
How to test:
Checklist
mainbranch of code (unless it is a backport or is fixing an issue specific to an older branch).npm run lintnpm run check-circ-deps)package.json), I've made sure their licenses align with the DSpace BSD License based on the Licensing of Contributions documentation.