Commit graph

1415 commits

Author SHA1 Message Date
Stephen Niedzielski b594daf8c8 Fix: AMC overflow menu initial CSS and SSR icons
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
2019-05-01 09:29:50 -06:00
Translation updater bot 9f0bd0d05c Localisation updates from https://translatewiki.net.
Change-Id: If92d8c10619e4fa60fa9713140cac6e1cbacaf49
2019-04-26 22:03:35 +02:00
Nicholas Ray 858935210b Hygiene: Cleanup schemaMobileWebMainMenuClickTracking sampling rate logic
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
2019-04-26 11:13:35 -06:00
Volker E b308c33a74 Amend history action page mixin's name
Amending name to be equal to current CSS class naming scheme,
even if it's not perfect, for simpler maintainability.

Change-Id: Ie1f0dc26dceb92be650d827d63a62092912ac504
2019-04-25 01:47:47 -07:00
Translation updater bot eb2736cfe5 Localisation updates from https://translatewiki.net.
Change-Id: Idf354a99dc73a76c460b71c7efd440b9168efe2f
2019-04-24 21:56:45 +02:00
jenkins-bot 8086325cd2 Merge "Reset history page styles for Minerva" 2019-04-24 13:26:53 +00:00
Translation updater bot 440e725030 Localisation updates from https://translatewiki.net.
Change-Id: I7751bc87fe78b0867a48a6f72a234e8c15ba2718
2019-04-23 22:27:33 +02:00
jdlrobson 6ade2b1ec6 Reset history page styles for Minerva
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
2019-04-23 10:17:50 +02:00
Nicholas Ray 1be4a9e55a Change MinervaSchemaMainMenuClickTrackingSampleRate default in README
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
2019-04-23 01:25:15 +00:00
Translation updater bot 96abdd2597 Localisation updates from https://translatewiki.net.
Change-Id: I46a44bf6ca6de9ced4052a95a972fa326b16eb8e
2019-04-22 09:04:04 +02:00
jenkins-bot efcc4792a4 Merge "Hygiene: Various cleanup in Minerva PHP code" 2019-04-20 00:50:19 +00:00
Derick Alangi 2681fa1b13 Hygiene: Various cleanup in Minerva PHP code
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
2019-04-20 00:37:09 +00:00
jenkins-bot 55ad654176 Merge "Update: add secondary page actions submenu in AMC mode" 2019-04-19 22:15:22 +00:00
Stephen Niedzielski 815f3386e3 Update: add secondary page actions submenu in AMC mode
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
2019-04-19 14:51:17 +00:00
jenkins-bot 9ceabb6bda Merge "Port remaining @login tests to Node.js" 2019-04-19 12:07:18 +00:00
jenkins-bot 6cd23276b2 Merge "QA: Port Notifications browser test to Node.js" 2019-04-19 12:07:16 +00:00
jenkins-bot fd5570cc1b Merge "Migrate editor_wikitext_saving.feature from Ruby to Node" 2019-04-19 12:07:14 +00:00
Piotr Miazga 692309090d Remove Recent Changes from Main Menu
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
2019-04-18 20:32:23 +02:00
jenkins-bot ad7e941bde Merge "Use operating system font stack for monospace fonts" 2019-04-17 20:24:32 +00:00
jenkins-bot 8767b8ad18 Merge "Add basic hr element styles" 2019-04-17 20:16:01 +00:00
Piotr Miazga 2cf4ed8981 Add Community Portal link to Mobile Main Menu
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
2019-04-16 11:21:43 +00:00
Piotr Miazga 1f4582cc09 Provide a code structure for menus handling and add Advanced menu
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
2019-04-16 13:19:51 +02:00
Volker E 9b117122c4 Use operating system font stack for monospace fonts
Using Design Style Guide defined operating system font stack for
monospace fonts, to align to similar sans serif choices.

Bug: T221043
Change-Id: Ic5e2fd4d4803a830c61678aafd8411ac607dd08d
2019-04-15 18:05:29 -07:00
Volker E 5f6f75e487 Add basic hr element styles
Bug: T221020
Change-Id: I90cef54b48d5934dac4adac6be6ffe7145a726f4
2019-04-15 17:43:09 -07:00
Piotr Miazga 258e635ae5 Extract SkinOptions to separate class
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
2019-04-15 20:34:12 +00:00
jenkins-bot 13153394a3 Merge "Use MediaWikiServices to cache commonly used helpers" 2019-04-15 19:19:45 +00:00
Piotr Miazga 572ffdf25a Use MediaWikiServices to cache commonly used helpers
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
2019-04-15 20:50:11 +02:00
Translation updater bot 3250ac6401 Localisation updates from https://translatewiki.net.
Change-Id: Ic23431a64ee7d57a3edaf22cad812c92799190f7
2019-04-14 22:03:31 +02:00
Translation updater bot 52e8eed461 Localisation updates from https://translatewiki.net.
Change-Id: Iacfa6f19920d505005b6d81dc0bb7e05316be0ba
2019-04-12 08:13:12 +02:00
jdlrobson 544b0e70c9 Port remaining @login tests to Node.js
Bug: T219920
Change-Id: I9f651d73cae8d6494ffa585ac3cbd791686b926a
2019-04-11 21:17:45 +00:00
jdlrobson c16c20a394 QA: Port Notifications browser test to Node.js
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
2019-04-11 13:26:39 -07:00
jdlrobson 7f2b69ac14 Migrate editor_wikitext_saving.feature from Ruby to Node
This migrates the first of the browser tests which had a @login
step from Ruby to Node.js

