Bug 137741 - Fields objects should be navigable in Navigator and the Find bar
Summary: Fields objects should be navigable in Navigator and the Find bar
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.1.0.0.alpha0+
Hardware: All All
: medium enhancement
Assignee: Jim Raykowski
URL:
Whiteboard: target:7.2.0
Keywords:
: 137132 142258 (view as bug list)
Depends on:
Blocks: Navigator Find-Toolbar
  Show dependency treegraph
 
Reported: 2020-10-25 17:14 UTC by TH
Modified: 2022-01-03 10:19 UTC (History)
8 users (show)

See Also:
Crash report or crash signature:
Regression By:


Attachments
Demonstration of 'Navigate by' 'Field' and 'Field by type' (422.24 KB, video/x-matroska)
2021-03-07 19:45 UTC, Jim Raykowski
Details
Fields category in the Navigator content tree (121.55 KB, image/png)
2021-03-08 06:10 UTC, Jim Raykowski
Details
demo of navigator field category (3.67 MB, video/x-matroska)
2021-03-18 01:48 UTC, Jim Raykowski
Details
screen shot of various field content displayed in the Navigator (189.70 KB, image/png)
2021-03-21 23:03 UTC, Jim Raykowski
Details
'Field by type' next previous element button tooltip enhancement (29.91 KB, image/png)
2021-05-12 05:18 UTC, Jim Raykowski
Details
Navigator fields screenshot (144.56 KB, image/png)
2021-05-16 18:30 UTC, Jim Raykowski
Details

Note You need to log in before you can comment on or make changes to this bug.
Description TH 2020-10-25 17:14:40 UTC
Description:
Fields should be included as navigable items in the Navigator, so that they are ADDITIONALLY be in that tree, which would be very helpful and at times less cumbersome than use of the Fields dialog (under Edit --> Fields...), where the latter facilitates other necessary functionality like fixing broken fields.

Steps to Reproduce:
1. Go to the Navigator.
2. Expand the Navigator tree.
3. Fields are NOT present.

Actual Results:
See Steps to Reproduce.

Expected Results:
Fields should be seen under the Navigator tree as well, just like graphics, bookmarks, etc., so that we may easily jump to a given field.  These could be shown as something like "<Field Name> : <Field Value>" or just <Field Name> .


Reproducible: Always


User Profile Reset: No



Additional Info:
This is strictly an Enhancement request to improve usability.
Comment 1 V Stuart Foote 2020-10-25 20:24:08 UTC
Reasonable enhancement.

Obviously this would apply to both the Navigator and the Find bar instance as they share code.
Comment 2 V Stuart Foote 2020-11-06 15:02:50 UTC
*** Bug 137132 has been marked as a duplicate of this bug. ***
Comment 3 Jim Raykowski 2021-03-07 19:45:26 UTC
Created attachment 170319 [details]
Demonstration of 'Navigate by' 'Field' and 'Field by type'

Here is an enhancement patch that adds the ability to navigate fields using the 'Navigate by' control. Two new entries are added, 'Field' and 'Field by type'. 'Field' allows navigation through all fields in the document. 'Field by type' navigates to fields with the same type as the field at the current cursor position. 

