The MobileFrontend section numbers that were used here only count
top-level sections, but this value was passed to code in
MobileFrontend's TalkSectionOverlay#onSaveClick, which uses an API
expecting the standard MediaWiki section numbers.
Extract the section number from the section edit link, like we do
in mobile.init/editor.js in MobileFrontend.
Also, disable the special talk page view unless we're viewing the
latest revision of the page. That could also lead to posting in the
wrong section, as sections are often added and removed, which changes
the numbers.
Bug: T252828
Change-Id: I553a508658804dd8672f2268b7118f77458a9dba
Additional changes:
* Address a fixme relating to the overflow icon and move some AMC styles
out of the critical path for non-AMC pages
Note about ellipsis:
The class mf-mw-ui-icon-rotate-clockwise cannot be used as it's part of
MobileFrontend and loaded via JS. Minerva must work without MobileFrontend
and this rotation is needed without JS.
Bug: T244444
Change-Id: Ifd02c50305cf036dd6df640d778678668507e5eb
When enchancing the watchlist items with the "time ago"
feature, the "last-modified-bar__text" class is added
to the element, which could have unexpected consequences.
That class is removed from the watchlist and instead
of using it as a JS selector, the `modified-enhancement`
class is used for both the watchlist and last-modified
bar.
Change-Id: I4a157adf51b9ed45bcba977f4f6622c7991471ba
In Ia3bafc74a85293c2414c0ef4ccf3bb20c75135d1 this icon was renamed
but this reference was not updated.
The module will soon be removed in I181d41f60481efa904d5e951cf08480bbae82015
This will not fixed cached HTML. The damage is already done, so we'll
have to live with this bug on old cached HTML for up to 7 days.
Bug: T249864
Change-Id: I20b838ed5ab478ae60b2cbf6abf5df448d8f4e59
The icon pack wikimedia.ui was strangely using a non-standard
icon class using empty strings as a way to disable the default behaviour
of setIcon. Instead of fighting APIs - use the methods available.
The icon pack is also renamed to reflect what it's actually used for -
providing icons for overflow menus and it is no longer loaded as a dependency
by skins.minerva.scripts
Fixes issues with:
* History icon with AMC disabled and user is logged in
* Table of contents icon
* Language icon when it appears in overflow menu on user pages
when logged in where AMC is disabled
* listBullet appears in 2 modules as it is used in 2 places - the AMC
overflow menu (log icon on user overflow menu) and for table of contents
(JS only)
Bug: T232383
Change-Id: I05220ffa56195be6a594e3a8a57ae16858088444
Renaming to WikimediaUI standard naming and adding to module
skins.minerva.icons.wikimedia which is loaded via addModuleStyles
'edit' → 'editLock'
'edit-enabled' → 'edit'
'toc' → 'listBullet' (already included in wikimedia.ui module)
'mainmenu' → 'menu'
'language-switcher' → 'language'
'clock' → 'history'
Icon `page-actions-overflow` which is only needed on AMC is moved out of the stable icon
pack and added to skins.minerva.mainMenu.advanced.icons temporarily which is loaded on AMC pages only:
'page-actions-overflow'
Additional changes:
* Renaming 'clockIconClass' to 'historyIconClass' to stay on name.
* Module `skins.minerva.icons.images` is deprecated and shipped for old
HTML markup. It will be removed in 2 weeks.
Bug: T232383
Change-Id: Ia3bafc74a85293c2414c0ef4ccf3bb20c75135d1
It was a bit of a maze trying to work out how we generate our
hamburger button. Much of this abstraction seems unnecessary when
we can rely on template partials and data instead.
Change-Id: I791640fea29f87334dcc36baf92ea9e300d8a07c
Poked around the revision history a bit and found that the usage
of this variable as removed in f5bef2e but its definition was not.
Added return type hint for the `prepareToggle()` method too.
Change-Id: I9950f4c81bb914bf2c2d3c13c60d3f0a040a0ae1
For all mainMenu icons pull from OOUI icon packs.
We make the necessary changes to Definitions.php, ToolbarBuilder
and LogoutMenuEntry to ensure to update icon glyph names.
There are caching implications for icons that show to anonymous users -
these have been fixed for grade A browsers running JS by appending the
new class to impacted elements.
Grade C browsers being served cached HTML will not benefit from this
emporary fix as available solutions are costly.
As a result these users will not see icons until the cache
expires (maximum of 4 weeks but likely 1 week) or is flushed via
action=purge.
This is acceptable given the amount of impacted users and the fact that
icons are not essential for using the main menu.
Note: The communityportal.svg icon while in the resources folder was
not referenced anywhere in the codebase so its removal is safe.
Please note the same icon in skins.minerva.mainMenu.advanced.icons which
is used for the community portal menu item.
Bug: T244444
Change-Id: I0f929f2f3b11362e02f0d02f57b90b34b5c93d24
It's called 'markup'. Since this icon only ever shows to logged in
users there are no caching implications.
Bug: T244444
Change-Id: I75f5365ccb5a41f1c0628532e81b5ec63804a2a8
This reverts commit 7b4b65a30f, which
caused a regression in the user menu part of Advanced Mobile
Contributions mode.
Bug: T244436
Change-Id: Ifce627dac35b2cd05e1c5ebe658534b6b8d0de88
As far as I can tell, this is unused and the invoked method doesn't
cause any side effects. Therefore, I think it can be safely removed.
Change-Id: I8b507b4bf38a8a0e70684165d8a48c2d284cdd11
* Drop non-existent pointer-overlay selector
* Drop redundant icon class for arrow
* Drop unnecessary !important
* Drop transparent-shield class
* Reword an existing FIXME about a contensious decision and
add a new FIXME for moving some code to a more appropriate place.
* Move an image into a ResourceLoaderImage module (test with
`mw.notify('error', { type: 'error'} )`)
Change-Id: I6e38f07772afae6f13c4851ca17a67d52ca7d331
Previously it always used the global context RequestContext::getMain(),
which is basically equivalent to using $wgTitle or $wgUser, and will
not produce the correct results when used in other situations than
regular web requests (e.g. API requests or jobs).
MinervaPagePermissions is required to parse pages (due to the custom
section edit links in SkinMinerva::doEditSectionLink), which is often
done in API requests or jobs.
Pass the appropriate context in SkinMinerva::getPermissions(). This
fixes T234868. Note that MinervaPagePermissions is also used elsewhere
and I am not fixing those cases.
Depends-On: Iaa83e5f801c7776bf8218d8ce7484e2485b227d4
Bug: T234868
Change-Id: I2d6fd525f20a0b6beeeaa731f6b8caa471b8529d
At some point I introduced a bad label aria ID,
minerva-user-menu-toggle, for the user navigation. This was the
incorrect text and ID to use. Further, the ID is not present in non-AMC
mode (which is what search engines use). This patches adds a new string,
minerva-user-navigation, and replaces the aria-labelledby attribute with
a direct aria-label.
Bug: T242281
Change-Id: Ic247eb77609862b62025dc5e6af550c079df26d9
Converts the main menu button to work without JS using the CSS-only
"checkbox" hack, using the ToggleList module from the dropdown menus.
Bug: T225213
Change-Id: I0eff0439f7284ec74f6304324fab409e8a1b6245
This config is provided by MobileFrontend.
It should not be added in Minerva.
We need to remove this to avoid adding the theme twice.
Depends-On: Id21038e3df60f279af40681307e14ef82ce60294
Change-Id: I7f9a69eca396ef1a17898dc128f38feefa68a21a