Commit graph

1886 commits

Author SHA1 Message Date
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
Stephen Niedzielski 0a2099930b [dev] add return type to SkinMinerva.getSkinStyles()
Specify the return type for getSkinStyles() and add some documentation.

Change-Id: I06a77d3015ed77c2aa38d31fe8422fcb8bcaf9fd
2019-08-06 09:28:47 -06:00
Jan Drewniak c85f48cdd1 Recent changes design cleanup - font-size changes
- decreases the font-size of the rcfilters module
- increases the font-size of the changeslist date headers
- ensures there is no left margin on the changeslist <ul>

Bug: T229360
Change-Id: I99867ad3702c71b7e627c394359dc02fe4b9214e
2019-08-06 14:09:26 +02:00
Ed Sanders b836141c9f Remove outer border from overflow tables
Bug: T206762
Change-Id: Ice5e85d10d932a93094228629201afd98a9cc1f4
2019-08-05 12:40:18 +01:00
Translation updater bot 19b95d7e6f Localisation updates from https://translatewiki.net.
Change-Id: Idab080fe6a83f19863d4d1dbc0b0c6032f415a86
2019-08-05 08:32:00 +02:00
Stephen Niedzielski 0867ff03aa [fix] [notifications] fix icon width
When notifications are present, the wrong icon width was used. Set the
icon width and remove a useless class, main-header-button.

https://codesearch.wmflabs.org/search/?q=main-header-button&i=nope&files=&repos=

Change-Id: Ie274ffcc93cf576f36eb0fccee80ecd3d4ac3a21
2019-08-02 14:39:04 -06:00
jenkins-bot 7cca6b42f8 Merge "Hygiene: SkinOptions should know what are AMC options" 2019-08-02 18:52:50 +00:00
jenkins-bot 628e7a703a Merge "Hygiene: remove deprecated calls from Menu system" 2019-08-02 18:51:42 +00:00
jenkins-bot ca5afd9ac0 Merge "Hygiene: remove deprecated calls from MinervaSkin and MinervaTemplate" 2019-08-02 17:09:36 +00:00
jenkins-bot 573a08ddf5 Merge "Hygiene: Simplify if statement and move comment" 2019-08-02 16:35:48 +00:00
jenkins-bot 0c4186746a Merge "Hygiene: Wrap userMenu and pageActions into prepareMenus" 2019-08-02 16:31:24 +00:00
Piotr Miazga ab1d39ea4f Hygiene: Wrap userMenu and pageActions into prepareMenus
Changes:
 - introduce preapreMenus()
 - move getUserMenuHTML logic into prepareMenus
 - move preparePageActions logic into prepareMenus
 - rename 'page_actions' into 'pageActionsMenu' to be consistent

Change-Id: Ie8cc137f749741074e1a5787bee67893fc45fde9
2019-08-02 17:39:31 +02:00
jenkins-bot 6f96dfe664 Merge "AMC features should default to true in desktop" 2019-08-02 15:17:06 +00:00
jenkins-bot 01ca1602e1 Merge "Hygiene: Rename MainMenu related classes" 2019-08-02 15:17:05 +00:00
jenkins-bot 77d0632959 Merge "Do not hide notifications icon when drawer open" 2019-08-02 15:17:03 +00:00
Piotr Miazga ec77b3ab25 Hygiene: remove deprecated calls from MinervaSkin and MinervaTemplate
Changes:
 - Title::getTalkPage() is deprecated, use NamespaceInfo instead
 - Title::getSubjectPage() is deprecated, use NamespaceInfo instead

Note: NamespaceInfo returns LinkTarget instance, but most of our
logic is wrapped around Titles, that's why we need to call
Title::newFromLinkTarget() to be sure that we got Title object.

Change-Id: Ibf2237ea369b0cee67ab5f623bdddcd9058eec3e
2019-08-02 17:04:53 +02:00
Piotr Miazga 3b13e6b9f6 Hygiene: remove deprecated calls from Menu system
Changes:
 - Title::getTalkPage() is deprecated, use NamespaceInfo instead
 - Http::isValidURI is deprecated, use MWHttpRequest instead

Change-Id: I6938fe93d18372ef855f398a506c8b5ba68b640e
2019-08-02 16:49:11 +02:00
Piotr Miazga 05cdcc09c8 Hygiene: SkinOptions should know what are AMC options
Do not hardcode special handling of Options in other places
than SkinOptions. SkinOptions should be only one place that
knows all interpedences.

Change-Id: I9ad8c1560332665dbcd88ccc7105fb253a2f41b9
2019-08-02 16:26:52 +02:00
Piotr Miazga b03e24aa9c Hygiene: Rename MainMenu related classes
For better readability Main Menu building classes should
contain MainMenu in the name as not everyone uses smart
IDEs.

Change-Id: Ica3bf4bbd18cab1a6cd88061dfb9d1ce51b0f63d
2019-08-02 14:20:00 +00:00
jenkins-bot 7c869ec86a Merge "Remove all main_menu tracking related code.""" 2019-08-02 14:06:23 +00:00
Piotr Miazga 0ac08cafb2 Hygiene: Simplify if statement and move comment
It feels like the comment about history link time should be located
next to the getHistoryLink function, not somewhere in the code.

Statements like:

  if ( a ) {
    if ( b ) {
      // do sth;
    }
  }
