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

Using Back button in the search block does not execute the search #4402

Open
erral opened this issue Feb 16, 2023 · 4 comments
Open

Using Back button in the search block does not execute the search #4402

erral opened this issue Feb 16, 2023 · 4 comments

Comments

@erral
Copy link
Sponsor Member

erral commented Feb 16, 2023

Describe the bug

When using Back button with the search block filters, the search results don't update although the URL of the current filter selection is updated.

To Reproduce
Steps to reproduce the behavior:

  1. Go to a Page
  2. Add a Search block with a Type filter, allowing multiple values and using a Checkbox as a widget. Save the changes
  3. Select a checkbox in the search block, the query is executed and search results refreshed.
  4. Select another checkbox in the search block, the query is executed and search results refreshed.
  5. Select another checkbox in the search block, the query is executed and search results refreshed.
  6. Hit the "Back" button in the browser

Expected behavior
The search results are reloaded with the Previous filter applied

What really happens
The search results are not reloaded. Only the URL is changed.

Screenshots
See the video.
Pantaila-bideoa hemendik: og., 2023.eko otsren 16a 16:44:05.webm

Software (please complete the following information):

  • Volto Version: 16. The video is from current demo.plone.org. (also happens in 15.x)
@MAX-786
Copy link
Contributor

MAX-786 commented Feb 20, 2023

Just an abstract idea to fix this might be, dispatching GET_QUERYSTRING_RESULT_SUCCESS whenever we pop from location history.

I will look more into it, but before I just wanted to hear others' opinions on this :). Thanks!
@erral if possible can you please provide your insights?

@erral
Copy link
Sponsor Member Author

erral commented Feb 21, 2023

I can't comment on the details of the implementation, if you think that dispatching the action is OK, that's OK. Can you add a PR and check the details.

@anikdhabal
Copy link

can i work on this?

@MAX-786
Copy link
Contributor

MAX-786 commented Feb 22, 2023

Hi @anikdhabal, in Plone, you can just assign an issue to yourself if you have an approach just make sure there isn't any prior work done.
I have also mentioned an approach above, you can also show your love to that if you want (^^).

sneridagh pushed a commit that referenced this issue Sep 12, 2023
#4879)

Co-authored-by: Andrei Grigore <44702393+andreiggr@users.noreply.github.com>
Co-authored-by: Alexandru Ghica <alec.ghica@eaudeweb.ro>
Co-authored-by: Mikel Larreategi <mlarreategi@codesyntax.com>
Co-authored-by: Ion Lizarazu <ilizarazu@codesyntax.com>
sneridagh added a commit that referenced this issue Sep 12, 2023
* master:
  Fix use of CSS modules in webpack 5 (#5165)
  fix back button on search block to update the search results for #4402 (#4879)
  Fix toc accessibility issue (#5058)
  Add external className to UniversalLink for external link. (#5110)
  Refactor Login (#4933)
  Refactor Messages (#4926)
  Refactor Navigation (#4876)
sneridagh pushed a commit that referenced this issue Sep 14, 2023
#4879)

Co-authored-by: Andrei Grigore <44702393+andreiggr@users.noreply.github.com>
Co-authored-by: Alexandru Ghica <alec.ghica@eaudeweb.ro>
Co-authored-by: Mikel Larreategi <mlarreategi@codesyntax.com>
Co-authored-by: Ion Lizarazu <ilizarazu@codesyntax.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants