Page MenuHomePhabricator

Fixed ToC with top link always visible
Open, MediumPublicFeature

Description

Feature summary (what you would like to be able to do and where):

Would be nice to have a top link always visible in the fixed/sticky Table of Contents (vector 2022).
So maybe you could try to scroll other links, not the top one?

Use case(s) (list the steps that you performed to discover that problem, and describe the actual underlying problem which you want to solve. Do not describe only a solution):

  1. Visit a long talk page e.g https://pl.wikipedia.org/w/index.php?title=Dyskusja_wikipedysty:Nux&oldid=68069563
  2. Navigate to some link section e.g. https://pl.wikipedia.org/w/index.php?title=Dyskusja_wikipedysty:Nux&oldid=68069563#Nowy_projekt:_Pozytywne_wzmocnienie
  3. Want to go to top (e.g. to check archive) and want to do it with a mouse. I cannot use mouse quickly because top link is not visible, so have to use keyboard.

Would also be useful when browsing long articles. Not by default, but when you open some sections the top link will also disappear.

Benefits (why should this be implemented?):
Everyone using mouse and touch (and pointing devices in general probably).

Related Objects

StatusSubtypeAssignedTask
ResolvedJdlrobson
OpenFeatureNone

Event Timeline

@Nux to clarify your idea, are you saying that in this situation you would have to scroll the TOC in order to find and click on the the (Top) link:

Screen Shot 2022-09-12 at 5.28.41 PM.png (791×1 px, 479 KB)

so you would like there to be a fixed (Top) link that is always visible, like this:

Screen Shot 2022-09-12 at 5.30.56 PM.png (791×1 px, 479 KB)

Yes, something like that :-)

Not sure if you can easily do that (with just CSS), though.

Ok cool. I've actually run into this issue a few times myself (specifically on talk pages), where I wanted to get back up to the top and had to scroll back up to the top of the TOC to do so. I've added it to my list of things to prototype. In the meantime, can you say more about why you find yourself wanting to get back to the top of the page?

ovasileva triaged this task as Medium priority.Sep 13 2022, 2:49 PM
ovasileva moved this task from Incoming to Groomed on the Web-Team-Backlog board.

Please count this comment as another bit of "support" for some way of making it easier to return to the top of the talk page.

I specifically have found myself seeing functionality like what y'all (@Nux and @alexhollender_WMF) are describing when I:

  1. Visit a talk page where the new page-level "latest comment" indicator is available. E.g. https://www.mediawiki.org/wiki/Talk:Talk_pages_project/Usability .
  2. Tap the link to navigate to the "latest comment":

Screen Shot 2022-11-23 at 9.31.23 AM.png (600×1 px, 95 KB)

  1. Read the "latest comment" and realize it's not something I need to engage with further
  2. Decide I want to return to where I came from (read: the top of the talk page) and decide where I'd like to go next.

I also experience something similar to what I described above when tapping the "latest comment" indicator that appears within Topic Containers:

Screen Shot 2022-11-23 at 9.35.49 AM.png (340×1 px, 75 KB)

...I recognize the two cases above might warrant different, more specialized solutions than changes to the ToC. Although, I decided to include these cases here thinking a "generic" approach for evolving the ToC could also resolve the above as well.

Yeah there are two generic use cases for me:

  1. I lay back on my chair and just use mouse. And then I navigate discussions almost exclusively with mouse. And so I need both navigating through discussion and then go to top and maybe visit another subpage (our Village Pump is also divided into sections/tabs which have top navigation).
  2. I use space to navigate to next... hm... you can call it screen I guess... So I use space for next screen (left hand) and use mouse to go to top (right hand).

If that is not obvious it is mostly useful for really long pages.

As a workaround I currently use something like this in my CSS:

/* fixed on the bottom */
.sidebar-toc-contents > li:first-child:not(.sidebar-toc-list-item-active) {
	background-color:white;
	position: fixed;
	padding: .5em !important;
	right: 0;
	bottom: 2.5em;
}

Not ideal as it is a bit far away from ToC, but I didn't want to do it in JS.
Works kind of better with my... hm... plugin to Vector 2022: https://pl.wikipedia.org/wiki/Wikipedysta:Nux/Fixed_top_bar.less

@Nux another idea: we could make the page title in the sticky header a link that leads back to the top of the page

@alexhollender_WMF honestly I didn't notice it is a top link until the very end 🙃. I mean I was watching the clip and was looking for a top link. I haven't found it. Only after you clicked I noticed the title was a link.

In retrospect I would say it looks too much like a placeholder for search input or just text input.

obraz.png (45×596 px, 6 KB)