Commit Graph

395 Commits

Author SHA1 Message Date
jenkins-bot a52d271cc9 Merge "Fix: use hand cursor for links without href" 2018-12-20 19:22:12 +00:00
Stephen Niedzielski 7826a451c9 Fix: use hand cursor for links without href
Links without hypertext references are still functionally links and
should be presented in the same way. This patch forces the hand cursor
to be used for such links which affects the red links drawer's "no
thanks" link.

Change-Id: Iabfef03f6726bb8a5e3a2bc90f2a7f63c8a10c02
2018-12-17 22:20:25 +00:00
Stephen Niedzielski 37333c7189 Hygiene: collapse mobile.search* into mobile.startup
MinervaNeue depends on mobile.search and mobile.search.api. These
ResourceLoader modules existed in MobileFrontend but now have been
collapsed into mobile.startup.

This patch updates Minerva's ResourceLoader module and JavaScript
references.

Bug: T210207
Depends-On: I1eae36f2927a4e0f9d1e91d604d656beb8cc33ae
Change-Id: Ied6f4873bf2550564673296e9ef4fa009ca45e5b
2018-12-17 22:03:41 +00:00
jenkins-bot 2abb44b24a Merge "Remove references to "mobile.toggle" module." 2018-12-14 16:27:44 +00:00
Jan Drewniak 4522a8e10a Refactor pageIssues.js into smaller functions
Instead of having one large `createBanner` function, breaks down
that responsibility into three smaller functions:

- createPageIssueBanner
- createPageIssueBannerMultiple
- createPageIssueNotice

These functions represent issues in the new treatment, the
multiple-issues template, and the old treatment.

createBanner now delegates the creation of these banner types to these
new functions.

A new property to PageSummary, $el, has also been added. This allows us
to manipulate the issues DOM via the PageSummary object, instead of using
the `$metadata` variable in createBanner.

This approach to the page-issues DOM also solves the problem of
wrong or missing icons in T202349.

Bug: T211257, T202349
Change-Id: I50a2d8e3ae94913dc060ceedaaf1fa7e1756617f
2018-12-14 02:03:58 +01:00
Jan Drewniak 1589a15862 Remove references to "mobile.toggle" module.
mobile.toggle was folded into mobile.startup in
mobileFrontend, so moving references to that instead.
- Changing require statements
- moving skinStyles/mobile.toggle/minerva.less to
   skinStyles/mobile.startup/toggle.less
- Replacing references to mobile.toggle in skin.json

Depends-On: Iecc1870f08532e8c7893861afdd54f069da54be2
Bug: T210208
Change-Id: Ie67cd50a2d042fbbaaef348b9b62d64193900d78
2018-12-14 00:45:34 +01:00
jenkins-bot 9e3e499871 Merge "Tablet style should apply to mbox-text-div as well as mbox-text-span" 2018-12-13 22:32:54 +00:00
jdlrobson 2258da2ff8 Tablet style should apply to mbox-text-div as well as mbox-text-span
Bug: T206887
Change-Id: Id992f92eef8a5b6001e12fa42e2333cd266cc098
2018-12-13 11:41:15 -08:00
Volker E f0608db19a build: Update 'stylelint-config-wikimedia' to v0.5.0 and make pass
Updates code comments and whitespacing.

Change-Id: If7665beaa2d342881483fd7a9fc0fc880768d2ef
2018-12-12 23:26:48 +00:00
Nicholas Ray 5bfd949f9a Remove usage of global event emitter from Minerva
This patch removes the remaining usages of M.on/M.off/M.emit
(functionality derived from moduleLoader.js in MobileFrontend) in
Minerva and continues the work of
Id990b0e1a53221d5c1cb3e3012aed0e27d801fc2 (patch for MobileFrontend).

This patch and the patch for MobileFrontend should be merged together as
they both depend on eachother.

Depends-On: Id990b0e1a53221d5c1cb3e3012aed0e27d801fc2
Bug: T156186
Change-Id: I005d2fcdbf91c2f1ac98178dfa388aa8174e7530
2018-12-06 19:30:09 -07:00
Nicholas Ray 8feff10336 Remove usage of global event emitter from skins.minerva.talk/init.js
This patch removes usages of M.on (functionality derived from
moduleLoader.js in MobileFrontend) in skins.minerva.talk/init.js and
continues the work of I0e35776114ffa137b219eff0a900a0a0c52a27bb (patch
for MobileFrontend).

