Page MenuHomePhabricator

Show "Redirected from" notice at section heading instead of page title
Open, LowPublicFeature

Assigned To
None
Authored By
Frostly
Mar 16 2024, 9:21 PM
Referenced Files
None
Tokens
"Like" token, awarded by stjn."Like" token, awarded by Bugreporter2."Manufacturing Defect?" token, awarded by Hyphen."Like" token, awarded by HouseBlaster."Like" token, awarded by Sdkb."Like" token, awarded by Pppery.

Description

https://en.wikipedia.org/w/index.php?title=Wikipedia:Village_pump_(proposals)&oldid=1214082392#Showing_"Redirected_from"_notice_at_top_of_section

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

When one arrives at an article via a redirect, the page is rendered with an additional line saying "(Redirected from [...])", directly below the "From Wikipedia, the free encyclopedia" byline below the article title.

For most of the many redirects that target sections of articles, instead of entire articles, that means that this line isn't in view, which makes little sense to me. After all, if the page includes any {{redirect}}-type dab templates, those are placed as section hatnotes, not article hatnotes, which makes a lot of sense.

Why not show the notice below the section title, either instead of or in addition to where it is now?

Redirects to anchors in the page need some design work on the appropriate placement of the notice.

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):

The notice linking to the redirect is useful as a way to get to the redirect page. and it informs the reader why they are at a place they would not expect to be, but it should be displayed where it can be seen, and preferably where it is most relevant, which would usually be at the redirect target. At the section header would be appropriate for R to section.

Event Timeline

Sdkb subscribed.

This proposal has gotten strong support at the en-WP village pump discussion linked above.

Xmityy subscribed.

will complete by end of this week or next

@Xmityy please don't take offence, but you have never contributed to MediaWiki and your wiki account also has 0 contributions. I think it is a bit ambitious to state that you will have this fixed end of week. Maybe you can introduce your self ?

@Xmityy: Hi! This task has been assigned to you a while ago. Could you maybe share an update? Do you still plan to work on this task, or do you need any help? Thanks!

A hacky JS-only solution to this is already sort of possible: since .mw-redirectedfrom (as well as wgRedirectedFrom IIRC) are always present for redirect targets, you could theoretically add code that would look if location.hash is not empty and show the contents of .mw-redirectedfrom in a notification using mw.notify. This is by no means the ‘solution’ but it would at least make it better for users with JS enabled.

I would also note that Minerva skin already displays mw.notify-based message for all redirects (see for example https://en.m.wikipedia.org/wiki/Camden_Market_Fire), so maybe this can be just ported to core.