https://gerrit.libreoffice.org/c/core/+/112144
Comment 4 Roman Kuznetsov 2021-03-07 22:15:45 UTC
(In reply to Jim Raykowski from comment #3)
> Created attachment 170319 [details]
> Demonstration of 'Navigate by' 'Field' and 'Field by type'
> 
> Here is an enhancement patch that adds the ability to navigate fields using
> the 'Navigate by' control. Two new entries are added, 'Field' and 'Field by
> type'. 'Field' allows navigation through all fields in the document. 'Field
> by type' navigates to fields with the same type as the field at the current
> cursor position. 
> 
> https://gerrit.libreoffice.org/c/core/+/112144

Jim, thanks for your patch and proposal. But it looks some strange for me as for user.

I would suggest just a tree like all another items in Navigator:

Item "Fields" - 
               "Field category 1"
               "Field category 2" - 
                                    Field 1
                                    Field 2
               "Field category 3" - 
                                    Field 1
...

etc.
Comment 5 V Stuart Foote 2021-03-08 00:16:49 UTC
(In reply to Roman Kuznetsov from comment #4)
> 
> I would suggest just a tree like all another items in Navigator:
> 
> Item "Fields" - 
>                "Field category 1"
>                "Field category 2" - 
>                                     Field 1
>                                     Field 2
>                "Field category 3" - 
>                                     Field 1
> ...
> 
> etc.

But that would require extra complexity, and for what is not at all the way that Fields are laid up in documents!

The two modes (ALL, or by Type--at Cursor) are sufficient. Though it might be helpful to know the type of Field at cursor focus.

IMHO functionally it is on target as is...
Comment 6 Jim Raykowski 2021-03-08 06:10:57 UTC
Created attachment 170325 [details]
Fields category in the Navigator content tree

Here is a screen shot of a Field category with fields in the document shown in the Navigator tree. I'm not sure where to go with this.
Comment 7 sdc.blanco 2021-03-08 13:00:11 UTC
(In reply to Jim Raykowski from comment #6)
> not sure where to go with this.
Some random thoughts:
 
 - often fields are in Headers/Footers.  
   Would be good to have a way to easily identify them.

Fields
  Header
    Pagenumber
    DocInformation:Modified
  Footer
    Date (fixed)
    etc.
  Page 7 
    Number range Text
  Page 9
    Number range Figure
 

("page numbers" is a luxury, given that Frames, Objects, Images do not come that way. The liberty of random thoughts.  But likely to make it easier to guess what the field is doing and/or where they are appearing.)

 - would it be possible to give "names" to the fields (comparable to naming Frames, Objects, Images)?  (but I suspect that except for user-defined variables, there is not an existing facility for this.)

 - would the context menu in Navigator also have an "Edit" option?

(at the end of the day, even just having a flat list of variables, as shown in the screenshot,  with navigate to by double-click, would be a useful improvement.)
Comment 8 V Stuart Foote 2021-03-08 13:42:34 UTC
(In reply to sdc.blanco from comment #7)
> (In reply to Jim Raykowski from comment #6)
> > not sure where to go with this.
> Some random thoughts:
>  
>  - often fields are in Headers/Footers.  
>    Would be good to have a way to easily identify them.
> 
> Fields
>   Header
>     Pagenumber
>     DocInformation:Modified
>   Footer
>     Date (fixed)
>     etc.
>   Page 7 
>     Number range Text
>   Page 9
>     Number range Figure
>  
> 
> ("page numbers" is a luxury, given that Frames, Objects, Images do not come
> that way. The liberty of random thoughts.  But likely to make it easier to
> guess what the field is doing and/or where they are appearing.)
> 
>  - would it be possible to give "names" to the fields (comparable to naming
> Frames, Objects, Images)?  (but I suspect that except for user-defined
> variables, there is not an existing facility for this.)
> 
>  - would the context menu in Navigator also have an "Edit" option?
> 
> (at the end of the day, even just having a flat list of variables, as shown
> in the screenshot,  with navigate to by double-click, would be a useful
> improvement.)

+1 to round it out, otherwise just the flat list to indicate Field type would suffice. Great job so far Jim!
Comment 9 Jim Raykowski 2021-03-18 01:48:03 UTC
Created attachment 170541 [details]
demo of navigator field category

Hi All,

Here is effort to realize the Navigator Field category part of this enhancement request. It would be great if someone could provide a test document that is more realistic than what is used in the demo. 

https://gerrit.libreoffice.org/c/core/+/112560
Comment 10 Jim Raykowski 2021-03-21 23:03:08 UTC
Created attachment 170614 [details]
screen shot of various field content displayed in the Navigator

Here is a screen shot of a bit more 'progress'

Maybe at this point it would be best to put the patch in and leave the sort fields by document location (header, footer, page, etc) for a future enhancement?
Comment 11 Commit Notification 2021-04-29 05:28:22 UTC
Jim Raykowski committed a patch related to this issue.
It has been pushed to "master":

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

tdf#137741 Add ability to navigate by fields from Navigate By control

It will be available in 7.2.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 12 Commit Notification 2021-04-29 23:52:55 UTC
Jim Raykowski committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/18e5e948dd66e41f17b0a63bf631d98aee84a03b

tdf#137741 SW: Add fields content type to Navigator

It will be available in 7.2.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 13 Roman Kuznetsov 2021-05-05 07:46:06 UTC
(In reply to Commit Notification from comment #12)
> Jim Raykowski committed a patch related to this issue.
> It has been pushed to "master":
> 
> https://git.libreoffice.org/core/commit/
> 18e5e948dd66e41f17b0a63bf631d98aee84a03b

Jim, it's a nice feature. Thank you for realize it. Will you plan to do some improvements here?
Comment 14 Jim Raykowski 2021-05-06 02:59:06 UTC
@Roman, I will try to implement to be a tree like structure or provide assistance, if needed, to anyone that is interested in doing this. Also the suggestion made by Stuart "Though it might be helpful to know the type of Field at cursor focus" is on my to do list.
Comment 15 Jim Raykowski 2021-05-12 05:18:01 UTC
Created attachment 171903 [details]
'Field by type' next previous element button tooltip enhancement

Hi All,

Here is an enhancement that includes the field type of the field in the Navigate By 'Field by type' previous and next buttons tooltip or '[None]' if the cursor is not on a field.

https://gerrit.libreoffice.org/c/core/+/115451
Comment 16 Jim Raykowski 2021-05-16 18:30:42 UTC
Created attachment 172065 [details]
Navigator fields screenshot

Here is effort to improve the Fields content naming:

https://gerrit.libreoffice.org/c/core/+/115669
Comment 17 Heiko Tietze 2021-05-19 06:07:08 UTC
*** Bug 142258 has been marked as a duplicate of this bug. ***
Comment 18 Commit Notification 2021-05-19 06:35:42 UTC
Jim Raykowski committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/d8813b799343ae846a320d829e20e3f5f4ecb3a4

tdf#137741 Tooltip enhancement for Navigate By next prev 'Field by type'

It will be available in 7.2.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 19 Commit Notification 2021-05-19 06:36:59 UTC
Jim Raykowski committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/aa56f1338450b2362ce0191b0107d512ebb497c9

tdf#137741 tdf#142258 Improve naming of Sw Navigator Field entries

It will be available in 7.2.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 20 Jim Raykowski 2021-09-28 00:40:54 UTC
Forgot to set this as fixed so doing it now :)
Comment 21 stragu 2021-12-11 13:32:35 UTC
Verified as fixed in:

Version: 7.2.4.1 / LibreOffice Community
Build ID: 27d75539669ac387bb498e35313b970b7fe9c4f9
CPU threads: 4; OS: Linux 5.4; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

Added to the release notes for LO 7.2: https://wiki.documentfoundation.org/index.php?title=ReleaseNotes%2F7.2&type=revision&diff=423790&oldid=422865