Topic on Talk:Page Previews/Flow

Hovercards don't show the section of a page that the link specifies

7
Summary by Edwardj 123

There are many articles containing hyperlinks that go to a specific section of a page when clicked because the other content isn't relevant, so users typically read this content first to understand the topic referenced. The Page Previews/Hovercards feature currently only previews the first section introducing the whole article, which some users would like changed so they can read a summary of the specific section that an article references.

Gluons12 (talkcontribs)

Often, there are links that point to a specific section of a page, but the hovercards always preview only the lead section. Is that by design, or is there work going on so that it previews individual sections as well?

CKoerner (WMF) (talkcontribs)

This is by design, but section previews would be an interesting feature. Pinging @OVasileva (WMF) to share your thoughts with the product owner. :)

Edwardj 123 (talkcontribs)

The Page Previews/Hovercards feature was designed to do that - it's meant to show previews of articles, with the main introduction content only. Showing a specific section seems worthwhile though if the link specifies it as a link anchor (using a fragment identifier) because clicking the link would jump to that part of the page. In that case, a summary/introduction to the part would be useful. I think this functionality has been mentioned before but I don't know how much work has been done for it.

OVasileva (WMF) (talkcontribs)

Hi - we haven't done any work on this functionality so far, but currently it is in our list of tentative improvements for the feature after initial rollout - you can look over the highlights of the list here. Also - if you have any ideas for other future improvements, we are tracking them in the "Hovercards Pt 2" page in phabricator.

Edwardj 123 (talkcontribs)

I've spotted some other topics discussing the same idea:

Edwardj 123 (talkcontribs)
197.218.91.1 (talkcontribs)

This will never truly work 100% nor can it be expected to, for many reasons:

  1. Sections are case sensitive - this is even worse than articles, so while Cat and cat links may lead to the same article, as anchors they wouldn't lead to the same section.
  2. Sections don't need to be unique -if you have "Einstein#Schools" and "Einstein#Schools", the first may lead to primary schools, and the second may lead to high schools within the same article. Yet they will share the same anchors. Mediawiki may generate them differently for headings, but most editors probably don't know that and probably won't care to update millions of articles just for "page previews", especially when there's currently no way to detect when these "break".
  3. Inconsistency - same page link showing different descriptions. One here has to remember that 99% of most readers don't know what anchors are, nor how they work. Hovering over one link and getting something, and hovering over a similar link and getting something else is inconsistent and confusing.
  4. Other tools also generate anchors - the math extension generates an anchor that points to its markup, which can also conflict with article anchors, and will surprisingly just have a formula rather than article text. The same applies to tables and many html elements, which would look pretty bad on a small preview.
  5. Sections may also contain unbalanced or unclosed html, tables, and crazy translate markup, and may lead to broken previews.
  6. Sections are unstable - because of the way wikitext markup works a section can automatically change every time the page is edited, e.g. =={{REVISIONTIMESTAMP}}==

This idea should probably be rejected in the general tool for all wiki users (including millions of readers). If deemed useful, it could be implemented solely as a gadget for editors who may be willing to deal with all these issues.

Reply to "Hovercards don't show the section of a page that the link specifies"