Commit Graph

411 Commits

Author SHA1 Message Date
jenkins-bot 41f45725f9 Merge "Tablet code no longer needs to be conditional" 2019-01-15 15:12:42 +00:00
jdlrobson 76be18c788 Tablet code no longer needs to be conditional
The TableOfContents component is now inside mobile.startup
so is readily available.
Thus skins.minerva.tablet.scripts is removed and its code
moved inside skins.minerva.scripts

The check to whether the user is in tablet mode
now happens inside toc.js

The resize handler is dropped on the basis that this is an edge
case that is not worth supporting at the cost of an eventBus.

Depends-On: I353d6d7a6884dae03b55364150c6bb95cd4cc57f
Change-Id: Id16a64573e020b4606fc9b11456163a4cd290e0b
2019-01-14 15:43:50 -08:00
Huji Lee fa5dff873f Change the "visited" color for links to increase readability
Please see Phab task about why this is necessary and how the new
color was selected.

Bug: T204081
Change-Id: If11f308bad5f7260c82bafe0e8d584763773869e
2019-01-13 19:44:38 -05:00
jenkins-bot b4edf0cf23 Merge "Stop using the deprecated mobile.notifications.filter.overlay" 2019-01-09 20:24:12 +00:00
jdlrobson c52c8ab17a Stop using the deprecated mobile.notifications.filter.overlay
Use mobile.notifications per the deprecation notice

Change-Id: I3432935d6f7ca1e6614d86fa7945c2cfd06968c8
2019-01-09 08:57:40 -08:00
Stephen Niedzielski 672df850cb Hygiene: revise A/B test terminology
Improve the comments and APIs provided by AB.js:

- Control becomes unsampled.
- A becomes control.
- B becomes treatment.

This code does not appear to be in use presently, so it's a great time
to change it.

Change-Id: I31d619f889ee45102a4aed774a6ec41f0d95ba7d
2019-01-08 15:08:50 +00:00
jenkins-bot d3557a738d Merge "Generate a shareIcon via composition" 2019-01-04 18:57:13 +00:00
jdlrobson e3bdad20bb Generate a shareIcon via composition
Bug: T205592
Change-Id: Ia107b13d4f658ce7cc077ca7337530f3e448c522
2019-01-04 09:19:59 -08:00
jenkins-bot 9258806a0f Merge "pageIssuesOverlay is a factory function that returns an Overlay" 2019-01-04 15:39:48 +00:00
jenkins-bot b8bd9b15e7 Merge "Download Icon Hygiene: Post refactor cleanup" 2019-01-03 16:55:37 +00:00
jenkins-bot 0282bb16ca Merge "Composition: DownloadIcon" 2019-01-03 16:41:34 +00:00
jdlrobson d29eca2bc8 pageIssuesOverlay is a factory function that returns an Overlay
This experiments with making PageIssuesOverlay an Overlay with
various options.

The appending of children is a little messy and points at a need
to standardise this some way
(see https://phabricator.wikimedia.org/T209647)

TODO:
* Remove the iconString property on PageIssueSummary which is no longer
needed

Bug: T209647
Change-Id: Iadd798a820dca6bbb31edc9a8570b6db7aac237a
2019-01-03 08:31:39 -08:00
jdlrobson 29e7bcd6d3 Download Icon Hygiene: Post refactor cleanup
Remove the unnecessary helper object in favor of making
functions standalone.

The function bodies are left intact but a level of indent is removed

Change-Id: If4ee79df096bf386584dba8d971a0858e70e166f
2019-01-02 13:17:06 -08:00
jdlrobson c73ff1f7a5 Composition: DownloadIcon
The DownloadIcon is reduced to a factory function that
returns an instance of Icon

Depends-On: I4d703eef68d51bbe0b03579c5cca0845e17b8c9d
Depends-On: I4a4129b2cac7c7c49559beef0b8780f3211edf9c
Bug: T205592
Change-Id: Ib87390d17bef6f50842f52cd84c9ce2b162aaff0
2019-01-02 13:16:09 -08:00
jenkins-bot 94cab7b414 Merge "Hygiene: revise CtaDrawer.events to options" 2018-12-20 21:54:35 +00:00
Stephen Niedzielski 9f70a004c7 Hygiene: revise CtaDrawer.events to options
Use CtaDrawer.options.events when available instead of CtaDrawer.events.

Change-Id: I7cf5d97bef9179dfa148fa4d5ca447d128031b57
Related: I4a4129b2cac7c7c49559beef0b8780f3211edf9c
Bug: T210870
2018-12-20 19:31:58 +00:00
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