Bug 154818 - Reuse the last search item
Summary: Reuse the last search item
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
7.5.2.2 release
Hardware: All All
: medium enhancement
Assignee: Andreas Heinisch
URL:
Whiteboard: target:7.6.0
Keywords:
Depends on:
Blocks: Find-Search
  Show dependency treegraph
 
Reported: 2023-04-15 09:01 UTC by maison
Modified: 2023-08-24 06:09 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description maison 2023-04-15 09:01:50 UTC
Description:
This report is a sequel of the discussions in Bug 154269, but adding a welcome enhancement.

When you search for an item, the last searched item is proposed in the Search & Replace popup window.

However, the Quick find toolbar proposes the last recorded item.

It makes a big difference if you search for an item that has already been used. The quick find toolbar will trigger the last item it recorded, no matter that it’s no longer relevant. So if you reuse an older search item, you have to select it again and again every time you open the quick find toolbar.

To be noted that pressing Ctrl Shift F also uses the last search item.


Heiko Tietze added:
quickfind (ctrl+F) currently does not sort the list if a search item exists. In fact neither the full search does but it remembers the last search item.
Something like 1,2,A,Z should become A,1,2,Z and 2,A,1,Z if you research for A and 2 subsequently. And the first item should be picked on show.

Would be nice to not only remember the last item as done in the full search, eg. 1,2,A,Z -> searching for A keeps the sequence and remembers #2 but should become A,1,2,Z. And the same for the quickfind. If this is too much effort remembering the last used item would be acceptable.

⁂

Another quirkiness is that the two lists have some kind of their own list of items to search. The Find & Replace popup populates its list with items from the quick search toolbar also, but not the other way. Maybe a common list of items would be best?

Steps to Reproduce:
1. Quick search (Ctrl F) for A
2. Quick search for B
3. Quick search for A
4. Open the quick search again.
5. Compare with the item proposed in the Find & Replace popup (Ctrl H).

Actual Results:
B is proposed in quick find.
A is proposed in Find & Replace.

Expected Results:
A should be proposed to search in the quick find, as it is the most relevant at the time.


Reproducible: Always


User Profile Reset: No

Additional Info:
Version: 7.5.2.2 (X86_64) / LibreOffice Community
Build ID: 53bb9681a964705cf672590721dbc85eb4d0c3a2
CPU threads: 4; OS: Windows 6.1 Service Pack 1 Build 7601; UI render: Skia/Raster; VCL: win
Locale: fr-FR (fr_FR); UI: fr-FR
Calc: threaded
Comment 1 Andreas Heinisch 2023-04-15 09:17:13 UTC
Confirmed in:
Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 1ed50bb714b8ed657cd422df850a6852cd863f43
CPU threads: 16; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: en-US
Calc: CL threaded
Comment 2 Commit Notification 2023-04-19 16:25:33 UTC
Andreas Heinisch committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/695f08911f40ab8d457c7c7e37bf87bb301ef98d

tdf#154818 - Find bar: remember and reuse last search string

It will be available in 7.6.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 3 Andreas Heinisch 2023-04-19 16:27:52 UTC
Both requests have been implemented. Unfortunately, the ui test did not work because the test build remembers the old search entries from previous tests and I did not find a way to delete the history.
Comment 4 maison 2023-04-19 19:46:34 UTC
Brilliant! Andreas, you’ve been a great help.
Comment 5 Andreas Heinisch 2023-04-19 19:57:25 UTC
Thank you very much! Don't hesitate to ping me on other requests. May I can solve something else for a reporter who gives feedback 😀

For the issues that both searches should share their items list, I am not sure if it is wanted. Maybe we will see a new bug report about it where the UI team may decides what is best.
Comment 6 Commit Notification 2023-04-27 09:13:47 UTC
Andreas Heinisch committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/89afe2978500233dc7b58d39cc519ecb9c224e98

tdf#154818 - Find bar: remember and reuse last search string

It will be available in 7.6.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 7 BogdanB 2023-04-27 17:33:24 UTC
Thanks for solving this bug

Verified with
Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: b88d11ba05085002cf847d4828ded52a3dfb3b09
CPU threads: 16; OS: Linux 5.19; UI render: default; VCL: gtk3
Locale: ro-RO (ro_RO.UTF-8); UI: en-US
Calc: threaded
Comment 8 Commit Notification 2023-05-04 10:09:30 UTC
Andreas Heinisch committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/4cae4a11642f0d8f0c8005141893e34e1c216fde

tdf#154818 - Find bar: remember and reuse last search string

It will be available in 7.6.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 9 maison 2023-08-23 22:02:54 UTC
(In reply to Andreas Heinisch from comment #3)
> Both requests have been implemented. Unfortunately, the ui test did not work
> because the test build remembers the old search entries from previous tests
> and I did not find a way to delete the history.

In 7.6.0 the last used item in Quick Find is now proposed. This is the first and most useful request.

However, items in Find & Replace popup are still not common with the Quick Find list (see the description after the original ⁂).