Commit graph

1926 commits

Author SHA1 Message Date
Translation updater bot c2bc33a8ed Localisation updates from https://translatewiki.net.
Change-Id: I80734db55919419b7fe5bc95ff6cfc0eec6df68b
2019-08-28 10:33:34 +02:00
jdlrobson e5aeeea2a8 Restore contributions icon to non-AMC menu
Bug: T231363
Change-Id: I82b9b06a83454cf4b49d906a8358b338d30f892a
2019-08-27 11:00:52 -07:00
jdlrobson 2e4879b3b4 Fix userSandbox path
Bug: T231358
Change-Id: Id8a23d7d5adb8cce38f00dff6acac8799b6803f0
2019-08-27 10:07:48 -07:00
jenkins-bot a75049f4b4 Merge "Track all menu interactions" 2019-08-27 10:01:47 +00:00
jenkins-bot 505a191755 Merge "Avoid unnecessary stopPropagation usage so event click tracking can work" 2019-08-27 10:01:44 +00:00
Translation updater bot 9e52dbcece Localisation updates from https://translatewiki.net.
Change-Id: Ifc558657bd9a62034118e60028acb15e1e249a0c
2019-08-27 11:13:20 +02:00
jenkins-bot 03d82134f9 Merge "Separate AMC icons from non-AMC icons" 2019-08-27 00:16:33 +00:00
jenkins-bot 0a7608085d Merge "Disable hyphenation for links" 2019-08-26 23:30:07 +00:00
jdlrobson 062e067d49 Separate AMC icons from non-AMC icons
Currently a bunch of icons are loaded for all users that are only
ever used for AMC. Clean this up and add notes on the necessary steps
if these ever become the default.

Bug: T229295
Change-Id: I4e16028e7121b0b3e1a60b9404183d483db52ad8
2019-08-26 19:12:48 +00:00
Piotr Miazga c5f38e466d Track all menu interactions
Changes:
 - added support of event-data-name to toggle list and all menu
 entries
 - track main menu open actions
 - prefix all menu interactions with `menu.`
 - prefix menu opening with `ui.`
 - track tab clicks (also a part of new ui)
 - track notification icon clicks

We're not tracking the Download icon as it has it's own
instrumentation.

Bug: T220016
Change-Id: I442103c1f8967c6710429329f024f266c9b11ea6
2019-08-26 11:43:16 -07:00
jdlrobson 44954fe3fd Avoid unnecessary stopPropagation usage so event click tracking can work
Hamburger menu item - stopPropagation and associated comment seem
unnecessary.  Clicking page center is supposed to hide open menus!

Notification item - also unnecessary and outdated comment. Works as
expected without

Talk links - no reason to stopProgation (which happens when you return
false) - only event.preventDefault is needed.

Edit icon - see depends on

Depends-On: Ie23ae7d8dba31b5f524693e60580032e2ccd714f
Bug: T220016
Change-Id: Ica95076f4399d173d49087e5c866f55fe6aec597
2019-08-26 11:43:11 -07:00
Translation updater bot 4bc62f04c3 Localisation updates from https://translatewiki.net.
Change-Id: Iae0f85f66bc287d32e1956862d51e223b02f274c
2019-08-25 09:53:45 +02:00
jdlrobson 9150aec131 Feature flag overhaul
Two new feature flags:
1) MinervaPersonalMenu
2) MinervaAdvancedMainMenu

Changes:
* AMC defaults to false on desktop - desktop doesn't have AMC mode it just
enables several skin options.
* WHen inserting a link at the bottom of the page check whether the talk at top
of the page (tabs) is enabled.. not AMC
* Update ServiceWiring to construct menu based on MinervaAdvancedMainMenu
and  MinervaPersonalMenu - note when former is enabled but not latter there is
no way to logout. Noted in README.
* Use one entry point for skins.minerva.amc.styles/index.less
* Document files inside skins.minerva.amc.styles to make it clear which features
they are associated with
* Drop history page styles when AMC is disabled - it's not possible to ever get to
these as the history page redirects in non-AMC mode
* Rename the class .minerva--amc-enabled to minerva--history-page-action-enabled
to reflect its real purpose and move styles from skins.minerva.base.styles to skins.minerva.amc.styles
No need to worry about cached HTML as AMC runs without cache...
* Remove isAnyAMCOptionEnabled - it's an antipattern and should be discouraged as it discourages the
art of feature flagging. Nothing is using it after these changes.
* The AMC_MODE flag is disabled. There is no need for this - AMC is not a feature and therefore not a
skin option. It is a mechanism for turning on other skin options. Tests are updated.

