Commit graph

545 commits

Author SHA1 Message Date
Volker E 9845433bf1 Remove unused 'sectionAnchor.less'
File is not referenced and not in use as MF removes class.

Change-Id: I4fb9f887f38b991ac809903a120844d24fbbcac6
2019-05-09 08:07:43 -07:00
Ed Sanders 8e352f7824 Connect initMediaViewer to wikipage.content hook
This means if new content is added to the page, it
will be connected to the media viewer code.

Depends-On: I79caa6d1b83ec2a618ca703607165197add4e100
Change-Id: I9936ee1decaa5de6677bc33ebe726ff6253d6ac5
2019-05-08 18:41:22 +00:00
jenkins-bot 17b821861a Merge "Fix: AMC overflow menu initial CSS and SSR icons" 2019-05-01 21:06:18 +00:00
jenkins-bot dcf2d589a3 Merge "Minerva is Hogan free" 2019-05-01 19:41:39 +00:00
jenkins-bot db3e6d2380 Merge "Do not use pass the "string" (deprecated parameter) to toast show method" 2019-05-01 18:25:15 +00:00
jdlrobson 281341f0b4 Do not use pass the "string" (deprecated parameter) to toast show method
Bug: T217220
Change-Id: Ie188a0e613d16775c327dadf505cf8a10005d450
2019-05-01 17:15:32 +00:00
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
Volker E cd61867f0a Unify ul bullet styling
Unifying unordered lists bullet styling with Wikimedia Design Style
Guide defaults and other products.

Bug: T220323
Change-Id: Ifa990010cf80010cd3184f9bcb72fc081674db05
2019-04-30 10:25:35 -07:00
Volker E e562227392 Remove ol overrides to ensure list styles in non-Arabic number scripts
Bug: T205341
Bug: T217616
Change-Id: I66a677ab5d7ea4555d16d5761340eaad4158c3bc
2019-04-29 21:53:15 +02:00
jenkins-bot f1ccfd50e1 Merge "Switch to outside list style for ordered lists too (second try)" 2019-04-29 19:45:14 +00: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
jdlrobson daef425ba1 Minerva is Hogan free
All hail Mustache!

Change-Id: Iaf83dc27addd00ffd65d003bd5d84441965124e8
Depends-On: If00010e092e3766f9812f9a69ce0dfe22298689a
Bug: T220620
2019-04-25 10:34:01 +08: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 6cd23276b2 Merge "QA: Port Notifications browser test to Node.js" 2019-04-19 12:07:16 +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 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 5f6f75e487 Add basic hr element styles
Bug: T221020
Change-Id: I90cef54b48d5934dac4adac6be6ffe7145a726f4
2019-04-15 17:43:09 -07: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
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
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
jenkins-bot f9ac8d40e5 Merge "Increase margin-top for h3 following p elements" 2019-04-04 18:15:34 +00:00
Volker E 6a078ddb65 Increase margin-top for h3 following p elements
With Id00fbe7ca90a in, this inharmonious, too close distance has
become more obvious.

Bug: T219572
Change-Id: Ie9689d29b6553aadf8ec4781369ec966b4a34abe
2019-04-04 18:01:55 +00:00
James D. Forrester 75a751f1c6 build: Upgrade eslint-config-wikimedia from 0.10.1 to 0.11.0
Change-Id: I36a88cbf8b468646c21d47c3b58433895e8ff31a
2019-04-04 18:01:40 +00:00
jenkins-bot 381170d00e Merge "Provide focus styles only in overlay" 2019-04-04 10:17:46 +00:00
Volker E 1c2a354a78 Provide focus styles only in overlay
Preventing double transition in search input focus by limiting styles
only to non-JS or when JavaScript enabled to the overlay.
Also introducing standard transition to smoothen it further.

