Bug 108766 - Navigator should highlight headings/objects according to the cursor position
Summary: Navigator should highlight headings/objects according to the cursor position
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.0.0.0.alpha0+
Hardware: All All
: medium enhancement
Assignee: Jim Raykowski
URL:
Whiteboard: target:7.0.0
Keywords:
: 93555 (view as bug list)
Depends on:
Blocks: Navigator
  Show dependency treegraph
 
Reported: 2017-06-25 13:54 UTC by Marco A.G.Pinto
Modified: 2020-09-16 07:19 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
sample/example (10.24 KB, application/vnd.oasis.opendocument.text)
2017-06-25 13:56 UTC, Marco A.G.Pinto
Details
track headings in navigator 'All' Content Navigation View (742.73 KB, video/x-matroska)
2020-02-19 06:44 UTC, Jim Raykowski
Details
tracking modes demonstration (12.07 MB, video/x-matroska)
2020-02-24 06:14 UTC, Jim Raykowski
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Marco A.G.Pinto 2017-06-25 13:54:31 UTC
The purpose of this sample is to show that the navigation window doesn’t move (highlight) to the topic/subtopic when we are inside them (cursor position in the document).

MS Word 2016 has the feature and it is very useful.

So, it is an enhancement request.
Comment 1 Marco A.G.Pinto 2017-06-25 13:56:01 UTC
Created attachment 134275 [details]
sample/example

Scroll through the pages and the topics regarding the current cursor position doesn't get focus (highlight)
Comment 2 RGB 2017-06-25 16:25:48 UTC
If you select "Content Navigation View" (first icon to the left of the second line of icons on the Navigator) the right heading is highlighted in real time.
Comment 3 Yousuf Philips (jay) (retired) 2017-06-25 18:59:35 UTC
Yes the selection of objects or headings should work by default, as discussed in the redesign idea found on the blog, which stated, "However, selecting an object does not result in the appropriate selection at the Navigator."

https://design.blog.documentfoundation.org/2016/07/31/how-the-navigator-may-support-object-handling-in-libreoffice-draw/
Comment 4 Marco A.G.Pinto 2017-06-25 19:00:39 UTC
(In reply to RGB from comment #2)
> If you select "Content Navigation View" (first icon to the left of the
> second line of icons on the Navigator) the right heading is highlighted in
> real time.

Ahhhh... I found it...

But, it doesn't kind of work out of the box.

I have been using LO for years and never spotted the button.

I would like to suggest if the button could be removed in LO 6 and automatically highlight the topics as one moves the cursor in the documents.

Either that, or have it enabled by default.

A child should be able to use LO, right?

:)
Comment 5 Jim Raykowski 2017-10-15 23:19:55 UTC
Hello All,

Seems like https://bugs.documentfoundation.org/show_bug.cgi?id=93555 is a duplicate of this.

