Bug 96474 - It would be helpful to be able to search *only* within comments
Summary: It would be helpful to be able to search *only* within comments
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
5.0.3.2 release
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
: 148463 (view as bug list)
Depends on:
Blocks: Find-Search Writer-Comments
  Show dependency treegraph
 
Reported: 2015-12-14 09:20 UTC by Luke Kendall
Modified: 2022-04-25 13:42 UTC (History)
3 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 Luke Kendall 2015-12-14 09:20:30 UTC
In a very long document, it would be helpful if you could restrict the Find&Replace search to be only within comments.

As it is, I wanted to find something, but had to scan manually, because I could form no search that didn't produce more hits on the main text than the comments.

Maybe for the UI you could change the Comments checkbox to a radio button selecting between options: Including Comments / Only Comments?
Comment 1 Buovjaga 2015-12-17 10:34:40 UTC
I think it's a good idea, but not sure about the radio buttons. We need design team input.
Comment 2 Robinson Tryon (qubit) 2016-08-25 05:39:28 UTC Comment hidden (obsolete)
Comment 3 Heiko Tietze 2017-10-22 08:07:50 UTC
Together with "Current selection only" we should put these options under a section 'Scope'. Radio buttons are not bad for a few options that are not perfectly clear to the user. But it needs an option for the default. My take is this:

(o) Whole Document
    [ ] Including Comments
( ) Current selection only
( ) Comments Only

The whole dialog is a big mess IMHO. Attributes and Formats would be also a matter of scope. I doubt that users understand the UI.
Comment 4 Buovjaga 2022-04-21 14:01:05 UTC
*** Bug 148463 has been marked as a duplicate of this bug. ***
Comment 5 Heiko Tietze 2022-04-21 14:41:13 UTC Comment hidden (obsolete)
Comment 6 Heiko Tietze 2022-04-21 14:42:04 UTC Comment hidden (obsolete)
Comment 7 Heiko Tietze 2022-04-21 14:43:31 UTC Comment hidden (obsolete)
Comment 8 Heiko Tietze 2022-04-21 14:43:40 UTC Comment hidden (obsolete)
Comment 9 Eyal Rozenberg 2022-04-21 17:37:47 UTC
@Heiko, it looks like you're arguing with yourself here... should we continue the discussion on this bug page?

@Luke , sorry about not noticing your bug before filing mine.
Comment 10 Heiko Tietze 2022-04-22 08:35:59 UTC
The topic was on the agenda of the design meeting.

Solution a) is to list all entities similar to attributes and check it by default. The idea in comment 3 is not flexible, hard to understand and takes a lot of space.
Solution b) would be to know where the search was started from and allow to "[ ] Search only in %1".
Solution c) is to start the search command with a parameter like .uno:Search?where="comment" and allow to restrict the search to this entity only

Solutions b) and c) clutter less, a) is more flexible (but requires a check all/none option).
Comment 11 Eyal Rozenberg 2022-04-22 09:08:08 UTC
(In reply to Heiko Tietze from comment #10)
> The topic was on the agenda of the design meeting.
> 
> Solution a) is to list all entities similar to attributes and check it by
> default. The idea in comment 3 is not flexible, hard to understand and takes
> a lot of space.
> Solution b) would be to know where the search was started from and allow to
> "[ ] Search only in %1".
> Solution c) is to start the search command with a parameter like
> .uno:Search?where="comment" and allow to restrict the search to this entity
> only
> 
> Solutions b) and c) clutter less, a) is more flexible (but requires a check
> all/none option).

I'll rephrase, since the minutes mis-capture my opinion as it evolved over the course of the meeting..

(a) (b) and (c) are for me all parts of the same solution:

* A sub-dialog of the F&R dialog will list all _kinds_ of entities, just like we currently have for Attributes. The entries could be something like: Body, footnotes, endnotes, comments, footers, headers, headings etc. etc.
* The initial selection on this dialog will depend on how or from where you got into the F&R dialog. For example, if the comment context menu had an item called "search comments", it would bring up F&R with only comments checked; but the main menu item would not do that. One can bike-shed what the default selection should be, and whether using the same menu item from different places should affect the default.
* The initial selection can be overriden by a parameter of the UNO command, which would be a list of checked/selected items. So, the way a "search comments" would be implemented is the F&R dialog command, with a setting of the initial selection parameter to only have comments.
Comment 12 Heiko Tietze 2022-04-22 09:16:08 UTC
(In reply to Eyal Rozenberg from comment #11)
> (a) (b) and (c) are for me all parts of the same solution:

B) and c) are meant for just one entity. If you start to from comments you get the option "[ ] Search only in Comments". It would be an efficient and clean way to limit the search.

Of course, we could do some initialization magic for a). But the flexibility comes here on cost of usability as we need another heavy control. Not a strong argument, I'm aware, and that's why all are acceptable solutions.
Comment 13 Heiko Tietze 2022-04-25 09:27:06 UTC
Currently, we can either find/replace the document content or comments if the checkbox is marked. Resolve WFM?
Comment 14 Eyal Rozenberg 2022-04-25 13:16:36 UTC
(In reply to Heiko Tietze from comment #13)
> Currently, we can either find/replace the document content or comments if
> the checkbox is marked. Resolve WFM?

No, since currently, if the checkbox is marked, both the body and the comments are searched.
Comment 15 Eyal Rozenberg 2022-04-25 13:18:51 UTC
Also, if this is not where you want to continue discussion of these aspects of the F&R dialog - shouldn't the UI/design meeting minutes snippet and my comments be made on bug 148464 instead?
Comment 16 Heiko Tietze 2022-04-25 13:42:33 UTC
(In reply to Eyal Rozenberg from comment #15)
> Also, if this is not where you want to continue discussion of these aspects
> of the F&R dialog - shouldn't the UI/design meeting minutes snippet and my
> comments be made on bug 148464 instead?

Yes, it's a good idea to consolidate the topics around the proposed solution