Bug: T218154
Change-Id: I2344bfc7c4edc1941119565d7b113788e8713624
2019-04-03 19:46:53 -07:00
Volker E 681a752f29 Remove .background-size() mixin usage
Removing deprecated LESS `.background-size()` mixin calls.
Also
- simplifying code, where second (height) value is automatically set
  to `auto` when only one value is set and
- removing stylelint rule.

Bug: T219956
Change-Id: I643c66b3067ba77726d76cbebf7550781e18aa5d
2019-04-03 18:02:48 -07:00
jenkins-bot 541ee9b3eb Merge "Reduce li selector specificity for general li treatment" 2019-04-02 00:25:22 +00:00
Nicholas Ray 517e4f537a Add amc boolean to MobileWebMainMenuClickTracking sampling
Now that we can determine client side whether or not a user is in AMC
mode from Ie000fc8f938a76d10c2566f17f933cef40aa1665, let's add this data
to MobileWebMainMenuClickTracking sampling. Per T218627, if the user has
amc enabled, the sampling rate will be 100%. If not, the sampling rate
will follow wgMinervaSchemaMainMenuClickTrackingSampleRate.

Additional changes:

* Removes an outdated comment at top of schema.js (this has already been
moved)

* Corrects jsdoc comment for defaults.mode

* Updates EventLoggingSchemas entry for MobileWebMainMenuClickTracking
in skin.json to accommodate new amc field.

Depends-On: Ie000fc8f938a76d10c2566f17f933cef40aa1665
Bug: T218627
Change-Id: I950a6efd1040c3a270d09bff298ee1781a010328
2019-04-01 17:39:16 -06:00
Volker E 8398bda8fd Reduce li selector specificity for general li treatment
Same margin is used for both `ol li` and `ul li`. And `li` shouldn't
be used anywhere else then as child of those two parent elements or
`menu` anyways, which doesn't seem in use on mobile, therefore reducing
the specificity.
Side-effects would only be visible in invalid code.

Change-Id: Idddc3115b08c9937a1d2141b23f33008d6776f60
2019-03-29 22:56:16 -07:00
jenkins-bot a03ced4677 Merge "Add default focus treatment to search" 2019-03-29 16:27:07 +00:00
jenkins-bot 3ace1a7615 Merge "Images should have borders in Android app / parsoid generated content" 2019-03-29 14:57:02 +00:00
Volker E e75b3dfa37 Add default focus treatment to search
Bug: T218154
Depends-on: I73505c1d180f157939493883d50a4440a66ae995
Change-Id: I187f20d9ec7847b17a19be59e87a574d813a3a10
2019-03-28 15:09:54 -07:00
Volker E 1f418a20b8 Remove unnecessary double assignment of font-family
Headings inherit from body, therefore removing unnecessary double
assignment of sans serif font family value.

Change-Id: Iebea830399703b5f95ff87f2e0b91660df8c79cc
2019-03-27 20:24:58 +00:00
jenkins-bot 875b22d5a5 Merge "Use system font stack as sans-serif choice" 2019-03-27 18:11:05 +00:00
Volker E a738f25c05 Use system font stack as sans-serif choice
Using system font stack provides better reading experience on wider
range of operating systems and languages combinations.

Adding `fontFamilyBase` variable to easier update and clarify usage.

Bug: T175877
Change-Id: Id00fbe7ca90a3b31524c618de4441c413fe4afbe
2019-03-27 10:01:01 -07:00
Jan Drewniak e42a655e9a Fix alignment of "learn-more" link on page-issues
Fixes the extra padding below the page-issues boxes as well
as the alignment of the "learn-more" link relative to the rest of
the text in the issues box.

Bug: T214549
Change-Id: I691254af76c65a3d620ec28bce6bb16b8977607d
2019-03-26 13:11:16 +01:00
Nicholas Ray 799f426f5b Make minerva use updated mediaViewerOverlay factory function
Additional changes:

* rlModuleLoader is no longer needed now that the mediaViewerOverlay is
part of mobile.startup so that was removed in addition to the calls to
it.