Testing:
It should now be possible to enable any feature in `beta` and see it in the beta of the
site.

Bug: T229295
Change-Id: I48959905f5c09721b14a27aa1a5ad82849ac6263
2019-08-23 10:48:14 -07:00
jenkins-bot c543219d3a Merge "Dev: Prep for storybook" 2019-08-21 21:08:25 +00:00
jdlrobson 7280d255c0 Dev: Prep for storybook
* Remove ambiguity in imports - say the file extension
'less' for all instances of variables and mixins.
* Separate toast styles from drawer styles so they can be
imported separately
* associate header-action selector with its parent
(.overlay-header) not parent's parent (.overlay) so it can be imported
and rendered without the Overlay.

Change-Id: Ib7e19a440ba095d6424d35305fb41d643ca9764c
2019-08-21 12:20:26 -07:00
Translation updater bot 54db05dd17 Localisation updates from https://translatewiki.net.
Change-Id: Id274dbe9cb3bd6701e6517c5e1f1dd26b72245ff
2019-08-21 10:20:17 +02:00
Shreyas Minocha 9d6a5caf14 Disable hyphenation for links
Should fix a misleading "bug" I noticed wherein URLs sometimes break
over multiple lines with hyphenation, for example `www.exam-ple.com`.

Change-Id: Id96d708e6ba59d6e6a6a093c3195b5121160c899
Bug: T230860
2019-08-21 06:24:35 +00:00
jenkins-bot 5873ab5a8a Merge "Provide access to original redirect page on toasts" 2019-08-20 19:21:13 +00:00
jdlrobson f0197f9492 Correct CSS selector for rollback link
Bug: T230656
Change-Id: I42cab21148e4583a6c8d7d05eebf03e63e1e74e3
2019-08-19 22:09:32 +00:00
Translation updater bot 04998facb8 Localisation updates from https://translatewiki.net.
Change-Id: I046648d02ea0d88c785b6e44b3059945357c50c3
2019-08-15 08:33:36 +02:00
Translation updater bot 28979a02f8 Localisation updates from https://translatewiki.net.
Change-Id: I9e3c07f94d088ad27518010549d7ab1b5068ef9d
2019-08-14 08:34:43 +02:00
Translation updater bot 92672a4d96 Localisation updates from https://translatewiki.net.
Change-Id: I6a3c39fe1211520ff16fb7637bd10f342c7b2a61
2019-08-13 08:35:22 +02:00
jdlrobson ab8da137cb Provide access to original redirect page on toasts
Color progressive/destructive (blue and red) do not make
sense on a black background, so we use white and underlined
for both of these. Note these don't seem to be used currently
so this is not a breaking change.

Bug: T150189
Change-Id: I78a92b5b6c76638633b99fe32670911d355ce6f3
2019-08-12 22:48:14 +00:00
jdlrobson e09a6930b8 Go back before replacing current overlay
There are 2 ways to reach the talk topic create overlay
1) Navigating via link in page directly (currently only possible
on talk pages via new topic button)
2) From the list of talk topics

After saving in both cases you want to "GO BACK" and exit the overlay
before replacing it - otherwise what happens is you end up
replacing the create talk topic overlay with a list of talk topics
with the old instance of the talk overlay underneath (which causes
the OverlayManager a lot of confusion)

You need to go back before replacing stuff.

Bug: T229972
Change-Id: I7cc65dab8883744496380f4e1119cdc31f18f791
2019-08-12 20:33:33 +00:00
jenkins-bot ebfd2760f9 Merge "[fix] [UI] [menu] animate page actions & user menus out" 2019-08-12 20:31:16 +00:00
jdlrobson 59fe37cde1 Use showReference function rather than deprecated ReferenceDrawer
Bug: T217295
Depends-On: I2ef762dbc1458411dd8ed746b7e829a2924740e3
Change-Id: Ia90ba47f152315fd39da368edac986b55f8bd5a0
2019-08-12 18:58:25 +00:00
Stephen Niedzielski bfdfc1165c [UI] [menu] slide the main menu over the page
Slide the main menu over the page instead of sliding the page over the
menu. Also, use viewport units for the main and notification menus.

