Page MenuHomePhabricator

VisualEditor: Apply styles for redirects/disambiguation links in suggestions in link inspector
Closed, ResolvedPublic1 Story Points

Description

We apply red link styles to nonexistent titles in the link suggestions, so for redirects and disambig pages the corresponding styles/classes should be applied as well.

I don't actually know what these are, ask James :)


Version: unspecified
Severity: trivial

Details

Reference
bz61072

Related Objects

Event Timeline

bzimport raised the priority of this task from to Lowest.
bzimport set Reference to bz61072.
Catrope created this task.Feb 8 2014, 12:15 AM
  • Bug 64584 has been marked as a duplicate of this bug. ***

We actually don't apply any classes, ve.ui.MWLinkTargetInputWidget.css just has some styles defining a close-enough reddish color. (This is kind of bad since the color can differ per-skin.)

.ve-ui-mwLinkTargetInputWidget-menu .oo-ui-menuItemWidget[rel=newPage] {
color: #BA0000;
}

There are no styles by default for redirect and disambiguation links, some users choose to style them in various ways (usually green for redirects and maroon for disambigs).

I'm not sure if we should do this for the link in the inspector; they are already visually distinct by being placed in separate sections. We might want to remove the reddish styles too...

(In reply to Bartosz Dziewoński from comment #2)

We actually don't apply any classes, ve.ui.MWLinkTargetInputWidget.css just
has some styles defining a close-enough reddish color. (This is kind of bad
since the color can differ per-skin.)

.ve-ui-mwLinkTargetInputWidget-menu .oo-ui-menuItemWidget[rel=newPage] {

	color: #BA0000;

}

There are no styles by default for redirect and disambiguation links, some
users choose to style them in various ways (usually green for redirects and
maroon for disambigs).

Presumably the styles will be ported over to Parsoid content, at which point we can just apply them directly?

I'm not sure if we should do this for the link in the inspector; they are
already visually distinct by being placed in separate sections. We might
want to remove the reddish styles too...

I'm not sure. Consistency of hinting is important.

Jdforrester-WMF closed this task as Resolved.Mar 30 2017, 6:21 PM
Jdforrester-WMF moved this task from Freezer to TR1: Releases on the VisualEditor board.
Jdforrester-WMF set the point value for this task to 0.
Jdforrester-WMF assigned this task to matmarex.

This was done by @matmarex way back in August 2014 (two weeks after my comment above) – 066283dde745fcc372ffab8d753962858813d032.

Restricted Application added a project: User-Ryasmeen. · View Herald TranscriptMar 30 2017, 6:21 PM
matmarex reopened this task as Open.Mar 31 2017, 8:30 PM

I don't think so – that one did it for links in the editing surface, but not in the link inspector suggestions dropdown. Looks like this code lives in mw.widgets.TitleOptionWidget now.

…and we actually handle redirects and disambigs there with custom icons. So this should be trivial.

Change 345883 had a related patch set uploaded (by Bartosz Dziewoński):
[mediawiki/core@master] mw.widgets.TitleOptionWidget: Apply styles for redirects/disambiguation links

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

Jdforrester-WMF changed the point value for this task from 0 to 1.Apr 1 2017, 3:28 PM

I don't think so – that one did it for links in the editing surface, but not in the link inspector suggestions dropdown. Looks like this code lives in mw.widgets.TitleOptionWidget now.

…and we actually handle redirects and disambigs there with custom icons. So this should be trivial.

Oh, hah, I thought we'd done it when the code was in VE but clearly I was wrong. :-)

Change 345883 merged by jenkins-bot:
[mediawiki/core@master] mw.widgets.TitleOptionWidget: Apply styles for redirects/disambiguation links

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