Page MenuHomePhabricator

Introduce the mediawiki.action.styles module
Closed, ResolvedPublic

Description

We will introduce a new module mediawiki.action.styles which provides styling for all the action= URIs (with the exception of action=view). This will keep styles needed for pages such as action=info, action=protect, action=edit, action=preview, action=delete and action=watch separated from the critical path, as well as provide better support in skins such as Minerva that do not provide such styles for performance reasons.

Acceptance criteria

  • A module mediawiki.action.styles exists
  • The module should load on all skins and have targets mobile and desktop.
  • Relevant styles from the legacy feature are moved to the mediawiki.action.styles module organized and documented to which actions they apply to.

Event Timeline

Jdlrobson created this task.
Jdlrobson updated the task description. (Show Details)

I don't understand the intention of this task.

Right now we have individual ResourceLoader modules for actions such as mediawiki.action.edit.styles, mediawiki.action.delete.styles and others, for each specific action. Any legacy styles should be moved to the relevant action.

Are there any styles in legacy that only apply to view? There are mediawiki.action.view.*.styles modules that they can be moved to. There should be no need to create a new module.

Also: the acceptance criteria seem to conflict with the task lead: (with the exception of action=view) conflicts with The module mediawiki.action.styles is added to any page where Action::getActionName( $this->getSkin() ) is 'view', or falsey.

Right now we have individual ResourceLoader modules for actions such as MediaWiki.action.edit.styles, mediawiki.action.delete.styles and others, for each specific action. Any legacy styles should be moved to the relevant action.

Sorry, I overlooked that bit. Styles would move to those if they already exist.

There should be no need to create a new module.

We need a new module, I think. The problem is the following actions do not have style modules but have styles in legacy:

    • ?action=preview has .previewnote
  • ?action=protect has .mw-protect-editreasons
  • ?action=credits has #mw-credits a

but i guess the problem is what it's called. Maybe mediawiki.action.other.styles ?

Change 675145 had a related patch set uploaded (by Mainframe98; author: Mainframe98):
[mediawiki/core@master] Create mediawiki.action.other.styles module for misc action styles

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

Change 675145 merged by jenkins-bot:

[mediawiki/core@master] Create mediawiki.actions.styles module for misc action styles

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

Jdlrobson updated the task description. (Show Details)