Note, this lays foundation work for T225213.

Bug: T206354
Change-Id: I14b67d1e97b84086ea13e28df8148824a1f493e3
2019-08-12 18:22:45 +00:00
jenkins-bot 34d64fc6f0 Merge "AMC actions: Increase touch target size to 44px" 2019-08-12 15:27:42 +00:00
Translation updater bot 45da253b9b Localisation updates from https://translatewiki.net.
Change-Id: Id5230f763d68ec402fa8e51c58597462329b1100
2019-08-12 08:27:16 +02:00
Ed Sanders aad8addcec AMC actions: Increase touch target size to 44px
Bug: T230033
Change-Id: I3ec9091380d48e2fcedb8d222fa22b0143f7bceb
2019-08-11 12:42:05 +01:00
Translation updater bot a6ed7d8968 Localisation updates from https://translatewiki.net.
Change-Id: I5fe502e529f965b8524dae2b05497d81203934aa
2019-08-10 22:05:11 +02:00
jenkins-bot 276c48c267 Merge "[fix] [Visual Editor] [LESS] [content] create stacking context differently" 2019-08-08 20:59:47 +00:00
Stephen Niedzielski b8d8cab3db [fix] [icon] [AMC] add missing user avatar icon
userAvatar icon is used by advanced mode. Specify userAvatar as an OOUI
icon dependency.

Bug: T230162
Change-Id: I30bd90433a0f8575d1988c06a2763539a456c166
2019-08-08 14:19:27 -06:00
Stephen Niedzielski 83f90dacad [fix] [Visual Editor] [LESS] [content] create stacking context differently
b96ab7bd created a new CSS stacking context[0-1] for .content.
Unfortunately, this triggered a browser bug[2] which affects VE edit
cards (an unwanted margin appears around them). This also occurs when
creating a stacking context with filters. The issue does not occur when
the stacking context is created by changing position or opacity. Replace
the identity transform a `position: relative`.

[0] https://philipwalton.com/articles/what-no-one-told-you-about-z-index/
[1] https://stackoverflow.com/questions/16148007/which-css-properties-create-a-stacking-context?answertab=votes#tab-top
[2] https://bugs.chromium.org/p/chromium/issues/detail?id=20574

Bug: T230154
Change-Id: I23ad776f0bcde8f7eec5ffbdefb8f0825db084ec
2019-08-08 13:17:13 -06:00
jenkins-bot 78748794c6 Merge "[dev] [LESS] use z-index symbol instead of hardcode" 2019-08-08 16:42:31 +00:00
Stephen Niedzielski 95eefc5b24 [fix] [UI] [menu] animate page actions & user menus out
Add a workaround to animate the page actions and user menus out instead
of only in. This functionality was intentionally disabled to avoid to
avoid a Chromium bug[0] but can be worked around by setting transition
duration in JavaScript. The effect is no animations in no-JS mode and
full animations in JS mode.

[0] https://bugs.chromium.org/p/chromium/issues/detail?id=332189

Change-Id: Ife8c0304783dc175ebefd53f3d7b104c8a5db01d
2019-08-08 10:29:52 -06:00
jenkins-bot fb383c6356 Merge "[LESS] [content] lower content render order" 2019-08-08 13:56:41 +00:00
jenkins-bot 15434e6267 Merge "[fix] [LESS] remove main menu styles duplicate" 2019-08-08 00:45:07 +00:00
jenkins-bot 4cbba412d6 Merge "Revert "MainMenu no longer manages classes on the body tag"" 2019-08-08 00:45:05 +00:00
Stephen Niedzielski de29b14be6 [fix] [LESS] remove main menu styles duplicate
MainMenu.less was unintentionally duplicated in a previous commit as
mainmenu.less. Remove it.

Change-Id: I37103432fcee3fbfe6b57db435f9cc727f61a3f6
2019-08-07 18:14:11 -06:00
Niedzielski 6241c8dad7 Revert "MainMenu no longer manages classes on the body tag"
This reverts commit 354de09fa7.