can be easily wrapped into:

 if ( a && b ) {
   // do sth
 }

Change-Id: I98c071ecdd855210bc0a92f032ee622fb91e8df5
2019-08-02 15:38:18 +02:00
jdlrobson 9aae174a15 AMC features should default to true in desktop
It is expected that in mobile mode, onRequestContextCreateSkinMobile
hook will explicitly set skin options based on the user configuration.

The desktop should however reflect everything with AMC enabled.

Bug: T229295
Change-Id: Ib3bf09c25d9bcf9b31d994b92a1d016cca8a6224
2019-08-01 18:04:00 -07:00
jenkins-bot d8de612e0c Merge "Reset SkinOptions after logging out" 2019-08-01 22:23:12 +00:00
jdlrobson 97f0e44e19 Reset SkinOptions after logging out
Bug: T221137
Change-Id: I36ada157327b649900dbcee3917883fe8ee7687a
2019-08-01 21:57:36 +00:00
jdlrobson 223f22d1c9 Do not hide notifications icon when drawer open
Bug: T228890
Change-Id: I7af7d4d760a443bd2c7dcce04fabb7e80dd35524
2019-08-01 21:35:25 +00:00
jenkins-bot 721e63f19f Merge "Hygiene: Remove OPTIONS_ and OPTION_ prefixes from SKinOptions" 2019-08-01 19:55:08 +00:00
jenkins-bot df7abeae25 Merge "Empty subtitle elements should not have margin" 2019-08-01 17:48:58 +00:00
Jdlrobson 8d703b7758 Remove all main_menu tracking related code.""
This reverts commit de353c06c9.

Bug: T228681
Change-Id: Idfd964c31e09e271dca9ac39f7932df49cdcb5f6
2019-08-01 10:40:09 -07:00
Piotr Miazga 4efd72a879 Hygiene: Remove OPTIONS_ and OPTION_ prefixes from SKinOptions
Additionally, renamed couple options for better readability.

Bug: T221012
Change-Id: Ia347a60d469fba8f35afa7c70aa806a46271dccd
2019-08-01 10:34:03 -07:00
jenkins-bot d688190547 Merge "Don't show download button on missing pages" 2019-08-01 17:24:08 +00:00
jdlrobson 64896669e2 Empty subtitle elements should not have margin
I considered not outputting the subtitle, but the PHP mustaching
templating library requires truthy values and that seemed like overkill

Bug: T217197
Change-Id: I3ebe550bad8b5eb0f24d742261ea696950c91a59
2019-08-01 17:18:32 +00:00
jenkins-bot 89a67eea9b Merge "Normalize small fonts" 2019-08-01 16:58:24 +00:00
jdlrobson a0e5139e40 Don't show download button on missing pages
Additional: Pass in a page rather than a skin - skin is not
used anywhere other than to get the page

Bug: T211775
Change-Id: Ia7c56158773ac16992fb1ebf002131e9c24dda14
2019-08-01 16:11:57 +00:00
jdlrobson c63fceea6e Normalize small fonts
We use 0.9em in a variety of places, to shrink font-size from the
default font-size. However given we use 16px as a base font this results
in a font-size of 14.4px. This can also cause problems with icons resulting
in rounding errors when used with multiple icons

This changes the font-size to 14px for those areas and makes future usages
centralized by adding a specific variable.
Also amending `@font-size-browser` variable to be aligned to naming convention
and equal to Vector one.

Bug: T229399
Change-Id: I8e31bca2982c049a9be73c89aa9e8e2aa8141269
2019-08-01 16:11:29 +00:00
Jan Drewniak 8c3fe30ea1 Enabling loading spinner for Recent Changes page
Bug: T223363
Change-Id: I29498e6247ef820f0ded8a64996a1266f1d2f4c6
2019-08-01 12:33:14 +02:00
jenkins-bot 02d5a878a1 Merge "partly correct the transitions between talk overlays" 2019-08-01 00:10:42 +00:00
jenkins-bot eac1686792 Merge "Set title from Skin relevant title" 2019-08-01 00:10:08 +00:00
jdlrobson 02c43249cd partly correct the transitions between talk overlays
Tapping browser back button now does not show the underlying article
However clicking the back icon does (which can be fixed by a hack
see I80328b388b2e2da105bd670a3679b4ed3061b33a )

This works because displaying the talk overlay triggers a load
to mobile.talk.overlays (for talk topic board) so the other overlays
are guaranteed to be ready by the time you want to transition to them.

Bug: T221978
Change-Id: Ic3b448169d52880b38408da47af9e4576c585e16
2019-07-31 23:40:34 +00:00
Piotr Miazga 9ece509c99 Hygiene: SkinOptions should validate options
Changes:
 - when trying to set unknown option, throw exception
 - added unit tests

Bug: T221012
Change-Id: I0d1a43fb5a7179b8e9cd578e3e33bab12ddfd61c
2019-07-31 22:24:29 +00:00
jenkins-bot 3dd8ce4822 Merge "[UI] [menu] remove menu height resizing" 2019-07-31 20:42:53 +00:00
Translation updater bot 89d60596db Localisation updates from https://translatewiki.net.
Change-Id: I71560a9d5a294bc87c5a5a733b07555c722db875
2019-07-31 22:12:04 +02:00