Commit Graph

1638 Commits

Author SHA1 Message Date
Translation updater bot 2fbe2c5477 Localisation updates from https://translatewiki.net.
Change-Id: Ib0e52bf72f569b253602d0d18ab726f0596b58c7
2019-07-22 22:16:48 +02:00
jenkins-bot 5c6a341a78 Merge "Revert "Remove all main_menu tracking related code."" 2019-07-22 19:11:23 +00:00
jenkins-bot c0a1342eb5 Merge "Replace fixed value with LESS variable" 2019-07-22 19:10:28 +00:00
jenkins-bot a9f6d67d3c Merge "Set header height to 54px equivalent in `em`s" 2019-07-22 19:03:53 +00:00
jenkins-bot f37e639282 Merge "[Revert] "Set header height to fixed pixel"" 2019-07-22 18:34:32 +00:00
Pmiazga de353c06c9 Revert "Remove all main_menu tracking related code."
This reverts commit d11c84d08b.

We decided to track both old MobileWebMainMenuClickTracking and new MobileWebUIActionsTracking for some time. Then once everything goes stable and it's proven to work correctly we will merge d11c84d08b.

Bug: T220016
Change-Id: Ib4d52e8b8c870774041284e575564a9933af6136
2019-07-22 18:31:55 +00:00
Volker E 378ba416ac Replace fixed value with LESS variable
Replacing with newly invented LESS variable for readabiliity and
maintainability.

Change-Id: I9d7ede1b163af49fa941d934e4fa22b57f9b035a
2019-07-22 07:44:28 -07:00
jdlrobson 4a5561257c Set header height to 54px equivalent in `em`s
Same patch as I4eed89f6a64eeb369c1ab0bb47f0462de7b0ceb3 but
destination is `em`s.

Bug: T195795
Change-Id: I1165f1e3f6fe1b86f843c2acb7a87681eda3aec6
2019-07-22 07:40:40 -07:00
Jan Drewniak 8ae59453de Reduce margin below article/discussion tabs.
Bug: T225230
Change-Id: I318848d8e47b0a7d4f47946a1f2ae22a5c7878bb
2019-07-22 13:42:12 +02:00
jenkins-bot 9352a70023 Merge "Remove all main_menu tracking related code." 2019-07-19 16:24:49 +00:00
jenkins-bot 19717c2c48 Merge "Talk overlays for creating new topics now use callback" 2019-07-19 16:00:45 +00:00
Piotr Miazga d11c84d08b Remove all main_menu tracking related code.
This code should live in WikimediaEvents extension, not in
Minerva.

Bug: T220016
Depends-On: Ic2d6d1b21b0eb72ad68b0c447bc63f7d1bb021f4
Change-Id: Iaeb12704dcd257f0783f1ebec3def01cb2848228
2019-07-19 15:30:28 +00:00
jdlrobson 72c860abc6 Adjustments to Notification tray margins and borders
Bug: T225260
Change-Id: I71b3d4ab9eb490b8a9efb753d682931981680381
2019-07-18 22:20:40 +00:00
Niedzielski 1bf2f51cdf [Revert] "Set header height to fixed pixel"
This reverts commit 625720420e. Setting height in
px results in variable (font-size) contents overflowing.

Change-Id: I510a4136be97ffd3f1dec63a39eec696c227ab25
2019-07-18 22:20:14 +00:00
jdlrobson 0320d1a9af Talk overlays for creating new topics now use callback
This copies across code from MobileFrontend and gives
Minerva full control of the lifecycle of this talk
overlay.

Depends-On: Ie2d54659ae746acc3d18368b19918aaafb236202
Bug: T228418
Change-Id: Ice1a56fbb24d9b314dfa7b2d73a4642ad1bc0593
2019-07-18 15:19:12 -07:00
jdlrobson 28c84d7d0d Update reference test to click the right element
This behaviour changed in Ife957374cb0d21446db2067171e68fb726ad8347
and related changes

Bug: T214049
Change-Id: I48df96eedebc6e34d62d1cdb02cddb7a091dae86
2019-07-18 14:15:55 -07:00
jenkins-bot 8c91faec1a Merge "Set header height to fixed pixel" 2019-07-18 14:01:16 +00:00
Bartosz Dziewoński 1fed815868 Allow .transparent-shield styles for navigation to be reused
Define the color etc. in the base styles, so that other drawers will
not have to redefine them to display the shield.