Bug: T219920
Change-Id: I84e217e2a781aab9eb10e7d873c527d578ec8fd4
2019-04-11 13:04:49 -07:00
jenkins-bot b2448e0d23 Merge "Adding "diff.feature" selenium test" 2019-04-11 18:19:56 +00:00
jdlrobson 9e92bdbc50 Run Minerva browser tests against the mobile domain
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
2019-04-11 15:43:52 +00:00
Jan Drewniak 6bd240389e Adding "diff.feature" selenium test
Bug: T219920
Change-Id: I34b5301a274fe90a7a2db58a8bec2b9398d998b6
2019-04-10 23:15:37 +00:00
Stephen Niedzielski cbea4fabd5 Hygiene: remove unused downloadPageAction argument
Remove unused Skin parameter from downloadPageAction.

Change-Id: I27cd85b1e4f2328d3d4fd0ece5580c4432181757
2019-04-10 15:21:27 -06:00
jenkins-bot effda33eab Merge "Removing code related to old page-action menu markup" 2019-04-10 20:56:07 +00:00
Jan Drewniak 7821b1499c Removing code related to old page-action menu markup
Bug: T218653
Change-Id: Ifafe86f36be59fc22bb02c42b3ff12509c67b53d
2019-04-10 22:31:14 +02:00
Jdlrobson dac9039246 Revert "Beta mode cookie must be set on mobile domain"
This reverts commit 1903d1adae.
This didn't actually solve the problem.

Change-Id: Ic789e96dcc17268abe3690647e1d82a764491646
2019-04-10 20:28:17 +00:00
jdlrobson 1903d1adae Beta mode cookie must be set on mobile domain
On the Selenium daily job, there are 2 domains -
https://en.wikipedia.beta.wmflabs.org
and
https://en.m.wikipedia.beta.wmflabs.org

Currently the cookie gets set on the former, meaning it doesn't work
This should take care of this, while also accounting for running the
browser tests (as we do in the zuul runs) in a single domain

Bug: T219920
Change-Id: I54838fb8aba559c4d72c444968493dff2de9b4f9
2019-04-10 16:34:01 +00:00
jdlrobson 4a5c719031 Selenium daily job should mirror selenium-test
Follow up to Ic6d4893df172f821111c8eb4c95a5e78a809a82c
copying example of Echo

Change-Id: Idf79a72ad5d6de99e427f1a128be954efb3a9322
2019-04-10 02:25:06 +00:00
jdlrobson 377a899b12 QA: Do not use local paths for page objects
These will not run in the daily build!

Change-Id: I10c6c083949c043779b9ceca70d27fc0a303c39a
2019-04-10 00:30:11 +00:00
jdlrobson 9a9749603f Add missing dependency for Selenium daily job
Change-Id: I2a650b85879b1a16643064483ebdcf21d0f10497
2019-04-09 23:48:32 +00:00
jdlrobson 9fced7557f Setup the selenium daily job
Bug: T219920
Change-Id: Ic6d4893df172f821111c8eb4c95a5e78a809a82c
2019-04-09 21:28:17 +00:00
jdlrobson 6918c70780 QA: Remove test that has been ported to Node.js
Follow up to Iad954405a5ae0608fd5dc90dd5dfa434b3781037
This test now lives in tests/selenium
It should be removed as we don't want to run this test twice.

Change-Id: Idc99ffdf0fedf65d46095a77a0066c5eef95c960
2019-04-09 04:53:57 +00:00
jenkins-bot 32c804b2fb Merge "Adding initial webdriver.io test" 2019-04-08 23:28:31 +00:00
Jan Drewniak 26e413e04d Adding initial webdriver.io test
Porting first selenium test from Ruby to Node.js using the
mocha framework. Starting with `category.feature` test.

Tests are placed in a new `tests/selenium` folder with their
own eslint config.

Bug: T190710
Change-Id: Iad954405a5ae0608fd5dc90dd5dfa434b3781037
2019-04-08 16:05:22 -07:00
jdlrobson e836083ad1 Consult "shouldUseSpecialHistory" when making history page link
This avoids an unnecessary redirect in mobile for AMC users.
Bug: T219874
Change-Id: I049045d44f6e45ebb2c81f90aac4bb20831890df
2019-04-08 22:05:44 +00:00
jenkins-bot f9ac8d40e5 Merge "Increase margin-top for h3 following p elements" 2019-04-04 18:15:34 +00:00
jenkins-bot 1df9ad70df Merge "build: Upgrade eslint-config-wikimedia from 0.10.1 to 0.11.0" 2019-04-04 18:15:33 +00:00