Bug 286776 - Table of Contents (ToC) highlight does not link to current page.
Summary: Table of Contents (ToC) highlight does not link to current page.
Status: REPORTED
Alias: None
Product: okular
Classification: Applications
Component: general (show other bugs)
Version: 21.04.3
Platform: unspecified Linux
: NOR wishlist
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-16 11:56 UTC by Nick Cross
Modified: 2021-08-12 19:42 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Cross 2011-11-16 11:56:45 UTC
Version:           0.13.2 (using KDE 4.7.3) 
OS:                Linux

The thumbnails correctly highlight the current page (respecting the 'Link Thumbnails with page' option). However with the table of contents the highlighted chapter does not match the current location in the document. 

This would be very useful for searches as well to work out where the search has taken me in the document.

I notice that there is a green triangle but that does not consistently appear and what is the highlighted line in blue meant to represent versus the green triangle?

Reproducible: Always

Steps to Reproduce:
Open a PDF document with a ToC and press 'page down' to move through it. 


Expected Results:  
Either the green triangle should ALWAYS be visible or the highlight should move. The UI appears to be inconsistent and confusing ( to me at least ;-) )
Comment 1 Albert Astals Cid 2011-11-16 12:12:57 UTC
The UI is pretty clear.

The blue highlight works as in every list out there, i.e. the highlighted item is the current item of the list, that is where you last clicked or where you would go if you press enter being the list the focused UI item, i.e, click on an item, then use the up/down arrows and then press enter and it will bring you there

The greet triangle is shown then your current page matches the page that TOC item links to.

Why is that inconsitent and confusing?
Comment 2 Nick Cross 2011-11-16 13:37:10 UTC
Thanks for the response.

The green triangle sometimes disappears so it is difficult to see where I am contextually in the document.

Comparing the application to evince - in evince there is also a selection bar in the ToC. I can click on this an it will take me to that location as I expect. However, the difference is that when I scroll using page up/down, cursor keys, mouse wheel etc, the selection bar moves with me keeping me informed as to where I am in the document. This seems more 'unified' ?
Comment 3 Albert Astals Cid 2011-11-16 16:25:30 UTC
I've just ran evince and to be honest I am not sure its implementation is really better than ours. This is how my sample document is organized. It has 200 pages, and each 2 pages there is a toc item for it, i.e.
Page 1 has a Toc item Named 1
Page 3 has a Toc item Named 2
Page 5 has a Toc item Named 3
etc.
So this is what i do and what the toc bar in evince shows.
 - Open the document on page 1.
   * Toc item Named 1 is selected
 - Scroll down to page 2
   * Toc item Named 1 is still selected
 - Scroll down to page 3
   * Toc item Named 2 is selected
 - Scroll up to page 2
   * Toc item Named 2 is still selected  <-- First inconsistency, why on page 2 it was Toc item 1 before and toc item 2 now?
 - Use the toolbar to go to page 100 (which has no toc item associated, pages 99 and 101 have)
   * Toc item Named 2 is still selected  <-- Second inconsistency

As you see going to pages with no toc item associated creates what i think is inconsistent behaviour in evince.

Now let's compare with what we do in Okular (take only into account the green arrow, since the blue highlight is about user interaction):

 - Open the document on page 1.
   * Toc item Named 1 gets the green arrow
 - Scroll down to page 2
   * Green arrow is not shown
 - Scroll down to page 3
   * Toc item Named 2 gets the green arrow
 - Scroll up to page 2
   * Green arrow is not shown
 - Use the toolbar to go to page 100 (which has no toc item associated, pages 99 and 101 have)
   * Green arrow is not shown

Personally i think this is a more sensible behaviour.
Comment 4 Nick Cross 2011-11-16 19:36:04 UTC
Ok while evince's implementation may not be perfect perhaps if I rephrase I could make it clearer.

I often glance at the ToC to see where I am (be it when reading through or through search etc). The blue horizontal bar (which you say is used for keyboard navigation) is rather distracting *especially* when combined with the fact the the green 'you are here' arrow does not appear 100% of the time. Even if evince is slightly inaccurate at least it gives me a rough idea of where I am.

Unfortunately, especially being a lowly engineer ;-) rather than a UI expert, I don't see any easy way of improving it. I guess for *my* use which may be completely unusual....
1. Some way of hiding or making the blue bar less visible. Perhaps only make it visible when keyboard focus is in that pane.
2. Always show where I am in the document.
Comment 5 Albert Astals Cid 2011-11-16 21:06:13 UTC
"it gives me a rough idea of where I am." No it doesn't see how i jumped to page 100 and it still selected a TOC item that belong to page 3

Anyway, evince is not what we are discussing about.

I'll think about your suggestions, but I'm moving this to wish level since it is not a bug at all
Comment 6 Nick Cross 2011-11-16 21:14:42 UTC
Ok fair enough (and probably evince was a bad example especially as I **far** prefer KDE to Gnome!) 

I guess the 'wish' could be summarised as per my last two numbered points especially point 2. 

Thanks!
Comment 7 Kamil Kuduk 2012-01-06 17:07:48 UTC
Well, Okular way of connecting ToC with actual content is consistent, the only problem is nested ToC, so when I have like 10 chapters and each of them has 10 more I have to expand all of them (well, not actually all, but until I find the proper one) to find out where I am. So it would be nice to have green arrow on chapter 2, when I'm somewhere there, like 2.3.2, if the chapter to is collapsed, and after expanding chapter to, it should be on 2.3 etc. Does it sound reasonable?
Comment 8 Ahmad Khayyat 2013-06-14 06:21:02 UTC
I second Kamil Kuduk's suggestion..

It would be very helpful if the position of the current page in the document is reflected on the visible part of the ToC.
If the current section is visible, highlight it. Otherwise, highlight the nearest visible ancestor, e.g. the current chapter if only chapters are expanded.
Comment 9 Laura David Hurka 2021-08-12 19:42:35 UTC
Why does it have a highlight for the last clicked item at all?