Bug: T214049
Change-Id: Ife957374cb0d21446db2067171e68fb726ad8347
2019-07-17 23:32:37 +02:00
Translation updater bot 882ca639d4 Localisation updates from https://translatewiki.net.
Change-Id: I56a62b484ce4253d52c5e0b9a7a093d866463723
2019-07-17 22:22:57 +02:00
jdlrobson 625720420e Set header height to fixed pixel
Bug: T195795
Change-Id: I4eed89f6a64eeb369c1ab0bb47f0462de7b0ceb3
2019-07-17 10:17:53 -07:00
jenkins-bot 2d9be80368 Merge "Use wikimedia.ui from core directly" 2019-07-17 15:15:12 +00:00
jenkins-bot 430439d3ac Merge "Style the "new" indicator next to amc opt-in field" 2019-07-17 15:13:30 +00:00
Piotr Miazga 016631f57a Style the "new" indicator next to amc opt-in field
Bug: T225731
Depends-On: I0821300dbcbc6baa9c56eb3c711c713bb0cb9e14
Change-Id: Id13e2a0fe3863fa4ae6aee878bf15a424fca7c31
2019-07-17 16:39:02 +02:00
jdlrobson 0a4f88b317 router.navigate is deprecated use router.navigateTo
The navigate method does not accept a second parameter for
replacing state. navigateTo was what was wanted.

Mark navigate as deprecated (to match ooui router) to make
sure this doesn't happen again.

Bug: T226106
Change-Id: Ie86fa632b2175727417b166c222c29bdf12bfea4
2019-07-16 16:50:58 -07:00
jenkins-bot e6b4f4f2b2 Merge "Make sure lazy loaded images display in printed PDFs" 2019-07-16 23:39:27 +00:00
jdlrobson e27debc1dd Use wikimedia.ui from core directly
There's no reason to copy and paste all this here. These icons
can be imported directly from core using ResourceLoaderOOUIIconPackModule

Depends-On: I7800da87a6a10399f705b43e05c8592c766bae6f
Change-Id: I1f25aaca9b7313cd95cefc7f5629b8a7e65c887f
2019-07-16 22:20:25 +00:00
jdlrobson a9d73060fa Restore table of contents and error logging
When moving to packageFiles, the modules errorLogging and toc
were not imported by init.js meaning they were not run.

ResourceLoader should probably error in this situation, but until
then we should fix this problem.

This is a follow up to I44790dd3fc6fe42bb502d79c39c4081c223bf2b1

Bug: T212944
Change-Id: I86efb7be1c39b03f63c8f1e0b107216cd30ff6de
2019-07-16 14:45:35 -07:00
jenkins-bot 6076c61772 Merge "Embrace packageFiles" 2019-07-16 21:21:42 +00:00
jenkins-bot 5a6ae26553 Merge "Replace special message variables with mediawiki.ui ones" 2019-07-16 21:17:29 +00:00
jenkins-bot 297a2c3aeb Merge "Extract language/variants check to a service" 2019-07-16 21:16:51 +00:00
Volker E 671027649b Replace special message variables with mediawiki.ui ones
Replacing messages variables with mediawiki.ui ones to ensure following
Style Guide color treatment.
Also renaming `@colorErrorText` with new default `@colorError`.

Bug: T228022
Depends-On: I49ca4b8f510888dff7a2487470174666143bcd76
Change-Id: Iefb881ab2eec1fa0ac83b40730853d449da595f4
2019-07-16 20:59:16 +00:00
jenkins-bot 937d2b48ea Merge "On user pages, move language icon from Toolbar to Overflow menu" 2019-07-16 20:09:04 +00:00
jenkins-bot 66b9589e12 Merge "[dev] match page issues LESS filename to JS naming" 2019-07-16 20:09:02 +00:00
Piotr Miazga d7f60a26db Extract language/variants check to a service
The $hasLangauges and $hasVariants checks were used in couple places,
which lead to the same code used in many places.
Following the DRY rule, let's implement a Service that can do that
check, and use that service everywhere in code.

Bug: T224735
Change-Id: I46d58758356e870c408a74b2c087a42d6ad0ddea
2019-07-16 19:53:57 +00:00
jdlrobson 502ab6051e Do not load main menu icons in critical path
The icons for the main menu are not needing for the first render,
they have thus always been loaded via JS. While this means the
menu icons do not load for non-JS users, Special:MobileMenu fulfils
that purpose. With AMC we'll need to reconsider this approach
but the 1.8kb added by this module is not acceptable.

Bug: T227929
Change-Id: Ic6a2490fbd3903c5d34ff8267d745fdd93c73fd2
2019-07-16 19:04:00 +00:00
jdlrobson 72df451bd3 Embrace packageFiles
Help with readability by using module.exports and require rather than the MobileFrontend
provided mw.mobileFrontend module manager (and avoid adopting webpack at this time)

Replace usages of mw.mobileFrontend.require with local require and module.exports
(compatible with RL or Node implementation)

Changes:
* Notifications modules are merged into skins.minerva.scripts and initialised
via a client side check.
* new file overlayManager for exporting an overlayManager singleton
rather than being hidden inside resources/skins.minerva.scripts/init.js
* All M.define/M.requires swapped out for require where possible
The `define` method is now forbidden in the repo.