* Removed the EVENT_SLIDE/EVENT_EXIT logic as the mediaViewerOverlay
now handles its own slide/exit behavior

Bug: T216198
Depends-On: I36e3c0645c931492fbef0b7c0a49f6a418dbd3a1
Change-Id: I04656c4adb7edc9a111447de3d63044044a8d6dd
2019-03-25 14:18:16 -06:00
jdlrobson 05e6069ab6 Images should have borders in Android app / parsoid generated content
To test check out  I5c1fdfc87a48764cbb53b7a751fbffc1a4e36fc5
``
$wgMFContentProviderClass = 'MobileFrontend\ContentProviders\McsContentProvider';
$wgMFMcsContentProviderBaseUri = "https://he.wikipedia.org/api/rest_v1";
```
Navigate to http://localhost:8888/w/index.php/%D7%93%D7%92%D7%9C_%D7%99%D7%A4%D7%9F

Bug: T198534
Change-Id: I19e9456895789abc413679105da46cbd4f9f0ce9
2019-03-23 00:15:04 +00:00
jenkins-bot e7c497bda7 Merge "Cleanup NotificationBadge and notification overlay creation" 2019-03-22 20:53:35 +00:00
jdlrobson ee97d1acd3 Cleanup NotificationBadge and notification overlay creation
Load notification overlay instantly.
Filter overlay will be taken care of in a follow up patch

Depends-On: Id595b1158b86db9dc7725c8e3c0fb9cc35f49134
Change-Id: I1e1de678b98f225c3a0534e5e649602eb856dbe4
Bug: T217296
2019-03-22 13:34:34 -07:00
Jan Drewniak 6d34e401ff Remove skins.minerva.icons.images.variants module
This module produces 6 icons:

["clock", "profile"] * ["black", "gray", "white"]

of which only 3 are needed: clock-gray, clock-white, profile-gray.

This patch removes the module and moves the "clock" and "profile"
icons into `skins.minerva.icons.images`. Since that module
does not inline SVG's, the additional cost of adding these icons,
which are loaded at startup, is minimal.

The editLocked.svg icon has also been edited to correct its color.

Bug: T218807
Change-Id: Ib54960eb556dfe0c1ae06d2f73d4f350e519e20f
2019-03-22 09:46:14 -07:00
jdlrobson 4cb7852284 Drop unused parameter in NotificationBadge
The onError option is never passed to an overlay. It seems to have historically
intended to be sent to the NotificationsOverlay, but that is not
needed and will no longer be supported.

Bug: T217296
Change-Id: Ia9f436060062ccf52005582ff49e0e13b0cfbb8d
2019-03-19 13:56:20 -07:00
Stephen Niedzielski 88dd2530e7 Update: don't prompt to create User pages
Suppress the redlink drawer for User namespace pages. The redlink drawer
prompts the user to create a missing page but this hinders the usual
workflow for User page visits specifically. A User page is connection to
an account's contributions, age, and other activities and encouraging
the creation of a missing User page when trying to view these
connections is a hindrance, especially if the missing User page is not
associated with the current user.

Bug: T201339
Change-Id: I784493a8ecf28176b5a393cb52d7bfa9fa9b1309
2019-03-19 18:07:32 +00:00
jenkins-bot 4c10e0524d Merge "Track share button usage" 2019-03-18 16:34:59 +00:00
Piotr Miazga 6c2450a5f2 Track share button usage
Use MobileWebShareButton schema to track interactions with

Additional changes: Fix how button is injected into page actions
bar as last AMC changes broke it.

Bug: T207280
Change-Id: Ie7d7ab6bc66df5ab30aaec77e2ee8583c69b8f48
2019-03-18 09:03:42 -07:00
jenkins-bot ee82a568cb Merge "Track links shared by Share feature" 2019-03-18 15:58:44 +00:00
jenkins-bot dddb34dfdc Merge "Remove Nokia60 override and use a CSS property order" 2019-03-16 00:35:06 +00:00