This patch and the patch for MobileFrontend should be merged together as
they both depend on eachother.

Depends-On: I0e35776114ffa137b219eff0a900a0a0c52a27bb
Bug: T156186
Change-Id: Ic766d0bbf2746df898038115e2e4bc791ac10359
2018-12-06 19:29:43 -07:00
jdlrobson 87942c34f9 mobile.watchstar is a deprecated module
Referencing it triggers deprecation warnings so should be updated

Bug: T208921
Change-Id: I7266a067a14bfa38a998f426e18f096515b7bfa7
2018-11-30 15:28:03 -08:00
jdlrobson 0e4283ae43 Provide some recommended (opt-in classes) for projects not opted into page issues
You can test this against the beta cluster using
$wgMFMwApiContentProviderBaseUri = "https://en.wikipedia.beta.wmflabs.org/w/api.php";

Bug: T206177
Change-Id: Ic2e6859443ed5aa2a3f97218f4c89df2a46000f9
2018-11-27 14:44:07 -08:00
jenkins-bot 645073e958 Merge "isBorderBox and className properties are deprecated" 2018-11-27 13:58:37 +00:00
jdlrobson 5c40ddc477 Zero is a sensible default for this feature flag
Bug: T205008
Depends-On: I3640b28c6a930f6e934d22c3375bffcd539902aa
Change-Id: Ie5d63e265469219063e36d6e398fd0a0b1e864db
2018-11-27 12:26:37 +00:00
Piotr Miazga a15119bdc1 Pass `mode` property to MobileWebMainMenuClickTracking schema
Changes:
 - pass the mode property instead of mobileMode
 - if mobileMode is undefined, pass 'desktop'

Depends-On: Iedd26463128623e56b9a8612ccf2488739c854fa
Bug: T193505
Change-Id: I6706546fc136779e3872ef9405ca6749b01cf751
2018-11-27 00:42:33 +01:00
jdlrobson c8693b6789 isBorderBox and className properties are deprecated
These will soon throw warnings and soon be removed!

Bug: T209007
Change-Id: Idca4c892366dc5b5e8490f1326188b97abc876f7
2018-11-22 19:11:53 +00:00
jdlrobson e1b94f3f63 Update usages of user module to mw.user
We are deprecating the MobileFrontend user module. Use the
mw.user module in core instead which supports the same methods.

