Bug 160540

Summary: Quickfind sidebar: make better use of space for search results
Product: LibreOffice Reporter: Heiko Tietze <heiko.tietze>
Component: WriterAssignee: Heiko Tietze <heiko.tietze>
Status: ASSIGNED ---    
Severity: minor CC: dgp-mail, dpskhu13108, eyalroz1, raykowj, stephane.guillou, vsfoote
Priority: medium    
Version: 24.8.0.0 alpha0+   
Hardware: All   
OS: All   
Whiteboard:
Crash report or crash signature: Regression By:
Bug Depends on:    
Bug Blocks: 161449    
Attachments: Screenshot

Description Heiko Tietze 2024-04-05 13:44:38 UTC
Created attachment 193515 [details]
Screenshot

Follow-up to bug 95405: Some results are two lines long, some three. And all result nodes are equally sized, which looks odd. Besides the variable height, a reasonable margin on top/bottom as well as left/right should be done. It might also be more appealing if the nodes receive a panel look-and-feel with a background color and rounded corners.

https://extensions.libreoffice.org/en/extensions/show/132
Comment 1 Dieter 2024-04-20 10:27:50 UTC
I confirm it with

Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 7c2ed9919d6d9d286d9062b91577d6bb2b7de8aa
CPU threads: 4; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: en-GB
Calc: CL threaded

But I would treat this as anhancement and not as a bug.
Comment 2 Heiko Tietze 2024-05-27 09:40:39 UTC
*** Bug 160999 has been marked as a duplicate of this bug. ***
Comment 3 Eyal Rozenberg 2024-05-27 10:39:10 UTC Comment hidden (obsolete)
Comment 4 Eyal Rozenberg 2024-05-27 15:46:29 UTC
I'm actually against variable space for results, at least by default. I would rather have equal size - but small equal size, without gratuitous spacing. See my comments on bug 160999 and sorry for the "status change spam".
Comment 5 Stéphane Guillou (stragu) 2024-06-06 05:52:55 UTC
Related concerns were brought up in bug 160999, which should be taken into account when fixing the Find Sidebar's inadequate use of space.

My summary of Eyal's comments:
- too much whitespace between matches currently
- results could all be single-line
- uniform and variable height have pros and cons (you said "width" in bug 160999 comment 11 but I assume you meant "height")
- if multi-line allowed, number of lines of context could be controlled by a setting
- if need to truncate, always show beginning of search string and truncate the rest to the width of sidebar

Eyal, feel free to correct the above.

Regarding a potential "context setting", see also attachment 189564 [details] showing how Voyant Tools' "Contexts" widget offers control over how much is shown, in both single-line view and in "expanded" view. I created that attachment for the enhancement request to the Search Results dialog in bug 157227.
Comment 6 Stéphane Guillou (stragu) 2024-06-06 05:55:10 UTC
*** Bug 160999 has been marked as a duplicate of this bug. ***
Comment 7 Eyal Rozenberg 2024-06-07 18:46:27 UTC
(In reply to Stéphane Guillou (stragu) from comment #5)

So, there are two conflicting user "desires" or interests which are expressed in this bug and in the dupe bug:

* The desire for search result listings to take up vertical space to **vertically fit their contents** (rather then made uniform with empty space)

* The desire to examine many results in a cursory manner, which is catered to by assigning them **short, uniform, heights**.

It doesn't seem any of these desires can be just discounted/discarded in favor of the other ones - meaning that some configurability is in order in how this is resolved. Heiko, as you devise approach(es) for handling this, I would appreciate it if you could give a rough plan of what you intend to implement, for us to provide some more feedback.

A few other points from the dupe bug or inspired by it:

1. Let's not be afraid of truncation. There's always the possibility of putting more text in a tooltip; and the user can always click a truncated result to bring it up in the main part of the window, for the full context.

2. The context for a search term match isn't very well-defined. One can always go wider, with surrounding lines or paragraphs, or narrower, taking just a sentence rather than a paragraph, or a clause in a sentence etc.

3. Search terms are: (a) usually quite short, much less than the width of the sidebar; but also (b) sometimes very long, e.g. a full sentence, so that they don't even fit the sidebar and will themselves be truncated.