Bug: T212944
Change-Id: I44790dd3fc6fe42bb502d79c39c4081c223bf2b1
2019-07-16 18:04:10 +00:00
Stephen Niedzielski 21b24830b5 [dev] match page issues LESS filename to JS naming
Bug: T212944
Change-Id: I0fa44cdb26b24fff87a7c4dfd424fe4400ceee22
2019-07-16 18:03:44 +00:00
Piotr Miazga dee1c197b9 On user pages, move language icon from Toolbar to Overflow menu
The Language icon is not useful on user pages as most probably there
are no translated user pages, thus there is no need to show all-time
disabled Language icon.

If overflow menu is available, don't show Language switcher icon in
toolbar, show it as first item in the overflow menu.

Bug: T224735
Follow-Up: I46d58758356e870c408a74b2c087a42d6ad0ddea
Change-Id: I05be9e6457257a1f2eb224ca9ec5808814bc9ed7
2019-07-16 17:51:11 +00:00
jenkins-bot 4e2458aeba Merge "Make Minerva use new PageHTMLParser.js and refactored Page.js" 2019-07-15 23:12:58 +00:00
Nicholas Ray 331df226f5 Make Minerva use new PageHTMLParser.js and refactored Page.js
In I02f8645aac1d7b081eaba8f2ac92a2ef51f78182, Page.js was made into a
model and its html parsing responsibilities were moved to
PageHTMLParser. Additionally, a singleton for the current page
(currentPage.js) and a singleton for the curent page html parser
(currentPageHTMLParser.js) were introduced to replace the usage of
M.getCurrentPage().

This commit refactors Minerva to make use of these changes.

Notable changes:

* 🐛 The event bus singleton was added to references.js since it
previously relied on an instance of Skin to listen for the
`references-loaded` event. However, this event is emitted on the event
bus singleton.

* Additionally, I didn't see a reason why the `references-loaded` event
needed to also pass the current page instance when the only file
listening to it is references.js (which already has the current page
instance) so I removed that and the convoluted passing of page.js within
the file. I assumed this logic was unecessary.

* The call to drawer.showReferences in references.js now was made to
pass the currentPage instance as well as the currentPageHTMLParser. This
is to prepare for I6e858bbe73f83166476b5b2c0fdac1cca7404246 where the
getReferences() interface for ReferencesMobileViewGateway.js and
ReferencesHtmlScraperGateway.js is refactored to accept both of these
instances. Additionally, references.js was refactored to support event
delegation which gets rid of some parsing/setup logic.

Bug: T193077
Depends-On: I02f8645aac1d7b081eaba8f2ac92a2ef51f78182
Change-Id: I2f32dbcc4ebaa4bebb297cda1ecce3457922b343
2019-07-15 16:43:51 -06:00
jenkins-bot e24c21555e Merge "Restrict AMC scripts and styles to AMC mode" 2019-07-15 19:50:49 +00:00
jenkins-bot a8b6a5b243 Merge "Add phan" 2019-07-15 18:09:44 +00:00
Daimona Eaytoy b5c6658813 Add phan
Bug: T133664
Change-Id: I26f8cfe8cb88ed7de88e765681d9334edd9f3ce4
2019-07-15 17:10:13 +00:00
jenkins-bot 4274a98413 Merge "Guard against undefined config variable" 2019-07-15 13:46:38 +00:00
Translation updater bot 71d2a8fc6d Localisation updates from https://translatewiki.net.
Change-Id: Icdaaf79cb1cbaa35bec6b006931153118273c76e
2019-07-14 22:20:27 +02:00
jdlrobson a82ca2fcef Restrict AMC scripts and styles to AMC mode
These have leaked into all users experience.
The CSS appears to be unused outside AMC.

Also remove a reference to skins.minerva.share
which does not exist.

See I171831469a6733c458bc5c7ba249a5096ca975b8 which introduced these
styles.

Bug: T227929
Change-Id: I6af6b026e68e11327b7c4e3edfc4f812c7309e2e
2019-07-13 01:12:34 +00:00
jdlrobson 6df395f141 Guard against undefined config variable
Bug: T225423
Change-Id: Icfbd90c52d9f27ee58bde15c010f705b081285ab
2019-07-12 13:06:52 -07:00
jenkins-bot e01cb1fa14 Merge "QA: Update search browser test selector" 2019-07-12 01:01:15 +00:00
jdlrobson 0fa35053c3 QA: Update search browser test selector
Change-Id: Ibef220e65a4dfa3725ac01d4917fe7a0a9b8a878
2019-07-11 17:26:38 -07:00
Translation updater bot cec9e052b3 Localisation updates from https://translatewiki.net.
Change-Id: I67f664db917a299d679729d07b39c5dda41d7113
2019-07-11 22:10:34 +02:00