Bug: T204866
Change-Id: I3d068198ab79fe85823a9d82ef4bd7ca07013d3b
2018-11-21 11:12:41 -08:00
jenkins-bot 58cfdbff89 Merge "page issues is feature flagged" 2018-11-20 22:44:40 +00:00
jdlrobson 97fd861a63 page issues is feature flagged
* New feature/skin option is added and value is read inside
the pageIssues setup code
* issues-group-a class is added to page on server side to remove
the flash of unstyled content
* issues-group-A class is dropped (it's not doing anything!)
* The minerva-issues flag will now accept any value to avoid confusion.
It is used to override the default setting of wgMinervaPageIssuesNewTreatment
A note has been added that this can be removed in future.

Bug: T206179
Change-Id: I3d98fd8f8e1adc818ea03589d2c8f68fe991e861
2018-11-20 12:41:41 -08:00
LukBukkit 9e114731ce
Don't open images if control keys are pressed
This replicates the behavior of the MultimediaViewer on the
desktop when using the mobile page with a desktop browser.

But we have to be careful that this change don't break
other extensions or functions of the skin.

Bug: T206348
Change-Id: Ib4b928eae136d781782dc96e82d653806587292b
2018-11-19 22:10:19 +01:00
Volker E 51304f9bad Fix invalid selector
Seems like one of the selectors in this group has been removed.
Found with `"block-opening-brace-space-before": "always"` added in
.stylelintrc.json – It's going to be part of next
stylelint-config-wikimedia release. This issue here has caused an
invalid selector though, therefore fixing immediately.

Change-Id: If9603f12b9ad236b1517eb8861d220e991fa0a8d
2018-11-16 18:32:35 -08:00
jenkins-bot 1d6865bba4 Merge "Remove obsolete aliases from closures" 2018-11-16 19:38:38 +00:00
jenkins-bot 4f2695907f Merge "Update references to deprecated modules" 2018-11-16 18:15:47 +00:00
Ed Sanders def03877ce Remove obsolete aliases from closures
Bug: T208951
Change-Id: I7cd5ab010596d964fc0896ed250f40d5b6344f6e
2018-11-16 15:16:25 +00:00
jenkins-bot 4c8b538634 Merge "Avoid overlapping text on Russian and Farsi projects" 2018-11-16 00:14:58 +00:00
Bartosz Dziewoński b17d3f70da Remove 'skins.minerva.editor' module (moved to MobileFrontend)
Added in MobileFrontend in Iaaed72c32b9c4f4e15c320b79e29e9af3609069a.

(The module's name is included in cached page HTML, so to avoid
breaking them, 'skins.minerva.editor' must temporarily remain as an
alias for 'mobile.editor'. It is otherwise unused and can be removed
after caches expire on Wikimedia wikis.)

Depends-On: Iaaed72c32b9c4f4e15c320b79e29e9af3609069a
Bug: T198765
Change-Id: I52c4e0941dcf8f176e3ac32d8a1f72a0f8e1d6a6
2018-11-13 23:27:29 +01:00
jdlrobson f173dabf75 Avoid overlapping text on Russian and Farsi projects
Account for the fact that many wikis use `mbox-text-div` rather
than `mbox-text-span` and that the element might not be display
block/inline block

Bug: T206887
Change-Id: I6b3cee4339fc7ddb035a99fb4929b1ab67f22333
2018-11-12 16:44:06 -08:00
jenkins-bot 90629a0578 Merge "Move canEdit checks to server from client" 2018-11-09 22:07:47 +00:00
arcayn c64a4cf811 Move canEdit checks to server from client
Bug: T206262
Change-Id: I08bfc56998f4fb42c8ce76cc2ad9fba83106d476
2018-11-09 21:26:49 +00:00
jdlrobson 846b37c708 Update references to deprecated modules
Change-Id: Id5ec727eb32c7b5207bb1175ebcdb0c1c4a4911a
Depends-On: I7b0090c3e4268ea147f1d8707ee62f90e7d48724
Bug: T207805
2018-11-08 13:34:50 -08:00
Bartosz Dziewoński d27a9481bc skins.minerva.editor: Remove remaining uses of 'skins.minerva.scripts'
We want to remove dependencies on Minerva code from this file to move
it to MobileFrontend.

* Use 'mobile.init/skin' instead of 'skins.minerva.scripts/skin'.
* Use 'mobile.startup/OverlayManager' and #getSingleton
  instead of 'skins.minerva.scripts/overlayManager'.

Both of them are just aliases for modules defined in MobileFrontend.

Bug: T198765
Change-Id: Id017dd4b6d1fe31a735613f991721c4dddafbde9
2018-11-08 16:17:21 +01:00
Bartosz Dziewoński 7bbba14ee1 skins.minerva.scripts/init: Use singleton OverlayManager from MF
Bug: T198765
Depends-On: Ie83846e7dfabe302006d0979f2f21913839e1795
Change-Id: I9c07863ab9c68886d6c5b5f09756e034a4d96477
2018-11-08 16:14:40 +01:00
Bartosz Dziewoński 7b5928d795 Merge remote-tracking branch 'gerrit/page-issues-cleanup'
Bug: T198765
Bug: T208514
Change-Id: I9467101c9b01cbd7682de859e43e04966760eea6
2018-11-08 16:00:39 +01:00
Bjornskjald bc303e50cc Fix invalid HTML produced by DownloadIcon
Depends-On: I549e15f8a3352761e4960abdaaef6cd4bfb133e6
Bug: T205359
Change-Id: Id67b8a6591a8dec92d1c577851661c65973d593f
2018-11-06 12:42:58 -08:00
Bjornskjald 8f1cfa4b81
Add showing toast/drawer when visiting protected article with editor link
Bug: T205630
Change-Id: I0c25f491c894d12775d236ecc9250bfdad17a13b
2018-11-03 18:39:11 +01:00
Bjornskjald 10978e5022
Add drawer when user is not logged in and anonymous edits are disabled
Bug: T206823
Change-Id: Ibd77ff0966f2d4b86e61f66caaafb94e85b02235
2018-11-02 23:01:22 +01:00
jdlrobson 5ad1a0ff5a Article width should not be full screen
Follow up to I5fb67f4abd7aee1fce41e60fe24e8fd6b45e5146 which
incorrectly set a min-width not a max-width.

Bug: T193061
Change-Id: I385061ea47a4dbf011eec2582594f94a4749f713
2018-10-31 11:20:53 -07:00
Goomel e300213128 Ensure there are page margins for 1000px viewports
Bug: T193061
Change-Id: I5fb67f4abd7aee1fce41e60fe24e8fd6b45e5146
2018-10-26 15:37:06 +00:00
jenkins-bot a79a0276bd Merge "Add "Discussion" button to Main page on Mobile View" 2018-10-23 20:18:50 +00:00
jenkins-bot 5a4d8daa32 Merge "Cleanup unused page actions CSS" 2018-10-23 20:09:41 +00:00
jenkins-bot 885092114b Merge "Watchstar is accessible to non-js users" 2018-10-23 20:09:40 +00:00
jdlrobson 72cd31f221 Remove page issues instrumentation
Note, since the page issues code is not feature flagged,
the new treatment will only be accessible via query
string until T206179 is taken care of.

Bug: T206178
Change-Id: I5ab2f3396e642f7b973263e2bb3963e0e82721b3
2018-10-23 12:19:25 -07:00
jdlrobson cb2ad9374e extract moved to parser
The extractMessage function has a lot to do with parsing - so this
and its tests are moved into the pageIssuesParser.

Change-Id: I62d79fbba166eff2c3ca573ef94ff86a269a7f9a
2018-10-23 12:17:45 -07:00
jdlrobson 878989bd85 Merge PageIssue and IssueSummary type defs
We have two type defs - IssueSummary and PageIssue.
I'd like to consolidate these two types by making
IssueSummary a combination of the two

Change-Id: Ic831b463fa66b0cacdd0b9b79aff741e55c0ec24
2018-10-23 12:10:22 -07:00
Alangi Derick a2fd0b3c1f Add "Discussion" button to Main page on Mobile View
* Enable discussion button on main page in mobile view so users
  can view discussion topics related to the main page on mobile.
* Update test to make sure only 'talk' and 'switch-language' actions are
  enabled on the main page and 'edit' and 'watch' are disabled on the main
  page.
* Minor typo fix for doc type. Use "array" instead of "Array" and CSS
  alignment fix issue with Discussion button when displayed together with
  Language selector button.
* [Suggested by: @Jdlrobson] Use a generic "a" CSS selector to style the ".talk"
  and ".language-selector" classes on the main page. This also avoids fixing the
  CSS for future buttons if added (future proofing the code), so if any other
  button is added in the future, the same css rule will be applied to it at once.
  Very wise idea from @Jdlrobson, thanks!

Bug: T206406
Change-Id: Iedce84595adc357f3a707f8b94d23b2ffea3476c
2018-10-23 19:59:22 +01:00
jdlrobson 1fd84e123f Remove wikimedia.event.ReadingDepthSchema.enable track call
This will send an event to a non-existent schema:
ReadingDepthSchema.enable

This was mistakedly kept for backwards compatibility.
It should have been kept for trackSubscribe not track.
The damage is done, so we should just remove this to get
error rates down to a comfortable rate again.

Bug: T207423
Change-Id: Ibb5cc2dd9b486c921aab5f8830e837f813683482
2018-10-23 11:10:53 -07:00
jdlrobson 13aeb1e8f5 Merge remote-tracking branch 'origin/master' into HEAD
Change-Id: I2b15e07932e4fe8b2a49fa87bb6136a3b50b7786
2018-10-22 16:20:33 -07:00
jdlrobson 1326f7be69 Cleanup unused page actions CSS
Depends-On: I06ef42cb1461fde7ca0aa903f174c3b1f39ab154
Bug: T196893
Change-Id: Iccde86c7acc0bd66bbad9a9fdc0fdf172576f872
2018-10-22 17:39:25 +00:00
jdlrobson 088faeaf08 WikimediaEvents hook was renamed
Depends-On: I1af710c1211131b3936bfa8582ead8f9c0dab77b
Bug: T207423
Change-Id: Ib267a0b944c68f00e21cd733a68abf12667339cd
2018-10-22 17:39:08 +00:00