Page MenuHomePhabricator

Improve the UX for redirects to sections
Open, Needs TriagePublic

Description

(forked/adapted from comments in T53736)
The UX of section-redirects (#REDIRECT [[Foo#Bar]]) is broken in multiple ways. For example, the "redirected from" text is at the top of the article, but when section targeting works the user does not see that message. We might want to look for a more innovative solution.

Quick current-UX summary:
When you visit a page via a redirect, we display the target page with a small notice (screenshot) below the title (so the user understands how they ended up here after clicking on a different title)), and we use JavaScript to update the URL to that of the target page (so that if they copy&paste it then future readers will go directly to the correct target).
When the redirect points to a specific section of the larger article (e.g. https://en.wikipedia.org/wiki/Camden_Market_Fire which is a redirect to [[Camden_Market#Incidents]]), we use JavaScript to scroll to the target section.

This has a couple of problems:

  1. with JS, the user never sees the redirection notice and might not understand what is happening. (It doesn't help that sometimes the connection between the redirect and the target section is not obvious.)
  2. without JS, the user sees the top of the article (with the notice, but it only tells which article they were redirected from, not the target section). (This should be get fixed via T53736)

Event Timeline

@Tgr I will take a look. we did some work around redirect notice using toast messages for mobilefrontend.

With JS:
In desktop the closest I think we have is the Addedwatchtext toast message which pops up when we watchlist a page (for users with JS). That toast previously had a problem where it only showed at the top of the page (not the viewport), so it was easy to miss if we used a gadget such as NavPopups to watchlist a link part-way down a page; but now it shows up properly in the top-right corner.
I'd be interested in whether that could be adapted for section-redirect notices.

However, it is very attention-getting (as an "added to watchlist" notice should be), and I think that might be too distracting for a plain redirect-notice. So I wonder if it would be feasible to have it only appear when we arrive from a section-redirect? (Whilst retaining the traditional "under-the-title" notice for both use-cases.)

Without JS:
I can't guess at a potential solution to this. Ideas?