Page MenuHomePhabricator

Minerva should use templates for all backend rendering of its icons and buttons
Closed, ResolvedPublic5 Estimated Story Points

Description

Currently icons and buttons are rendered in a variety of ways, either by:

  • using a template
  • using Html::element class
  • Using raw HTML. inside a template

To make it easier to switch from mw-ui to Codex it would be preferable to switch to a more centralized approach.

Scope

  • Only backend code

TODO

  • create templates for Icons and Buttons.
  • Remove MinervaUI class
  • There should be no change in the markup before and after this change.

QA Results - Prod

ACStatusDetails
1T342908#9135763
2T342908#9143559

Event Timeline

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

[mediawiki/skins/MinervaNeue@master] [Icons] Main menu, secondary actions and search icon are built via templates

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

ovasileva set the point value for this task to 5.Jul 27 2023, 5:17 PM
Aklapper renamed this task from Minerva should use templates for all backend rendering of it's icons and buttons to Minerva should use templates for all backend rendering of its icons and buttons.Jul 28 2023, 1:42 PM

Change 944180 had a related patch set uploaded (by Jdrewniak; author: Jdrewniak):

[mediawiki/skins/MinervaNeue@master] [Icons] Use IconLegacy template in menuGroup and ToggleListItem

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

Change 944219 had a related patch set uploaded (by Jdrewniak; author: Jdrewniak):

[mediawiki/skins/MinervaNeue@master] [WIP][Icons] Use Button template in PageActionsMenu.

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

Change 941026 merged by jenkins-bot:

[mediawiki/skins/MinervaNeue@master] [Icons] Main menu, secondary actions and search icon are built via templates

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

Change 944180 merged by jenkins-bot:

[mediawiki/skins/MinervaNeue@master] [Icons] Use IconLegacy template in menuGroup and ToggleListItem

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

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

[mediawiki/skins/MinervaNeue@master] Edit icon uses template parser

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

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

[mediawiki/skins/MinervaNeue@master] Redo icon sizing

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

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

[mediawiki/skins/MinervaNeue@master] Prepare icon module selectors for Codex markup change

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

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

[mediawiki/skins/MinervaNeue@master] Prepare addPortletLink handler for Codex switchover

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

I believe the above patches cover all the remaining prep work. They can be merged in any order.

The following should be relatively straight forward to review:

The following 3 are a little more risky:

EDIT: Deferred to next sprint:

I chatted to @bwang and we've agreed to break out two new tickets to the next sprint: T344007 T344006

Change 944219 merged by jenkins-bot:

[mediawiki/skins/MinervaNeue@master] [Icons] Use Button template in PageActionsMenu.

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

Change 947473 merged by jenkins-bot:

[mediawiki/skins/MinervaNeue@master] Prepare icon module selectors for Codex markup change

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

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

[mediawiki/extensions/MobileFrontend@master] Updates edit selector

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

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

[mediawiki/skins/MinervaNeue@master] Remove icons from about and disclaimer link and minerva-icon class

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

Change 947471 merged by jenkins-bot:

[mediawiki/skins/MinervaNeue@master] Redo icon sizing

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

Change 947965 merged by jenkins-bot:

[mediawiki/extensions/MobileFrontend@master] Updates edit selector

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

Change 948171 merged by jenkins-bot:

[mediawiki/skins/MinervaNeue@master] Remove icons from about and disclaimer link and minerva-icon class

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

Hey @Jdlrobson

I see this says it's scoped to only backend code. Is there anything I can do to help kick the UI / functionality tires?

^ @bwang ( i hear jon's off for a bit )

Edtadros added subscribers: Mhurd, Edtadros.

Hey @bwang, can you add some test steps if this is testable by QA please.

Test Result - Prod

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

Test Artifact(s):

QA Steps

From Gerrit - https://gerrit.wikimedia.org/r/c/mediawiki/skins/MinervaNeue/+/948171/6//COMMIT_MSG:
Remove icons from about and disclaimer link and minerva-icon class

✅ AC1: Remove icons from about and disclaimer link...

Screenshot 2023-08-31 at 4.57.00 PM.png (1×875 px, 162 KB)

❓ AC2: and minerva-icon class
I am not sure if this only applied to the two links in AC1, but at the footer of the page there are two icons that use the minerva-icon class.

Screenshot 2023-08-31 at 4.56.31 PM.png (1×870 px, 194 KB)

Screenshot 2023-08-31 at 4.56.48 PM.png (1×875 px, 199 KB)

This is primarily a technical change so this one can be resolved.