I made an inquiry there about each sub heading the cursor is positioned at in the document selecting that sub heading in the Navigator but not unselecting  previously selected sub headings. Please advise if a new bug report should be opened on this.
Comment 6 Jim Raykowski 2017-10-15 23:26:20 UTC Comment hidden (obsolete)
Comment 7 Heiko Tietze 2017-10-16 08:25:47 UTC
*** Bug 93555 has been marked as a duplicate of this bug. ***
Comment 8 Roman Kuznetsov 2020-02-18 13:58:01 UTC
(In reply to Jim Raykowski from comment #5)
> Hello All,
> 
> Seems like https://bugs.documentfoundation.org/show_bug.cgi?id=93555 is a
> duplicate of this.
> 
> I made an inquiry there about each sub heading the cursor is positioned at
> in the document selecting that sub heading in the Navigator but not
> unselecting  previously selected sub headings. Please advise if a new bug
> report should be opened on this.

Jim, possibly you will plan to realize it?
Comment 9 Jim Raykowski 2020-02-19 06:44:26 UTC
Created attachment 157995 [details]
track headings in navigator 'All' Content Navigation View

Hi All,

I have attached a screen recorded demo of a beginning stage implement for this enhancement request. Perhaps a track on/off toggle could be useful? It could be that the user doesn't want this behavior.
Comment 10 Roman Kuznetsov 2020-02-19 07:35:50 UTC
(In reply to Jim Raykowski from comment #9)
> Created attachment 157995 [details]
> track headings in navigator 'All' Content Navigation View
> 
> Hi All,
> 
> I have attached a screen recorded demo of a beginning stage implement for
> this enhancement request. Perhaps a track on/off toggle could be useful? It
> could be that the user doesn't want this behavior.

Looks nice! About on/off toggle - I don't think it needs. Navigator's behavior on your demo is logical for me
Comment 11 Heiko Tietze 2020-02-19 13:37:37 UTC
(In reply to Jim Raykowski from comment #9)
> I have attached a screen recorded demo of a beginning stage implement for
> this enhancement request. Perhaps a track on/off toggle could be useful? It
> could be that the user doesn't want this behavior.

Cool stuff. And yes, with a mazy document structure you likely don't want to open headings- or rather keep open. So some kind of "[x] Keep collapsed" option would be good. When on it works like "Collapse All" for the last position. Somewhat weird is this option in spite of "Expand All"- maybe we just uncheck then? Or even more simple, we just always do this collapse all when the hierarchy is not expanded.
Comment 12 Jim Raykowski 2020-02-22 20:49:43 UTC
Here is effort to implement this request and improve code understanding in the areas touched doing this.

If testing, please notice the expand/collapse of headings/chapters in the Navigator content navigation view as cursor visits these in the document. I like this behavior, but it would be no trouble to change so that as each heading/chapter is visited in the document the related heading/chapter in the navigator simply expands leaving the rest of the heading/chapter content view as was. 

Thoughts?

https://gerrit.libreoffice.org/c/core/+/89287
Comment 13 Roman Kuznetsov 2020-02-23 08:03:48 UTC
(In reply to Jim Raykowski from comment #12)
> Here is effort to implement this request and improve code understanding in
> the areas touched doing this.
> 
> If testing, please notice the expand/collapse of headings/chapters in the
> Navigator content navigation view as cursor visits these in the document. I
> like this behavior, but it would be no trouble to change so that as each
> heading/chapter is visited in the document the related heading/chapter in
> the navigator simply expands leaving the rest of the heading/chapter content
> view as was. 
> 
> Thoughts?
> 
> https://gerrit.libreoffice.org/c/core/+/89287

Jim, it's a great job.

I tested it and:

1. There is some Navigator focus delay when I move a cursor to another chapter in text body
2. Possibly we need an option for toggle view like "Expand/Collapse all Headings", because I expand all headings, then click mouse in another chapter and all headings in Navigator collapse. It was an unexpected behavior for me. Or we shouldn't collapse it in Navigator automatically anyway.
Comment 14 Jim Raykowski 2020-02-24 06:02:31 UTC
(In reply to Roman Kuznetsov from comment #13)
Hi Roman, Thank you for testing and the comments.

> 
> 1. There is some Navigator focus delay when I move a cursor to another
> chapter in text body

This is due to a 1 second polling timer used by the Navigator to check the outline position of the cursor in the document.

> 2. Possibly we need an option for toggle view like "Expand/Collapse all
> Headings", because I expand all headings, then click mouse in another
> chapter and all headings in Navigator collapse. It was an unexpected
> behavior for me. Or we shouldn't collapse it in Navigator automatically
> anyway.

In patch set 2 I have added opportunity to set outline tracking behavior in the outline/headings popup menu.

The mode descriptions I have come up with are open for improvement.

Default - does not collapse expanded outline entries  
Focus - collapses all outline entries other than tracked
Off

This setting does not persist. It may not require too much more effort to do so if it is decided to be of need.
Comment 15 Jim Raykowski 2020-02-24 06:14:34 UTC
Created attachment 158130 [details]
tracking modes demonstration
Comment 16 Commit Notification 2020-02-24 06:59:37 UTC
Jim Raykowski committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/08313c42abc5fb735948f37789ef993c93b6ab5e

tdf#108766 Add outline tracking to all content navigation view

It will be available in 7.0.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 17 Commit Notification 2020-02-26 06:14:12 UTC
Jim Raykowski committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/387e0b4f4c33dfaa48b26098819726824f23f9d2

tdf#108766 followup: outline tracking fixes for floating navigator

It will be available in 7.0.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.