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

Do not update results while editing filter #6360

Merged
merged 1 commit into from
Jan 7, 2025

Conversation

oliver-stoehr
Copy link
Collaborator

With this change the result list is no longer updated while the user clicks on a filter to edit it. The result list is updated when the user hits enter or leaves the input field.

Resolves #6348.

@solth solth requested a review from henning-gerhardt January 3, 2025 13:25
Copy link
Member

@solth solth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this fix. Works as advertised and code looks good! Would you mind opening a correspoding backported pull request against the 3.8 branch?

Copy link
Collaborator

@henning-gerhardt henning-gerhardt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your changes. It is now better but I have still one issue:

If I start editing the filter 3 seconds after I entered / changed something a search is executed in the background too but without displaying the search results.

I will try to capture this in a video.

@henning-gerhardt
Copy link
Collaborator

Capture-2025-01-06_11-08.mp4

In top you can see the navigation through the used filter and on the bottom the access to the ES through the Apache. There are 3 search requests until I changed the task / step status from "inwork" to "open" to get new results. After I left the focus of the filter the "open" search is executed (again) and the results got shown.

@solth
Copy link
Member

solth commented Jan 6, 2025

@henning-gerhardt can you verify that these additional three requests are related to the filter being manipulated? If they also occur on the normal process list page, without involving the filter, that is a different issue and isn't related to the changes in this pull request or the filter in general, I think.

@henning-gerhardt
Copy link
Collaborator

I can confirm that this 3 requests are done while editing the filter. There was no other user logged in or other process in background running. Maybe this behaviour is existing a longer time already but I noticed it now after the changes was introduced.

@henning-gerhardt
Copy link
Collaborator

I just testet this "new" behaviour on 3.7.2: beside the issues there which should be fixed with this pull requests on 3.7.2 is a search even executed after 3 seconds after the last keyboard interaction. So this new found behaviour is existing even without this change.

@oliver-stoehr
Copy link
Collaborator Author

@henning-gerhardt The request you observed is correct: When typing in the filter input, the value is sent with a 1000 ms delay to server. This is not a full search but updates the suggestions displayed below the filter input.

@henning-gerhardt
Copy link
Collaborator

@henning-gerhardt The request you observed is correct: When typing in the filter input, the value is sent with a 1000 ms delay to server. This is not a full search but updates the suggestions displayed below the filter input.

I did not know that but would explain it. I did not use the suggestion until now. So it is not a bug it is more a feature.

@solth
Copy link
Member

solth commented Jan 6, 2025

This is not a full search but updates the suggestions displayed below the filter input.

@oliver-stoehr Do you think it would be easy to suppress the loading screen for these partial requests? In that case perhaps that little improvemet could be added to this PR. If it proves to be more complex, it should be resolved in a different PR, in my opinion.

@oliver-stoehr
Copy link
Collaborator Author

oliver-stoehr commented Jan 6, 2025

@solth I cannot reproduce the loading screen on my local dev system but that might be because my system is quite empty (and fast).
Currently the loading screen is activated for all requests on the processes page and I'm not sure if I can change that easily.
However, the display of the loading screen is (on all pages) delayed for 500 ms. This helps to prevent a "flickering" for very fast requests. If the whole request is finished within 500 ms the loading screen is not shown at all.
I could easily increase the global delay that the loading screen is also not displayed on longer requests, but this would also affect all requests in Kitodo.

@solth
Copy link
Member

solth commented Jan 6, 2025

Thanks for the explanation. In that case I think we should tackle the loading screen topic separately.

@solth solth merged commit 0a43615 into kitodo:main Jan 7, 2025
5 checks passed
@oliver-stoehr oliver-stoehr deleted the fix-filter-editing branch January 7, 2025 15:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Background search requests while editing search filter
3 participants