Page MenuHomePhabricator

"stub" link styles should be applied only to links to article view, not to others actions like rollback, edit, diff, etc
Closed, DeclinedPublic

Description

Problem:

When I'm viewing a page history or diff of an article, I don't expect to have action links like rollback, edit, diff, etc appear in a different color just because the page is a stub. The .stub rule is currently listed inside resources/src/mediawiki.skinning/elements.less as part of the elements ResourceLoaderSkinModule feature.

Steps to reproduce:

  1. Go to your preferences, appearance section, and activate the stub threshold to, for example, 2000 bytes.
  2. Go to Special:ShortPages and pick one that's below the thereshold (for example, Extension:GoogleCSE)
  3. Go to the page history

Expected results:

Links to the main action (view) to the page should be displayed as stub. Other action links, like the ones to mark an edit as reviewed, view the page history, edit the page, view the next/prev diff, mark as reviewed, undo or rollback should display like any other normal link, no matter if the current version of the page is a stub or not. The information about the article being a stub is not relevant in those contexts IMHO.

Actual results:

Any generated internal link to page actions are displayed with a different color (as stub).

Note that, surprisingly, the undo link on the diff view is not marked with the stub class.

Possible resolution

If we don't want to remove the stub class for other actions, a simple fix would be to style stub links only when they're present in the contents of the page (inside a mw-content-text element). This will allow people that want stub styles everywhere to apply it to other links as well.

Otherwise, we can see if is cheap to check for any link if it's a stub, and perform this check to links to the main view action.

imagen.png (583×871 px, 45 KB)

imagen.png (583×871 px, 94 KB)

Event Timeline

The stub threshold feature has been removed entirely T284917. I guess that renders this task invalid