When tapping notifications, both main and notification
menus are shown.

Change-Id: Iaa3ca4d2c7eadb1c9888b514d08895c658336d10
2019-08-07 23:43:43 +00:00
Stephen Niedzielski b1cbc639da [dev] [LESS] use z-index symbol instead of hardcode
@z-indexBase is 0. @z-indexBase - 1 is -1 which is identical to the
symbol @z-indexOccluded. The calculation didn't seem to add much to the
clarity of the code so use the symbol for grepability.

Change-Id: Ie8dcbca00a0a3e1d08a4ffe0b4fb3b71257f69c0
2019-08-07 14:44:56 -06:00
jenkins-bot 095f0f245f Merge "MainMenu no longer manages classes on the body tag" 2019-08-07 20:37:23 +00:00
jdlrobson 354de09fa7 MainMenu no longer manages classes on the body tag
The responsibilities of managing the classes on the body tag are
pulled upwards from the Menu code.

Due to the absence of global state/Redux like thing, the open and close
navigation drawer methods remain for the time being.

Bug: T206354
Change-Id: I77cd8ff75b0d4487ad19c1506a2911791542d70f
2019-08-07 20:11:09 +00:00
Stephen Niedzielski 73a95866bc [menu] [UI] [notifications] make notifications slide over top
Animate the notifications menu over the content instead of the content
over the menu. Try to trim unnecessary CSS.

Bug: T206354
Bug: T226125
Change-Id: I08f65798ef41da3c7c48fb5c65e31c6a3dd71af1
2019-08-07 19:42:48 +00:00
jenkins-bot 808f7bd56b Merge "[dev] add return type to SkinMinerva.getSkinStyles()" 2019-08-07 19:38:49 +00:00
Stephen Niedzielski b96ab7bd40 [LESS] [content] lower content render order
Create a new stacking context for page content. Previously, it was
possible for on page content to defeat the skin's z-index values with
superior numbers. This occurred with StructuredDiscussion OOUI widgets
on https://test.m.wikipedia.org/wiki/Talk:Main_Page and the
`position: sticky` header on Special:Notifications.

`scaleY(1)` is an identity transform that is terse and unlikely to be
confused when RTL flipping.

Bug: T225959
Change-Id: If8f718a707d9dd07e1182bc26e63e6e665bf98c2
2019-08-07 13:24:02 -06:00
Stephen Niedzielski 10076c1b61 [dev] divide main menu LESS
Split apart the extensive mainmenu.less file into a few component-like
files: MainMenu, MainMenuFooter, MainMenuItem, and NotificationsOverlay.
Two variables, @duration and @easing, were moved to minerva.variables.
The separation is imperfect as some overlap still exists but is far
better than before.

This patch is focused on division without regression. Please limit any
refactor requests.

No user visible changes intended. The only selector that was cognizantly
changed was to duplicate the drawer visibility on main menu and
notifications overlay:

  // Old: mainmenu.less
  .navigation-drawer,
  .transparent-shield {
    visibility: visible;
  }

  // ---

  // New: MainMenu.less
  #mw-mf-page-left,
  .transparent-shield {
    visibility: visible;
  }

  // New: NotifcationsOverlay.less
  .navigation-enabled {
    .notifications-overlay {
      visibility: visible;
    }
  }

The is unfortunately useless. It is best to reproduce these changes
locally by renaming mainmenu.less to MainMenu.less and extract parts to
MainMenuFooter, MainMenuItem, and NotificationsOverlay LESS files until
the result matches.

Bug: T206354
Change-Id: I8d37c5346efcf39a4d76322fd6e6af3fff96ac53
2019-08-07 16:48:31 +00:00
Translation updater bot f362a1bac0 Localisation updates from https://translatewiki.net.
Change-Id: Ib308aab3b3d3df3144b7828de8d5fc582f5d4b48
2019-08-07 08:44:33 +02:00
jdlrobson 9c1e1abc97 Reduce visual clutter in Special:Contributions
Force rollback, tagmarkers and revision delete/undelete onto their
own lines without floats

Bug: T229704
Change-Id: I0727f89bf4e906def9d3cfc8af8f921d6c12c68a
2019-08-06 19:47:45 +02:00