Page MenuHomePhabricator

Follow up work: Clean up icon classes in Popups
Closed, ResolvedPublic1 Estimated Story Points

Description

Description

We have removed core icon classes from Popups, but some of the icon classes still reference 'mw-ui-icon' confusingly.

TODO

  • Remove 'mw-ui-icon' prefix in favor of 'popups-icon'
  • Remove any leftover selectors from the old icon classes (i.e. icon selectors using :before)

Sign off

https://phabricator.wikimedia.org/T345653#9165402
https://phabricator.wikimedia.org/T345653#9189649

QA Results - Beta

ACStatusDetails
1T345653#9165402

QA Results - Prod

ACStatusDetails
1T345653#9189649
2T345653#9189649

Event Timeline

Change 954312 had a related patch set uploaded (by Bernard Wang; author: Bernard Wang):

[mediawiki/extensions/Popups@master] Rename icon classes in Popups to use popups-icon prefix instead of mw-ui-icon

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

Jdlrobson renamed this task from Clean up icon classes in Popups to Follow up work: Clean up icon classes in Popups.Sep 7 2023, 5:06 PM
ovasileva triaged this task as Medium priority.Sep 7 2023, 5:06 PM
ovasileva set the point value for this task to 1.

Change 954312 merged by jenkins-bot:

[mediawiki/extensions/Popups@master] Rename icon classes in Popups to use popups-icon prefix instead of mw-ui-icon, replace resource loader icons with codex

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

Edtadros added a subscriber: Edtadros.

Test Result - Beta

Status: ✅ PASS
Environment: beta
OS: macOS Ventura
Browser: Chrome
Device: MBA
Emulated Device:NA

Test Artifact(s):

QA Steps

✅ AC1: 'mw-ui-icon' prefix in favor of 'popups-icon'

@Jdlrobson, this seems to satisfy the first TODO, but I'm unsure what to do about the second TODO. If this is sufficient it passes QA in beta.

screenshot 33.png (1×1 px, 454 KB)

@bwang I was wondering if this code can be cleaned up - do we still need to define the size? Can we at least remove the reference to mw-ui-icon-large?

	// Icon is larger than mw-ui-icon-large
	// Thus we hack it to get it to the size we want.
	.popups-icon::before,
	.popups-icon {
		background-size: contain;
		width: @width-popups-settings-help-icon;
		max-width: none;
		height: @height-popups-settings-help-icon;
		margin: 0;
		padding: 0;
	}
Jdlrobson updated the task description. (Show Details)

@bwang I was wondering if this code can be cleaned up - do we still need to define the size? Can we at least remove the reference to mw-ui-icon-large?

	// Icon is larger than mw-ui-icon-large
	// Thus we hack it to get it to the size we want.
	.popups-icon::before,
	.popups-icon {
		background-size: contain;
		width: @width-popups-settings-help-icon;
		max-width: none;
		height: @height-popups-settings-help-icon;
		margin: 0;
		padding: 0;
	}

That has to do with this large image

Screenshot 2023-09-14 at 3.45.43 PM.png (998×2 px, 334 KB)
that shows up inside the settings dialog. Its normally set to display none, so im not sure what its for. I can remove the reference to mw-ui-icon-large, but id have to remove this image to get rid of all the styles here. do you know if we need to keep it?

Change 957828 had a related patch set uploaded (by Jdlrobson; author: Jdlrobson):

[mediawiki/extensions/Popups@master] Remove unhelpful comment

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

Change 957828 merged by jenkins-bot:

[mediawiki/extensions/Popups@master] Remove unhelpful comment

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

Jdlrobson lowered the priority of this task from Medium to Low.
Edtadros removed Edtadros as the assignee of this task.

Test Result - Prod

Status: ✅ PASS
Environment: enwiki
OS: macOS Ventura
Browser: Chrome
Device: MBA
Emulated Device:NA

Test Artifact(s):

QA Steps

✅ AC1: 'mw-ui-icon' prefix in favor of 'popups-icon'

screenshot 80.png (1×1 px, 672 KB)

✅ AC2: https://codesearch.wmcloud.org/search/?q=mw-ui-icon&files=&excludeFiles=&repos=Extension%3APopups should yield zero results

screenshot 81.png (559×1 px, 91 KB)