When advanced mobile contributions is enabled and the overflow menu is
shown:
- The initial state should have no transition. This prevents the menu
from flickering initially. Move the transition to the checked state
only.
- The icons should be available for server-side rendered HTML without
JavaScript. Add wikimedia.ui to the SSR modules.
Bug: T216418#5129152
Change-Id: I3b91f6cdefd4b727c2fb512272d8c4282af632bf
AMC mode is already determined prior to the `trackSubscribe` callback
executing so we can set the sampling rate outside
the callback as well.
Hopefully, this improves readability. If not, I'm happy to abandon this
patch.
Change-Id: Ic1386c0e31ae7fbdd52f18d3b881ec6a5fb5a67c
Amending name to be equal to current CSS class naming scheme,
even if it's not perfect, for simpler maintainability.
Change-Id: Ie1f0dc26dceb92be650d827d63a62092912ac504
This provides us with a blank canvas for styling Minerva's history
page in AMC mode.
I have also provided styles for a non-AMC mode (test by changing
the class on body tag to minerva--amc-disabled). This will allow us
to remove the SpecialMobileHistory page in mobile if we choose to
do so.
Change-Id: Ic57cb79903e90ce1bbfa6d87ab0499f09373e732
Per T199939#5096023 use job runner to execute the job runner
as part of the test to ensure the API can return categories for
a page.
Bug: T219920
Change-Id: I467f6635fd0d80a01428f6b06a8c750430d63d6d
The Minerva README.md says the default for this should be 0.5 not 0.
Let's change this to 0 in the README to reflect the value in the
skin.json and avoid confusion.
Bug: T218627
Change-Id: I0e75b25729f99fa889dc230e68d5ee0b8e5f2df2
Cleanup ranges from removal of unused variables, fixing of method
case mismatch, collapsing of multiple `if` statement that can be
combined into one.
Change-Id: Ib9d6e2e4d747da699067c0c0a9aab5e8af29aef2
When advanced mobile contributions mode is enabled and
`$wgMinervaOverflowInPageActions` is set, show a secondary overflow menu
on main namespace articles and user namespace pages. The menu content
varies for each namespace. The new submenu is *disabled* by default,
even when AMC is active. This feature should not be deployed until
instrumentation is available.
The secondary menu is rendered in PHP using the existing menu system
with some changes to the template. The checkbox hack is needed for no-
JavaScript keyboard navigation until :focus-within is supported. CSS
additions are documented in the source.
All client side toolbar execution occurs in Toolbar.js. Enhancements are
documented in the source.
Minor changes to the existing download button:
- Move download and edit button initialization to Toolbar.
- Update copy (not visible) from "Download" to "Download PDF".
- When the overflow menu is present, use the "hasText" / label style.
Wikimedia UI icons are copied from OOUI at d00a0ac and seem useful to
expose as HTTP URIs (not data URIs).
The overflow menu does not show for pages provided by the content proxy
since its entries depend on $tpl->data['nav_urls'] being populated.
Bug: T216418
Depends-On: I0781151a8232b6a7b52f79a34298afcecb8e4271
Change-Id: I4b50a0e519024a7ab91dae6ab40b23cf14a03861
We decided to remove the Recent Changes menu entry from Advanced
menu for now, we might come back to it later.
For more info: https://phabricator.wikimedia.org/T216152#5123296
Bug: T216152
Change-Id: I6342e273fdc5f483692de6e1ac238c38d06f3e5f
Changes:
- introduced new icon for Community Portal
- added new menu entry in Advanced Builder that links to
MediaWiki:Portal-url
Bug: T216152
Change-Id: Id38836d8f1a62d4e15181ab10e219d5c5b769ec3
Changes:
- moved all menu elements definitions from SkinMinerva into
a separate Definitions.php file
- moved menu building from SkinMinerva into includes/menu/Main
folder
- introduced Builder pattern for easy menu building
Minerva/Menu/Main/Director takes an Minerva/Menu/Main/IBuilder
and builds the menu. The IBuilders use definitions from
Minerva/Menu/Definitions file, so all definitions can be shared
across different menus
- used ServiceWiring file to register MainMenu Director as Service
- left class_alias for old MenuBuilder as some extensions still use it
- The hooks system have to stay like that as some extensions
are using it (BlueSpiceMultiUpload and GrowthExperiments).
- introduced AdvancedMenu builder for the AMC mode
Bug: T216152
Change-Id: I210c3f1fa36bbd2f9108d728b12cbb21ee210354
Using Design Style Guide defined operating system font stack for
monospace fonts, to align to similar sans serif choices.
Bug: T221043
Change-Id: Ic5e2fd4d4803a830c61678aafd8411ac607dd08d
SkinOptions array was used to determine which options are available
for current session. Once we started extracting things from
SkinMinerva class, we found out that lots of things depend on
SkinOptions.
For example MainMenu/PageActionsMenu depend on skinsOptions var.
We could pass $skin object as dependency to a menu builder, but
this would cause a circural dependency (Skin depends on menu builder,
menu builder depends on skin) which is an anti-pattern.
In order to avoid such situations lets prepare first, and extract
the SkinOptions to a separate class, register it as a service
so different parts of Skin Minerva can freely use a single instance
of SkinOptions object.
Bug: T216152
Bug: T221012
Change-Id: Icd5da546e1bfaf8d9bfe86dab3b659a88eae19e4
SkinMinerva cached the ContentHandler object for better performance.
In the future the ContentHandler will be also used in the Menu,
for better readability, store ContentHandler as Service.
MediaWikiServices will initialize service on first access and cache
it for future needs. Same applies to SkinUserPageHelper,
Bug: T216152
Change-Id: Ia98dc860862360a68556272714669f0c3a13eb1e
Uncover a bug and fix it in the process \o/ - it seems that the
close icon is misplaced between clicking the notifications icon
and loading the contents of the overlay - this confuses the webdriver
as the button is not clickable.
Bug: T219920
Change-Id: Ib4d076fd9b7ea1cd48b6b58940a50560eacd51a0
This migrates the first of the browser tests which had a @login
step from Ruby to Node.js
Bug: T219920
Change-Id: I84e217e2a781aab9eb10e7d873c527d578ec8fd4
There doesn't seem to be an easy way to set Minerva as the
default skin for anonymous users, so this is probably the
best way to assure all actions happen in Minerva skin - not Vector
which is the default desktop skin!
Bug: T190710
Bug: T220658
Change-Id: I6912db022cdea1adad1e3842af23602e50969f63