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

(Fix): Sorting Order and Sorting On are not working in Search Block edit mode #5262

Merged
merged 43 commits into from
Mar 12, 2024

Conversation

dobri1408
Copy link
Contributor

@dobri1408 dobri1408 commented Oct 3, 2023

screen-capture.webm

@netlify
Copy link

netlify bot commented Oct 3, 2023

Deploy Preview for volto ready!

Name Link
🔨 Latest commit 75579a7
🔍 Latest deploy log https://app.netlify.com/sites/volto/deploys/65eff03d4dece8000899738d
😎 Deploy Preview https://deploy-preview-5262--volto.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@dobri1408 dobri1408 changed the title Test how to resolve the issue with the state of the search block in edit (Fix): Search Block in edit mode, doesn't update state, if there is a preset one Oct 3, 2023
Copy link

netlify bot commented Feb 26, 2024

Deploy Preview for plone-components canceled.

Name Link
🔨 Latest commit 75579a7
🔍 Latest deploy log https://app.netlify.com/sites/plone-components/deploys/65eff03d0d6ca8000899b9c7

@dobri1408 dobri1408 changed the title (Fix): Search Block in edit mode, doesn't update state, if there is a preset one (Fix): Sorting Order and Sorting On are not working in Search Block edit mode Feb 28, 2024
@dobri1408
Copy link
Contributor Author

Hi @sneridagh, the PR is ready for review. In this PR, I have solved the following two problems: if you are on edit, and you have a preexistent search block ( so not created in this instance), and you are clicking on the reversed order, or sort on, the search results are not updated. This is because on the edit, there is a function called onTriggerSearch, that before didn't receive any parameters. I have also included a test.

@ichim-david
Copy link
Member

@dobri1408 I've tested your work and indeed the sorting works now when selecting a sort option.
I would like for you to also take into consideration that if you select "No selection" there is no call to
querystring search to get the preview of this query without any sort options passed.
When you save you will see different results from the edit page since the sorting option changed.
Once that is treated if it can be treated we are good to go

@ichim-david ichim-david self-requested a review March 8, 2024 10:15
ichim-david
ichim-david approved these changes Mar 8, 2024
@dobri1408
Copy link
Contributor Author

Hi @ichim-david I have implemented what you have asked.

@avoinea
Copy link
Member

avoinea commented Mar 12, 2024

@sneridagh Can you please take a look on this one and if merge, please backport also to 16.x.

Thank you!

@sneridagh sneridagh merged commit 45600fa into main Mar 12, 2024
73 checks passed
@sneridagh sneridagh deleted the fix-search-block-state branch March 12, 2024 15:12
ichim-david pushed a commit that referenced this pull request Mar 14, 2024
ichim-david pushed a commit that referenced this pull request Mar 14, 2024
sneridagh added a commit that referenced this pull request Mar 14, 2024
* main: (299 commits)
  Release 18.0.0-alpha.20
  Add BBB code for removed WysiwygWidget (#5874)
  Release 18.0.0-alpha.19
  Release @plone/components 2.0.0-alpha.7
  Release @plone/slate 18.0.0-alpha.10
  Release generate-volto 9.0.0-alpha.11
  Release @plone/types 1.0.0-alpha.6
  Improve deps in project generator (#5872)
  Fix broken link to TanStack Query (#5871)
  Add missing nextjs install step (#5857)
  (Fix): Sorting Order and Sorting On are not working in Search Block edit mode (#5262)
  Update docs for defaultBlockType setting (#5862)
  Add reference to Docker installation for some Linux distributions (#5861)
  Fix further internal `blocksConfig` pass by reference present in core (related to #5850) (#5859)
  The proper name is Semantic UI (#5855)
  Update link to cssnano docs (#5853)
  [components] Container css (#5849)
  Do not display options for Site Administrator to create, modify, or delete Manager users (#5244)
  Fix the introduction of a mutable (referenced) object when assigning … (#5850)
  Remove draftJS (and related legacy blocks `text`, `table` and `hero`) from core and cleanup dependencies (#5846)
  ...
sneridagh added a commit that referenced this pull request Mar 15, 2024
* main:
  Release 18.0.0-alpha.20
  Add BBB code for removed WysiwygWidget (#5874)
  Release 18.0.0-alpha.19
  Release @plone/components 2.0.0-alpha.7
  Release @plone/slate 18.0.0-alpha.10
  Release generate-volto 9.0.0-alpha.11
  Release @plone/types 1.0.0-alpha.6
  Improve deps in project generator (#5872)
  Fix broken link to TanStack Query (#5871)
  Add missing nextjs install step (#5857)
  (Fix): Sorting Order and Sorting On are not working in Search Block edit mode (#5262)
  Update docs for defaultBlockType setting (#5862)
  Add reference to Docker installation for some Linux distributions (#5861)
sneridagh pushed a commit that referenced this pull request Mar 18, 2024
…dit mode (#5262) (#5875)

Co-authored-by: dobri1408 <[email protected]>
Co-authored-by: Claudia Ifrim <[email protected]>
Co-authored-by: Alin Voinea <[email protected]>
sneridagh pushed a commit that referenced this pull request Mar 18, 2024
…dit mode (#5262) (#5878)

Co-authored-by: dobri1408 <[email protected]>
Co-authored-by: Claudia Ifrim <[email protected]>
Co-authored-by: Alin Voinea <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

6 participants