Page MenuHomePhabricator

In the list of "templates used on this page" when editing, highlight redirect templates by italicising them (like we do elsewhere).
Closed, ResolvedPublic

Description

I suggest that

.templatesUsed .mw-redirect {
	font-style: italic;
}

be added to https://phabricator.wikimedia.org/source/mediawiki/browse/master/resources/src/mediawiki.action/mediawiki.action.edit.styles.less

The rationale being that MediaWiki already italicizes redirects in other places, for example:

On Special:AllPages and Special:PrefixIndex (https://phabricator.wikimedia.org/source/mediawiki/browse/master/resources/src/mediawiki.special/mediawiki.special.css):

.allpagesredirect {
  font-style: italic;
}

In the list of categories at the bottom of the page (https://phabricator.wikimedia.org/source/mediawiki/browse/master/resources/src/mediawiki.legacy/shared.css):

.catlinks li a.mw-redirect {
  font-style: italic;
}

On category pages (https://phabricator.wikimedia.org/source/mediawiki/browse/master/resources/src/mediawiki.action/mediawiki.action.view.categoryPage.less):

.redirect-in-category {
  font-style: italic;
}

Event Timeline

Nirmos triaged this task as Lowest priority.Mar 2 2018, 3:24 PM

Hi,
I have attempted to work on this task. https://gerrit.wikimedia.org/r/#/c/416220/ It would be great if someone could have a look at it.

Change 416220 had a related patch set uploaded (by Zoranzoki21; owner: AdityaJ):
[mediawiki/core@master] Italicize .mw-redirect inside .templatesUsed when editing a page

https://gerrit.wikimedia.org/r/416220

First of all, thank you so much for making a patch for this, and so quickly too!

Second, I feel I need to respond to one of the comments on gerrit:

I'll need to defer to Nirmos as I'm not really a MediaWiki developer

I'm not a MediaWiki developer, so if "defer to Nirmos" means waiting for me to do any kind of code review, don't hold your breath =) I'm just an admin at Swedish Wikipedia (sv.wikipedia.org).

I know next-to-nothing about less, but I think this rule should be within the

.mw-editform {
	/* snip */
}

block. .templatesUsed and the other elements are children to .mw-editform, with the exception for #wikiPreview, which is why that is outside the .mw-editform block.

Also, the MediaWiki developers like traceability. If you could just add a simple comment that can be used to find this task, that would be golden:

/* T188737 */
.templatesUsed .mw-redirect {
	font-style: italic;
}

Again, thank you for doing this.

Jdforrester-WMF renamed this task from Italicize .mw-redirect inside .templatesUsed when editing a page to In the list of "templates used on this page" when editing, highlight redirect templates by italicising them (like we do elsewhere)..Mar 5 2018, 6:13 PM
Jdforrester-WMF updated the task description. (Show Details)
Jdforrester-WMF subscribed.

I've adjusted the title to better explain the why of the change in terms of benefit to the user rather than the technical what. Nice idea, let's do it.

Redirects should be italicised on this special page as well: Special:MostTranscludedPages.

For consistency with other places, and I have an use case:

I'm using a JavaScript that adds display of protection levels of the listed templates, so that I can review and adjust them (add forgotten protections, remove excessive protections, etc.).
Quite often, the listed templates are actually redirects (some redirects are heavily used), and when clicking on the link I end up on the canonical template. It's easy to overlook it was a redirect, and I end up modifying the protection level on the canonical template instead of the redirect.