Page MenuHomePhabricator

Minerva HTML markup change: #page-actions is now #p-views
Open, Needs TriagePublicBUG REPORT

Description

In T346944 we've renamed the element ID #page-actions in Minerva to #p-views. This is to match other skins and to improve support for gadgets and extensionse in the mobile skin. It adds support for the mw.util.addPortletLink function.

This will cause some disruption to skins but provides a a stable interface going forward.

$( '#page-actions' ).append(
       $( '<li>' ).attr( {
         id: 'page-actions-export-epub',
         class: 'page-actions-menu__list-item',
       } ).append(
         $( '<a>' ).attr( {
           id: 'ca-export-epub',
           class: 'export-epub mw-ui-icon mw-ui-icon-element',
           href: '//tools.wmflabs.org/wsexport/tool/book.php?lang=th&format=epub&page=' + mw.config.get( 'wgPageName' ),
           title: 'ดาวน์โหลดรุ่น EPUB ของหน้านี้'
         } ).append("Download EPUB")
       )
     );

can be replaced with

mw.util.addPortletLink( 'p-views',  'https://tools.wmflabs.org/wsexport/tool/book.php?lang=ca&format=epub&page=' + mw.config.get( 'wgPageName' ), 'ePub', 'ca-export-epub' );
mw.util.addCSS('#ca-export-epub .minerva-icon { background-image: url(..); }');

Required actions

  • Use addPortletLink for adding menu items. Define icon.
  • Remove #page-actions selectors where possible. Extensions/skins ideally should not style code that they do not define.
  • Replace any #page-actions selectors with #p-views or #p-views,#page-actions where required.

Impacted code

https://codesearch.wmcloud.org/deployed/?q=%23page-actions%28%27%7C+%29&files=&excludeFiles=&repos=
https://global-search.toolforge.org/?q=%5C%23page-actions&regex=1&namespaces=8&title=%28Gadget%7CMobile%7CMinerva%29.* (29) [not a complete list]

Event Timeline

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

[mediawiki/extensions/ExternalGuidance@master] Update selector for page actions in Minerva

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

Re: Tech News - What wording would you suggest as the content? and when will the change occur (so that I know which section to put it in)?
(Suggested-Draft summaries always help me a lot and are deeply appreciated!)
After reading the task and patch description, my best guess is something like:

Future changes

  • In the mobile web skin (Minerva) the CSS ID #page-actions [has been/will be [when?]] replaced with #p-views. This change is to make it consistent with other skins and to improve support for gadgets and extensions in the mobile skin. A few gadgets need to be updated; there are details and search-links in the task.

In the mobile web skin (Minerva) the CSS ID #page-actions has been replaced with #p-views (changes will roll out week of 9th). This change is to make it consistent with other skins and to improve support for gadgets and extensions in the mobile skin. A few gadgets may need to be updated; there are details and search-links in the task.

Change 963773 merged by jenkins-bot:

[mediawiki/extensions/ExternalGuidance@master] Update selector for page actions in Minerva

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

Nikerabbit subscribed.

Seems like ExternalGuidance is fixed already (there is one instance left, but only in comments).