Commit Graph

612 Commits

Author SHA1 Message Date
jdlrobson 1166009c00 skins.minerva.tablet.styles can be merged
This module is unnecessary - it's loaded unconditionally on a page.
Instead bundle the related CSS inside skins.minerva.content.styles

Change-Id: Ieb37d63332ff5b0cf39835b64cc9f0dcaf62c34f
2019-01-15 12:30:30 -08:00
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
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
jdlrobson aa6a2dda4c Watchstar is accessible to non-js users
Bug: T196893
Change-Id: I5dbd164ba68e6c74e80f8bcf90819a526cda5a5e
2018-10-19 11:00:19 -07:00
jenkins-bot 11d6b26093 Merge "Update 'edit' icon to standard" 2018-10-17 22:31:04 +00:00
Volker E 576c7b38a7 Update 'edit' icon to standard
Bug: T207190
Change-Id: Iffaff60f213ad037f826c960da1d876fb923916a
2018-10-17 13:11:53 -07:00
Volker E 4496292268 Hygiene: Remove 'blockquotes.less' in print and screen
There's no reason to have this as separate style file in content.styles
as common text styles are taken care of in 'text.less' and
'print/articles.less' for print. Moving contents rule there.

Change-Id: Ie613d95488e9b5a814b6be8f0c856e9e92ab5aed
2018-10-17 08:25:30 -07:00
Stephen Niedzielski f07985c6de Hygiene: move page issue group parsing to parser
Separate the page issue grouping concern so that changes to parsing
don't concern everything else and vice-versa.

Bug: T203449, T202349
Change-Id: I7bddb0c53310805ece71b8f7821b1d6ce05cfae9
2018-10-16 18:20:38 +00:00
Piotr Miazga 51b6e8209b Add share icon as mobile web beta feature
Add a new beta feature - share icon. When user opts into beta
the share icon will be visible on supported devices (Android OS
and Chrome browser).

Bug: T181195
Change-Id: Ie4b9dd05eea9b63422bd174048d8b1251cb02bf4
2018-10-12 22:08:28 +02:00
jdlrobson cbad0bd363 Merge skin option modules into a single ResourceLoader module and move enabled logic to client
It's presumed that skin options will eventually become the default or be removed from the skin.
While they are not the default, it would be helpful to package them in one single module - as ResourceLoader
modules are costly bloating the dependency graph in the MediaWiki startup module.

In T167713 we talked about grouping our entry points by page rather than feature, which this seems consistent
with. A page with special options enabled is different from a page without.

Change-Id: Id948f913d4743532ba3442d2059a03c122419ff2
2018-10-12 10:18:21 -07:00
jenkins-bot e2b4c024c7 Merge "Update user avatar to latest, slightly overhauled iteration" 2018-10-11 22:21:12 +00:00
jenkins-bot 5d4ad087c1 Merge "Remove code related to no-anonymous-editing mode of MobileFrontend" 2018-10-11 20:27:33 +00:00
Ed Sanders 59c45c2b6d Reduce specificity of wikitable overrides
Bug: T205945
Change-Id: I88d5b9699661005144f3eebc804438afaae373aa
2018-10-11 14:38:07 +01:00
Volker E 8793739b23 Update user avatar to latest, slightly overhauled iteration
Bug: T123810
Change-Id: Ia9c9db52c71135b75125af1cde7e21985df7af64
2018-10-10 17:34:09 -07:00
Bartosz Dziewoński cada514ded Remove code related to no-anonymous-editing mode of MobileFrontend
All of this would only be used with the configuration setting
`$wgMFEditorOptions['anonymousEditing'] = false;`.

Removed features:
* Call-to-action popup in skins.minerva.editor (note that anonymous
  editors still get a CTA from MobileFrontend's EditorOverlay code)
* Pointer towards the edit button shown after registering via the CTA
  (entire skins.minerva.newusers module)

Bug: T205382
Change-Id: I66c7035f7a23581811dda87c911dea41d4a8e5da
2018-10-10 19:03:53 +00:00
jenkins-bot e56b91f9b6 Merge "Enable Dynamic Type in iOS 9+ browsers" 2018-10-09 19:33:30 +00:00
jdlrobson 07a3b81c91 Errors can be counted in statsv
Bug: T205582
Change-Id: I8f67b8356ac271872cac39a416ffefce47959177
2018-10-08 15:05:56 -07:00
Nicholas Ray c1485615bb Enable Dynamic Type in iOS 9+ browsers
Dynamic Type is a feature in iOS that lets users pick their reading size
so that apps can adjust their text size accordingly. This commit makes
the mobile site hook into that feature. If you go to
settings > Accessibility > Larger Text in iOS and increase or decrease
the reading size, the mobile site will now increase / decrease
its text size relative to that setting.

Notable changes:

* Moved `font-size: 100% * @fontScalingFactor` from html to body. This
rule would override Dynamic Type sizing which would effectively disable
it. Moving it to the body makes the rule be relative to Dynamic Type
instead of overriding it in iOS browsers while browsers that don't
support Dynamic Type should observe no visible changes.

* Removed intermediate variable @bodyLineHeight because it was only
being used in one place.

* Added @font-size-body-mobile and made it based on % instead of em
(which is what @font-size-body uses). @font-size-mobile-bod is used by a
media query in browsers that support Dynamic Type and by another media
query in browsers that don't support Dynamic Type.

* Added a feature query for Dynamic Type which will make Dynamic Type CSS
rules only affect browsers that support Dynamic Type. This limits the
feature to iOS 9+ feature but ensures that the css rules don't affect
browsers that don't support Dynamic Type.

* Scaled down Dynamic Type so that its default size would appear
identical to the common browser default text size of 16px. By not doing
this, the default font size in iOS browsers would be 17px (Dynamic
Type's default) and would appear 1px larger than Android browsers.

Bug: T204807
Change-Id: I8a4d621dba8dc56190bd8c974543d08dd374ba5e
2018-10-08 20:20:44 +00:00
jdlrobson 5afe8abdce Remove unused categories property
This is not used by the CategoryOverlay

Bug: T206337
Change-Id: Icc19fe24fbb30db8b76d462bfba8879ff112226a
2018-10-08 08:45:35 -06:00
jenkins-bot 57cb5f8e41 Merge "Make Minerva section editing more like other skins" 2018-10-04 21:26:03 +00:00
jenkins-bot 5d4e3e01aa Merge "Move edit link enabling/disabling out of skins.minerva.editor" 2018-10-04 21:22:56 +00:00
Bartosz Dziewoński 6b0ce86410 Make Minerva section editing more like other skins
Goal: Make skins.minerva.editor not rely on Minerva-specific markup.

SkinMinerva.php:
* Add `class="mw-editsection"` to section edit links in SkinMinerva.
  This is the default behavior in SkinTemplate.
* Tweak the page "Edit" link generated in PHP to be the same as the
  link we were generating in JS: add class="edit-page" and change the
  message for the text.
* (Fix an unrelated code comment that was incorrect.)

skins.minerva.content.styles/hacks.less:
* Remove a hack that was hiding .mw-editsection, since we now use it.

skins.minerva.editor/init.js:
* Stop using the `data-section` attribute on links to decide which
  page section to open in the editor. Instead, use the `href`
  attribute and extract the `section` URL parameter from it.
* Stop using the `edit-page` class to find section edit links.
  Instead, use the `mw-editsection` class.
* Remove super weird code that removed the original "Edit" link from
  the page and generated an identical one to replace it, instead of
  just adding event handlers to the existing one.
* Centralize event handling for all types of edit links.

Bug: T198765
Change-Id: I79639c738ff1c3ec4b48ee2e462d23060151a21b
2018-10-04 14:07:27 -07:00
Bartosz Dziewoński 53a80e1bcc Move edit link enabling/disabling out of skins.minerva.editor
These CSS classes are specific to the Minerva skin and we want to move
this file to MobileFrontend.

Now that this code is all in one place, I noticed that it seems to not
do much at all… Everything in this function looks like it could just
be done in the PHP code. If PHP does it all, then we could remove all
of it for a free performance improvement.

Bug: T198765
Change-Id: I6487c2fc520e14e0856b2e9a6f9dfa5066205817
2018-10-04 14:03:19 -07:00
jdlrobson 33a7484676 Move MainMenu click tracking schema from MobileFrontend to Minerva
Additional changes:
* Rename hook prefix from 'mf.' to 'minerva.'
* Remove now unnecessary RL call

Bug: T204584
Change-Id: I50619e71c5a98e95c8aed3c3f346d4cb8a70abbe
2018-10-02 15:03:17 -07:00
Stephen Niedzielski 77646a40c3 Hygiene: inline util.noop
Replace mobile.startup/util.noop with inlined implementation,
`function() {}`, to reduce indirect dependencies on jQuery (.noop).

Change-Id: I48368ef6cf03fd67e117c9bf8612bbddb7d250c5
2018-10-01 12:54:52 -06:00
Bartosz Dziewoński 1a89047d3b Move redlink CTA out of skins.minerva.editor
It is not part of the editor. Redlinks are part of page content.

Bug: T198765
Change-Id: Iee77a228b6f2db1c5f2e85226d6cc1c6a73a89be
2018-09-27 20:13:16 +00:00
Bartosz Dziewoński 1b61a14535 When browser doesn't support mobile editor, use fallback editor rather than none
Change-Id: I41bd554c3e979061dd8b1846a6412efb3284e7e9
2018-09-27 20:12:49 +00:00
jenkins-bot ba827d4b3c Merge "Revert "Minerva is responsible for turning on WikimediaEvents itself"" 2018-09-26 20:42:38 +00:00
Bartosz Dziewoński b6672a4f9f Less harsh failure mode when attempting to undo in mobile editor
The fancy mobile editor doesn't support undo, but we can just use the
fallback (no-JS) editor. The experience is not very friendly (e.g. due
to two-column diff), but it works.

Previously we showed an old-school alert() message and then loaded the
fancy editor as if it was a normal edit, ignoring the undo parameters.

The whole thing is rather hypothetical, since there are no links to undo
in the mobile interface. See T191706.

Bug: T191706
Change-Id: I5147ada9e85d9188f19ae898fdd411985d19182f
2018-09-25 22:01:36 +00:00
Bartosz Dziewoński ffa4d0e848 Remove some useless code trying to show things that are always visible
* Page edit action (#ca-edit)
  I guess it became always visible when no-JS editing was implemented?

* User page creation CTA (.edit-link)
  I'm making it always visible in Ie2fc6d43ebc03626517eec21bf4738dca05152d0
  (which also makes it available for no-JS editing).

* Section edit links for nested sub-sections (.in-block > .edit-page)
  No idea about these, but they are clearly always shown (even in
  non-article namespaces).

Depends-On: Ie2fc6d43ebc03626517eec21bf4738dca05152d0
Change-Id: I226cb1fd1e716078a4a34ed8349d5304428964cf
2018-09-25 22:01:24 +00:00
Bartosz Dziewoński a773c0eed2 Allow mobile TOC on pages in all namespaces
It was limited to the main namespace since its introduction in
Ieabe8f7071696cde6afbdc6df853aacdb741a4a3. Unfortunately that
commit does not explain the reason.

It should be shown e.g. on user pages (so that sandbox pages
look like the real article) or on project pages (many policy
or help pages on Wikipedia are long and would benefit from it).

It looks like some of the CSS code already assumed that the
TOC would be shown in all namespaces (space for it was reserved
using a 'visibility: hidden;' element on all pages).

Bug: T205312
Change-Id: Id6935f5a7a3701c1c7a38fb37b48b6a3bbc80393
2018-09-25 11:49:25 +02:00
jenkins-bot b2f2152fb0 Merge "Remove broken remains of &campaign=leftNavSignup handling" 2018-09-25 08:49:46 +00:00
Jdlrobson abf445ec9b Revert "Minerva is responsible for turning on WikimediaEvents itself"
While harmless, this patch is not needed if we take a
different approach as discussed in
https://phabricator.wikimedia.org/T204144#4612790

This reverts commit 01dc9de92e.

Change-Id: Id2fdd8677042121142ab2663edfa0ee400b8bf22
2018-09-24 22:52:12 +00:00
jenkins-bot 98ebba5bbe Merge "Buttons should be cursor pointer by default" 2018-09-24 21:00:53 +00:00
jdlrobson 85505d6906 Buttons should be cursor pointer by default
Bug: T205321
Change-Id: I8f7f4afe22db33e16b443394fe8748dcd76ae913
2018-09-24 20:41:26 +00:00
Bartosz Dziewoński 992630c705 Remove broken remains of &campaign=leftNavSignup handling
This code could never be used under normal circumstances since
a crucial bit of it was removed from MobileFrontend in 2015:
(I65e943b6dad8bfea994020f9f555bd095da1a171)

    // Allow us to distinguish sign ups from the left nav to logins.
    // This allows us to show them an edit tutorial when they return to the page.
    if ( $query['returntoquery'] === 'welcome=yes' ) {
    	$query['returntoquery'] = 'campaign=leftNavSignup';
    }

…and honestly, that's for good, because it fails horribly
when triggered by adding &campaign=leftNavSignup to the URL
manually: clicking "Start editing" in the callout navigates
you to an article called "Undefined/leftNavSignup".

Bug: T205325
Change-Id: I0e385488be5b2eaa7d489029b91e18b336c0d133
2018-09-24 19:30:03 +00:00
jenkins-bot 1ad76e7d13 Merge "Users can request new treatment via query string" 2018-09-20 19:02:59 +00:00
jdlrobson 2f3fed5f4a Users can request new treatment via query string
Bug: T204746
Change-Id: Icea989a401a5de8772fdcd9f25f100899bc1c6f3
2018-09-19 15:21:32 -07:00
jdlrobson 01dc9de92e Minerva is responsible for turning on WikimediaEvents itself
Unlike other skins, Minerva wants to be in charge of when WikimediaEvents
is loaded, so that it can guarantee load order happens at a time that
suits it.

WikimediaEvents will be loaded after initialisation of the interface.
This allows Minerva to enable schemas such as ReadingDepth conditionally.

Upon merging this patch, Ibb45f40ea301727c0c6480043760bd9426106845 can
be merged which will revoke WikimediaEvent's ownership.
Merging in this order will ensure that ReadingDepth  is never
removed from production.

Bug: T204144
Change-Id: If8395033f31485aca0ca3b38fda1be985369b481
2018-09-19 22:09:26 +00:00
jdlrobson 03bc2518d4 Red links are linked separately
In I1a471f81cc9390fc9e8665a7a336cf2dd7a063ab we excluded
edit events that led to the creation of a new page.

This restores them by providing a dedicated home for this data
in the schema.

Additional changes:
* Address some line length warnings

Bug: T204073
Change-Id: Ie7eb95f15737e94b7926d38ed6411bc0e5df2404
2018-09-18 13:43:56 -06:00
T. Bayer 287a2aafe9 Exclude redlink clicks from modalEditClicked event
This event is meant to track attempts to edit the page we are on,
but also happened to catch clicks on "see talk page" links, in
case that talk page doesn't exist yet.

Bug: T204073
Change-Id: I1a471f81cc9390fc9e8665a7a336cf2dd7a063ab
2018-09-18 13:37:34 -06:00
Bartosz Dziewoński 5e7b3994fd Move Parsoid output overrides to 'mediawiki.skinning.content.parsoid' skinStyles
We need to load these only when VisualEditor is loaded. This is
the best way to ensure that. They have been haphazardly placed
in different files.

The goal of this change is to move content styling for Minerva out of
mobile.editor.ve/minerva.less, and thus to be able to move this file
to mediawiki/extensions/MobileFrontend (T202978). But I spotted the
other places while working on that.

Moved as-is:
* skins.minerva.content.styles/links.less
* mobile.editor.ve/minerva.less

No longer needed:
* skins.minerva.content.styles/text.less
  Parsoid now uses <sup> tags for references rather than <span>,
  so the existing rules for <sup> tags are enough. See T45094,
  <https://www.mediawiki.org/wiki/Specs/HTML/1.6.0/Extensions/Cite>.

Was never needed:
* skins.minerva.content.styles/thumbnails.less
  The styles from the core module 'mediawiki.skinning.content.parsoid'
  are never loaded, so we don't need to override them.

Bug: T202978
Change-Id: I45e1cb89b65a41a29d2b1a361a79199745ccec14
2018-09-17 21:55:32 +00:00
Stephen Niedzielski ba17b11987 Hygiene: fix line length violators
Change-Id: Ie1619acf5f319dafc2c9dc612335c1208522dab8
2018-09-13 09:33:20 -06:00
jenkins-bot 3abd6ef9f0 Merge "build: Update linters" 2018-09-12 17:26:12 +00:00
Ed Sanders 04a2b27d7f build: Update linters
This exposes two broken tests:

* #setCount (Eastern Arabic numerals)
* clicking on the product of createBanner() should trigger a custom event

that were previously passing due to buggy assertions.

Change-Id: If18ad1ff9363fff65d3e347c01ce4bc0669b2a0e
2018-09-11 13:42:11 -07:00
jenkins-bot 5145bc1818 Merge "Fix `formatPageIssuesSeverity`" 2018-09-07 14:48:27 +00:00
jenkins-bot 6f7e652f32 Merge "Hygiene: Consistent error naming" 2018-09-07 14:17:22 +00:00
jdlrobson f14d9514c6 Fix `formatPageIssuesSeverity`
The page-issues reducer function that retrieves the severityLevels
for issues was incorrectly comparing two values in the multiple-issues
scenario.

Instead of comparing the severity of the current issue with the previous
value in the accumulator, it was comparing the current issue with the
previous issue in the original array, thus ignoring the
previous `maxSeverity` value in the accumulator.

Tests added and function refactored with more explicit variable names.

Bug: T203725
Change-Id: Ia4c15cbf0c2457d68a7381e8ed04c1a6b3ae65d1
2018-09-07 11:25:16 +02:00
jdlrobson c68f7ba09f Issues instrumentation: issuesClicked events should always send 1 sectionNumber
Erroneously in I6fd55c35b9e2ce35894259f36d1a50fb5dca5e43 for the old treatment
 we sent sectionNumbers for all issues in the page.

This is inconsistent with the issuesSeverity field above it
Add a clarifying inline comment.

Bug: T203050
Change-Id: Ib1fcda0c49a162cd7aca8ee8b3221236f724e1d7
2018-09-06 17:40:34 -07:00
jdlrobson e7f0cfd665 Hygiene: Consistent error naming
Rather than using err and error as variable, use error for consistency
Follow up to I07f01b4c025b2e5e4cbf88ec05e7c536442c62cc

Bug: T202026
Change-Id: I54165ff1f1b17284d8232c491244e1a98950d5e2
2018-09-06 21:04:53 +00:00
jenkins-bot 993e77e76b Merge "Correct the link for page issues in the old treatment." 2018-09-05 20:14:06 +00:00
jenkins-bot 002160ae9c Merge "page-issues sectionNumbers consistency on modalClose event" 2018-09-05 20:02:35 +00:00
jdlrobson dc6f707ea1 Correct the link for page issues in the old treatment.
createBanner was incorrectly always assigning the 'all' keyword
to the old page issues banner. Instead it should use the section
number in the function signature - as this decision of which issues
to show is made inside initPageIssues

For the old treatment, in the main namespace, we only show issues
in the lead section. When we use the 'all' keyword the visual is
the same, but it breaks the instrumentation requirement that
sectionNumbers and issuesSeverity should be the correct length

Note, for the talk and category pages treatment, we do not
log any events so the instrumentation doesn't matter here
and the 'all' keyword correctly targets all issues in the page
as before.

Bug: T203050
Change-Id: I63e45da05ca033fe282633f7fd59038a8e5d8c8d
2018-09-05 12:51:56 -07:00
Jan Drewniak 1a9bcd1e8a page-issues sectionNumbers consistency on modalClose event
For the page-issues modalClose event, the number of values for `sectionNumbers`
and `issuesSeverity` should be the same, since `sectionNumbers` should describe
the the section of each visible issue in the modal, not the section of the
modal itself.

Bug: T203050
Change-Id: Ic58c5940a6059e71aa3aeed26232afbe8faf1618
2018-09-05 21:29:53 +02:00
jenkins-bot 752557d88b Merge "Scope styling of kbd/samp/code/pre to content areas" 2018-09-04 21:33:30 +00:00
Ed Sanders 270fb18f2e Scope styling of kbd/samp/code/pre to content areas
Extensions may be using these tags and not want
these styles (especially the border).

Bug: T203474
Change-Id: I03a22cf6377002f968cabdcce9354e73354fb6b8
2018-09-04 21:08:12 +00:00
Timo Tijhof c1fe42fede Hygiene: Use early returns in a few places for special cases
When handling special cases that are logically distinct from
the function's main branch, it improves code quality (through
readability and maintainability) to place those first and with
an early return.

The has the benefit of the main return statement being easy to
find at the end of the function. (Not early and/or in a block).

It also means when working on the code, there is generally a
less complexity and fewer nesting levels, given that most code
is in the main branch. This makes is easier and quicker to verify
that code does what it should, as well as making it easy to
extend in the future. When considering to add code to end of a
function's main scope, it should relate to the function's main
branch by default, not a special case. For example, a getName()
method should not end with a top-level statement 'return false'
(unless it is a stub). Rather, one would expect it to end with
`return name`.

Change-Id: I1f3088f2409c82dd3bf757fc8fa27dc97ae2767b
2018-09-04 21:08:00 +00:00
jenkins-bot 34ead3f8c5 Merge "Client side error reporting for Minerva+MobileFrontend" 2018-08-30 22:40:19 +00:00
jdlrobson cd528e120b Client side error reporting for Minerva+MobileFrontend
This adds a client side error logger that will store errors
in EventLogging. We will use it to get a sense of the number
of errors inside mobile.

To enable make use of the new configuration variable
wgMinervaErrorLogSamplingRate = 1

Notes:
* the optional `meta` field will not be utilised by the generic
error handler.
* URI length is not trimmed for title. We will consider whether we need
to make any adjustments to the schema values during roll out.
** For stack trace, we limit the length by removing errorUrl (which is logged
separately)

Testing:
Add throw new Error('asasasa'); anywhere in your code and make
sure the code executes. It should trigger an Error event provided
that configuration has been updated.

Bug: T202026
Change-Id: I07f01b4c025b2e5e4cbf88ec05e7c536442c62cc
2018-08-30 14:35:27 -07:00
Jan Drewniak ce2826854b Add bottom margin to page issues
Bug: T202568
Change-Id: Iae5fe40ad8507b218594fe025dd6327ff37b753d
2018-08-30 19:22:49 +00:00
Jan Drewniak 815f3d99ee For page-issues pageLoaded and editClicked events, treat
"multiple issues" templates as one issue.

When logging the `issuesSeverity` and `sectionNumbers` field,
any issues that are part of a "multiple issues" template only send
one value.

Adds an `isMultiple` property to IssueSummary to determine which
issues are part of a multiple-issues template.

Bug: T203050
Change-Id: I7d55dfead72439df4accadcdc8623a080e1321c2
2018-08-29 13:59:20 -07:00
Jan Drewniak 2cbd57c2f3 Consistent sectionNumbers and issuesSeverity for page-issues.
The value of `sectionNumbers` should be the section number of each issue
Not the number of the sections that have issues.

Bug: T203050
Change-Id: I6fd55c35b9e2ce35894259f36d1a50fb5dca5e43
2018-08-29 13:45:55 -07:00
jenkins-bot 198276256e Merge "Avoid abrupt and jarring white flash in media viewer" 2018-08-28 19:42:04 +00:00
jdlrobson 0acfda1931 Don't send NaN as a value for sectionNumbers
The keyword "all" was being parsed as an integer incorrectly. To avoid this

Bug: T202940
Change-Id: I5553a4bb50cd7639c879f2c6e812fba25a216175
2018-08-28 18:26:09 +00:00
Zoranzoki21 6d877928f5 Fix common typos in code
Bug: T201491
Change-Id: I1b31983069a45ff6c0493f370596351a407f6a87
2018-08-27 20:54:16 +00:00
jenkins-bot 7fc910d0d8 Merge "Log sectionNumbers in PageIssues schema" 2018-08-27 20:43:50 +00:00
jenkins-bot 86a5913573 Merge "Don't send issuesSeverity given that's an event default" 2018-08-27 20:43:48 +00:00
Jan Drewniak ae19031f8e Log sectionNumbers in PageIssues schema
Adds logging for the sectionNumbers field in the PageIssues schema.

Additional changes:
* createBanner now requires section number to be a string - this ensures
consistency with how these are used.
* fix a bug which meant createBanner was being called with undefined
section number (due to table of contents)
* Fix some indents in some JSDoc blocks
* Change parameter in function signature from mixed type (int or string)
to explicit string
* update schema number

Depends-On: Ia2696b86c6855d7b46a3f668585377d106d7af23
Bug: T202098
Change-Id: I20511a77258ea245f3d6fe93ade238e5df397a71
2018-08-27 18:02:51 +00:00
jdlrobson ee36bcfccf Don't send issuesSeverity given that's an event default
An event only needs to send this field when overriding the
default. This line is thus unnecessary.

Change-Id: Ia1dfcac5dd25f36f5f4169daf6535fd66aedf754
2018-08-27 10:52:55 -07:00
jenkins-bot bad8347fb2 Merge "Make edit click handling consistent" 2018-08-27 13:34:50 +00:00
jdlrobson 60dd426ee6 Make edit click handling consistent
Previously, the main edit icon in the page actions was handled indirectly
by changing the URL and then routing the edit via detecting the hash
fragment has changed. On the other hand section edit links were hijacked
via a click handler. The latter is better as it doesn't modify the DOM,
which allows the editor to override the JavaScript behaviour. It's also
preferable as it doesn't interfere with EventLogging - this subtle difference
was supressing edits to the Edit and PageIssues schema.

Bug: T202786
Change-Id: I4175bc6f0ddda28397d185502d1839716d051c56
2018-08-27 13:23:27 +00:00
jdlrobson ba064c2013 Avoid abrupt and jarring white flash in media viewer
Previously, the image overlay would always be loaded asynchronously.
Given clicking left/right opens a new mediaviewer this left a jarring
white flash. By loading the image overlay synchronously after the first
has been loaded, we avoid this flash.

Note, the task does propose preloading and animating the images
but this is a much bigger change and deemed out of scope for this
particular task.

Additional change:
* Use a shared mw.Api instance for ImageOverlay and PageGateway

Bug: T197110
Change-Id: I28d06b34cdea4fedcd7fb754572191e904ecc81a
2018-08-23 22:55:15 -06:00
jdlrobson 0830e80c38 Hide section edit icons when unable to edit
When unable to edit, the edit icon at the top of the page serves
as the indicator that this is the case. In case of section edits
we hide them.

Bug: T197497
Change-Id: I23f196602ad64051426baf5090f0a6d6be941de8
2018-08-23 13:15:43 -07:00
jenkins-bot 62b92e1c59 Merge "On tablet, issues boxes shouldn't take up full screen" 2018-08-23 11:39:34 +00:00
jenkins-bot cd6ef504cf Merge "Make Deferreds promise compatible" 2018-08-22 22:33:52 +00:00
jdlrobson 3c494e0454 On tablet, issues boxes shouldn't take up full screen
Setting width to auto on the ambox itself will ensure section
issues are not pushed below infoboxes, while ensuring that due
to the tbody width 100% rule that they will take up full screen
where possible.

Bug: T202512
Change-Id: I2dd82f18f80012bd95ca271b97a163de918110c5
2018-08-22 14:55:11 -07:00
jdlrobson 56a10c40e0 Make Deferreds promise compatible
This patch updates the various usages of $.Deferred for loading
overlays in routes to be ES6 Promise compatible

Bug: T188937
Change-Id: I3fc24bf3471a99e7671d1191bdd46cb741286ee1
2018-08-22 14:27:48 -07:00
Stephen Niedzielski 73131b7b45 Hygiene: move page issue overlay to distinct file
Move page issue overlay specific code out of cleanuptemplates and into
PageIssueOverlay to clarify what code is specific to the page issues
modal screen and what's specific to the page itself.

Bug: T191528
Change-Id: I95821ccda84306ddd5d22b57ffbae8d13ca44408
2018-08-22 13:42:42 -06:00
jdlrobson 65f2e5ef51 getPageToken now defined in core
Bug: T201124
Depends-On: Id43e9d3f3e687133c98017d24c10c307a5a855a1
Change-Id: I2b519361dfa974acef918e00ffc1ae14e33e28f5
2018-08-21 20:33:35 +00:00
jdlrobson 7962ba87a5 Docs: Present classes rather than modules
Use classes rather than modules for the various Views inside
Minerva.

Change-Id: I849ae50e48c01012ba6713ec3bf5f1c836ef22bc
2018-08-20 16:43:41 -07:00
jdlrobson eea19f3e18 PageIssues should use new standard pageToken getter
Rather than inventing its own page token the PageIssues
schema will rely on the standard page token.

In future when I9bb18d47e36d2d99d812e5b47ea9516d3dff3a16 is
merged this will mean that PageIssues and ReadingDepth have
consistent page tokens.

Bug: T201124
Change-Id: I19fea41e04cd792423ea9d41a673563418b69726
2018-08-17 10:28:17 -07:00
jenkins-bot e9e7e8256b Merge "Hygiene: IssuesOverlay moved from MobileFrontend to Minerva" 2018-08-16 21:38:49 +00:00
jdlrobson 40eca4e3f3 Hygiene: IssuesOverlay moved from MobileFrontend to Minerva
The CleanupOverlay is moved to Minerva and renamed the
IssuesOverlay to be consistent with current terminology

The new IssuesOverlay is defined inside the module
skins.minerva.scripts to which it now belongs.

Additional changes:
* various file renames
* overlay-cleanup renames overlay-issues
* cleanuptemplates renamed issues.js
* Add a test stub file to avoid the need to load templates inside
the test environment

After this change, I75f47622d94e504688e04dfb2892540473817053
should be merged to avoid confusion.

Change-Id: I08945a324a6b878abe56efed1e988466085b3018
2018-08-16 14:06:12 -07:00
jenkins-bot 5d2eb53df6 Merge "Drop portal styles in Minerva" 2018-08-16 20:05:16 +00:00
jdlrobson 6a5b2e284d Allow subsection issues
Depends-On: Iaa35317cdd96a1ad306ab38dc3ab2f18cc7bb31f
Bug: T197932
Change-Id: I84649dc80192729934f7bbb23a8e78296717bf36
2018-08-16 11:51:10 -07:00
jdlrobson 6718bc4351 Drop issues on editor
T196150 disabled the fallback editor when JavaScript is available.
As a result the code for page issues on the editor screen is redundant.
This simplifies our code.

The css rules relating to editor
issues are retained, given they simplify the editor screen for mobile
devices.

Bug: T196150
Change-Id: I76d586414cdd8de533bb891b87d1e0b7efc20a68
2018-08-16 11:43:28 -07:00
jenkins-bot 44e59d625d Merge "Disable edit icon in read-only mode" 2018-08-15 21:06:39 +00:00
Stephen Niedzielski ac245a7d97 Hygiene: don't hardcode page issue header selector
When parsing page issues by header, use the MobileFrontend selector
symbol, Page.HEADING_SELECTOR, instead of hardcoding it. This selector
is configurable by the extension.

Bug: T191528
Change-Id: I7c9db38f9102bfef0a98784be32c7e4707d747e5
2018-08-15 19:40:49 +00:00
jdlrobson 26510442f0 Drop portal styles in Minerva
TemplateStyles exists now. Given portals make up a small % of our
content and I can't find any templates using these rules, let's drop
them and guide people to use TemplateStyles instead if anybody
complains.

Change-Id: I738180fa35c6c633791e4ec11ea4b01dd65154cc
2018-08-15 19:40:19 +00:00
Jan Drewniak a0071643d3 Disable edit icon in read-only mode
When a wiki is in read-only mode, the edit icon on articles should
not open an editor. Instead, it should be in a "disabled" state and
inform the user that the wiki is in read-only mode
( i.e. show the "apierror-readonly" message).

Bug: T197497
Change-Id: Iee1414c20bea3ca936fb807820e58e5ed566d008
2018-08-15 19:40:09 +00:00
jenkins-bot 1d63e15cec Merge "Hygiene: move page issues A/B test logging to file" 2018-08-15 00:49:45 +00:00
jdlrobson 1b2314f426 Correct search icon
In Ie5ec06152c418c4aa1b620b3d0a904cc9517e5d0 we merged two search
icons. On retrospect, these icons were not the same - one was bigger
than the other.
(see https://phabricator.wikimedia.org/T199000#4501790)

This change replaces the icon with the correct one.

Bug: T199000
Change-Id: Ieca1b4cc72bb782c15c0c53fe4721deb1ee041fc
2018-08-14 14:20:00 -07:00
Stephen Niedzielski 22b2f0fd7c Hygiene: move page issues A/B test logging to file
Refactor the page issues A/B test logging implementation to a distinct
new file that only has the responsibility of tracking.

T191528 is referenced in this commit as I was having difficulty
answering the feedback and bugs reported in the current implementation
without working through and restructuring the flow as I understood it.
This refactor is merely a byproduct artifact of that effort to focus on
the parsing and presentation responsibilities.

Bug: T191528
Change-Id: If547a0a67fbc9a532f834fe374abf668309e73df
2018-08-14 20:49:06 +00:00
Stephen Niedzielski a905b1c161 Hygiene: replace header and content divs
- Replace the header div with a header element and the content div with
  a main element. main and header elements are already shivved:
  https://gerrit.wikimedia.org/r/plugins/gitiles/mediawiki/core/+/22dd581f10/resources/lib/html5shiv/html5shiv.js#234.

- Link the wiki header title / logo to the main page. Note: the link
  border around images is already omitted. The link is identical to the
  menu home button.

Bug: T198947
Change-Id: Id312638d86179e75bc670e72e5943f8c00232bbb
2018-08-10 20:44:14 +00:00
Stephen Niedzielski 061d155303 Hygiene: remove unused function AB.onABStart()
Callback usage was removed in I67fb6e448f6ecc97c89c1187e491ee05f7a312ef
so this function may be removed.

Bug: T191532
Change-Id: I88f0d6740c9e9615faba2e3c60772269c705f43e
2018-08-09 20:50:51 +00:00
Jan Drewniak f67c410859 Page Issues AB test event-logging instrumentation
Uses `mw.trackSubscribe` to create an intermediary data handler
named `wikimedia.PageIssuesAB` which extends event-logging data
before passing it to the eventLogging through `wikimedia.event.PageIssues`.

Event hooks are placed where appropriate and the `CleanupOverlay`
class is extended to capture events from within the page issues
modal.

Additional changes:
* Merge two identical on click event handlers for
.edit-page, .edit-link elements
* change pageIssueParser.maxSeverity to accept an array of severity levels
instead of an array of pageIssues objects

Depends-On: Ic84e4a3286220407863167e0f57cef1b13a72964
Bug: T191532
Change-Id: I67fb6e448f6ecc97c89c1187e491ee05f7a312ef
2018-08-09 20:30:12 +00:00
jenkins-bot d85d4328f9 Merge "Fix: add a few more POV templates to issue parser" 2018-08-09 18:30:50 +00:00
jenkins-bot b46f4a24c4 Merge "Correct blur position in tablet mode" 2018-08-09 17:32:11 +00:00
jdlrobson f178228a65 Correct blur position in tablet mode
Addresses problem where text reads like an incomplete sentence
on tablet, see https://phabricator.wikimedia.org/T197931#4475197

Bug: T197931
Change-Id: I71aba2c53570196f51c9e833b1a6d69b2dc983ad
2018-08-09 09:32:18 -07:00
Stephen Niedzielski 765a46c464 Fix: add a few more POV templates to issue parser
Bug: T191528
Change-Id: I777921798fee447dc3c954a585e418371e2866e8
2018-08-09 09:01:45 -05:00
jenkins-bot 88baff3515 Merge "Remove CSS overrides for quotebox from the hacks" 2018-08-09 00:25:44 +00:00
Stephen Niedzielski a6ba0f2c77 Fix: page issue icon type determination
The page issuer parser works with plain old Elements, not jQuery. Pass
in the expected type.

This addresses problems with the icon display for ambox templates relating
to balance (see https://phabricator.wikimedia.org/T191528#4465069)

Bug: T191528
Change-Id: Ie4a34087f9f1700342cc54a50cd3272fc9ea34ee
2018-08-08 17:09:03 -07:00
Derk-Jan Hartman d2ca7a0b48 Remove CSS overrides for quotebox from the hacks
Will now be enforced from TemplateStyles

Change-Id: Ia8b0dfe901cfc18f821a236c45bf39123f32779c
2018-08-07 22:38:50 +02:00
jenkins-bot 6c9f2c6ecb Merge "Set flex-direction for thumbnails to avoid overflow issues" 2018-08-02 13:00:25 +00:00
jdlrobson 22cc13bad2 Set flex-direction for thumbnails to avoid overflow issues
`flex-direction:column` causes the flex-child `a` to grow it's height
and sets its width to 'auto' which, like a block-element, makes it
occupy the "available" space.

Bug: T200518
Change-Id: I5af9d082e77dd4ca2d92460824977f085011e622
2018-08-02 12:16:43 +00:00
Stephen Niedzielski 477a044728 Fix: hide new page issues links on focus and tap
Change-Id: I355c5c4b4278071e89aa990a7644a0fb6e901dcb
2018-08-01 14:32:08 -05:00
jdlrobson 100b7951a2 Restore page issues
Follow up to I96808541d48be7869fed3bc30babb80866e139ec
which incorrectly wired up the page issues feature.

Bug: T200867
Change-Id: I7c3198f95dae1f7c5e0991dca651dd64949b3615
2018-08-01 11:34:20 +08:00
jdlrobson 9644e5372b Add tests for page issues code
Bug: T191532
Change-Id: I5291b51ec32ab95ff1ec41e50b84fea4567f28cb
2018-07-31 11:42:09 +00:00
jdlrobson 0ca42ee64e Hygiene: Separate cleanups library from initialisation
In order to write tests, we'd like to separate code without side
effects from code that executes it as part of setup.

This shuffles dependencies and makes page and overlayManager
parameters to the init function (injected dependencies)

Change-Id: I96808541d48be7869fed3bc30babb80866e139ec
2018-07-31 11:42:04 +00:00
jdlrobson 3d7007f6a5 Hygiene: Remove anonymous function and indent
The readability of cleanuptemplates is hurt by having an anonymous
function embedded inside.

This patch wraps initPageIssues with the jquery ready call and removes
the function wrapper and decreases the indent of its contents.

Purely stylistic change.

Change-Id: I44b2371add32780f96160e0075787a9ea7222f39
2018-07-31 11:41:59 +00:00
Jan Drewniak e27cbf2a49 Reading depth hook should send additional sampling bucket parameter
The hook that enables the Reading depth test should send an
additional paramter that specifies which test bucket the hook
being is calling from.

Bug: T191532
Change-Id: Ifd9f43220c476ece8a0c0cee46b62b58a717c616
2018-07-31 11:40:29 +00:00
jenkins-bot 4f907cd148 Merge "Remove fancy block info popups (move to MobileFrontend)" 2018-07-27 03:41:09 +00:00
jenkins-bot 68d1bc61f6 Merge "Limit editor text area styles to where they are needed" 2018-07-26 23:28:55 +00:00
Bartosz Dziewoński f114f81d42 Remove fancy block info popups (move to MobileFrontend)
We only used them for registered users, but MobileFrontend's
EditorOverlay code can use them for anonymous users as well.

Remove code for looking up block details in wgMinervaUserBlockInfo,
now we only care whether the user is blocked at all to display a
different icon. MobileFrontend looks up the same information via API
already.

Remove unused message 'mobile-frontend-editor-blocked-info-loggedin',
it was only used by non-fancy popups, which were removed in favor of
the new ones in f51cf7db7b.

Bug: T193754
Bug: T198765
Depends-On: I80564c3e6e2d0f4d7eae754f206780fb4054f254
Change-Id: I64be24845b4fee76d6b4a8e481a218f2160fced6
2018-07-26 23:44:28 +02:00
jdlrobson 28b9517dcb Limit page issues truncation to at least 2 lines
In the case of template {{dictdef}} the issue gets limited to one
line making it unreadable on mobile at certain resolutions due to the
learn more link taking up space that's available to the issue itself

As well as enforcing a max-height, enforce a height so that all issues
can have at least 2 lines to play with on all mobile screen resolutions

Bug: T197931
Change-Id: Icebdcf37d0f307dc82493c5ced53b632a6b09aea
2018-07-26 08:14:08 -05:00
Jan Drewniak a10bb49c01 Truncate page-issues to 2 lines of text.
Truncates ambox template styles to only show 2 lines of text.
"Learn more" link is placed on the same line as message text
and a fade is applied so that it doesn't overlap with the message text.

On table & larger layouts, the "learn more" link is placed on its
own line below the page-issue text.

Bug: T197931
Change-Id: Id607dea537c212298c02a0e1639aef2a786eb424
2018-07-26 08:14:08 -05:00
jdlrobson c7cb4ecee0 Limit editor text area styles to where they are needed
Currently we load textarea styles across all pages. However, in practice
textareas only show up in the edit page and inside our JavaScript overlays

To avoid loading these styles as rendering blocking CSS

Additional changes:
* Drop css reset for textarea so that textareas where unstyled
have sensible defaults. Note given the usage of OOUI and MediaWiki UI
this should be minimal/no disruption.
* For consistency intentionally change the padding of the non-js editor
to be consistent with other textareas
* The padding-left/padding-right rules currently override the default rule
so consolidate them into one single rule

Note:
* This will not break non-JavaScript editor mode as the module
mediawiki.action.edit.styles is loaded on that page as a render blocking
style.

Bug: T199000
Depends-On: I1ab170fc4089b0c8129a3e62ee78efad1c6709fa
Change-Id: I91743fdf1942a1b1b750422e973bf98fc4d106db
2018-07-26 10:35:16 +08:00
jdlrobson a3efca1582 Remove unnecessary skins.minerva.base.styles
* truncated-text is only used in MainMenu, last modified bar,
 a few special pages
Making this a mixin and limiting it to mobile.startup skinStyles
and mobile.special.styles thus makes sense
* cloaked-element is only ever added by Skin.js in mobile.startup
* position-fixed is only ever added by Skin.js

Change-Id: Iaf7061e9dda87eb25c963f8a281175af08f358e5
2018-07-26 01:18:00 +00:00
jenkins-bot 8276241e39 Merge "Move overlay-header styles to Overlay" 2018-07-25 14:00:47 +00:00
Stephen Niedzielski 9a7ee86fc1 Update: remove the internal link icons
Bug: T190549
Change-Id: I87c55d26d36eead60c0137e244bdcc09f4239a76
2018-07-25 10:55:39 +08:00
jdlrobson 8351c88c50 Move overlay-header styles to Overlay
.header > form matches no element on the page
all other selectors are linked to the mobile Overlay so should
be shipped along with those styles.

Remove .header-action rule, given that header-action's only appear
inside Overlays (Editor, Category and Talk)

A more generic rule already exists (.overlay .header-action > *)
for overlays that sets the min-height

Change-Id: I114fe80e50bb833e9e6bb0fb6b13c2e929244ddf
2018-07-25 02:45:34 +00:00
jenkins-bot ef63ced9b4 Merge "Match section issues to section number" 2018-07-24 23:03:18 +00:00
jenkins-bot 65728feb27 Merge "Don't ship 2 magnifying glass icons" 2018-07-24 18:14:19 +00:00
jdlrobson 775af007f0 Don't ship 2 magnifying glass icons
We already make use of the images 'name' key inside
skins.minerva.content.styles.images to define the full
CSS selector. We can use this approach to ship a single version of
the magnifying glass icon, rather than having 2 defined in both
skins.minerva.base.styles and skins.minerva.icons.images

Change-Id: Ie5ec06152c418c4aa1b620b3d0a904cc9517e5d0
2018-07-24 11:55:41 -06:00
jdlrobson fcaf244cc4 Hygiene: lazy loading animations do not need to be render blocking
The transition only happens when images are loaded via JavaScript
so limit the styles to a file loaded via JS NOT render blocking
CSS

Change-Id: I56661db13e7fbb400a05b13c369d8598df449297
2018-07-23 13:57:42 -05:00
jenkins-bot 4aba34a5ed Merge "Cleanup: Last modified active color should be loaded via JS" 2018-07-23 16:54:28 +00:00
jdlrobson 54af37c269 Match section issues to section number
The section number relates to the position of the corresponding heading
not the corresponding top level section.

This only changes the URL, not the functionality. sub section issues
will continue to be grouped along with other section issues.

Bug: T197932
Change-Id: I325a3b477f89c9cc24f13ca017f478a6b7e7b68e
2018-07-23 10:09:32 -05:00
Stephen Niedzielski d2f6c38fe7 Update: page issue icons
- Fix a bug where the all issues endpoint would incorrectly collect
  issues from all sections.

- Update the page issue iconography. This increases the size of the
  delivered code and images by 1743 B minified uncompressed according to
  mw.inspect() (from 16.4 KiB to 18.1 KiB).

- Add support for identifying page issue severity based on template CSS
  classes.

- For multiple issues templates, show the highest priority icon.

Bug: T191528
Change-Id: Ie0a4c83ec7cfb856ec581d058797109746e3cb99
2018-07-17 15:54:17 -05:00
jdlrobson 99bc9d8c55 Enforce lowercase jsdoc types
Follow up to I6cbac15940e4501aee7ede8f421b77ffd027170d

Change-Id: I22bcbf1f083451a0f68b692b9a0acc716d11c62c
2018-07-17 08:06:35 -05:00
jenkins-bot 6c981fa4f8 Merge "Section issues overlay has different heading" 2018-07-13 12:46:20 +00:00
jdlrobson dfc29032b5 Section issues overlay has different heading
Per https://phabricator.wikimedia.org/T197932#4417319
Note that given talk/category overlay does not use or
display section issues, to simplify things any section other
than 0 or all will use this heading.

Bug: T197932
Change-Id: I737fb07aaadcea7772d0b08f8b0652dcf2f4623d
2018-07-12 15:07:22 -07:00
Stephen Niedzielski 10024b641e Hygiene: fix DownloadIcon function typing
Change-Id: I421332acae4ace9d0bb7cfcd4b31d9f4581c3e34
2018-07-11 13:39:55 -05:00
jdlrobson 596e405807 Tie issues to sections
Parse all issues inside a page, and load them into the issues overlay.

In group A, given issues inside later sections are hidden, it will not be possible
to navigate to these new overlay screens. In group A, lead section issues will continue
to only show lead section issues.

Changes:
* The /issues route is replaced by the more specific /issues/all and
/issues/{section num}, issues are stored in an "allIssues" module object.
* Begin using constants for namespaces for better readability
* Drop width 100% - this breaks display on tablet devices of issues within
sections
* Improve createBanner documentation to explain different treatments
* Set the issues overlay header inside initPageIssues when setting up
the route.

Bug: T197932
Change-Id: I21470648a61d57cfa4befceec596cf0f6e2110ec
2018-07-11 09:47:46 -07:00
jenkins-bot d5ae991522 Merge "Hygiene: update JSDoc boxed and JQuery types" 2018-07-10 23:00:40 +00:00
jenkins-bot 61bc884204 Merge "Talk page 'issues' are not subject to A/B test" 2018-07-10 22:57:29 +00:00
jdlrobson 70e4e9e85a Cleanup: Last modified active color should be loaded via JS
.active class is added via JS by skins.minerva.scripts
skins.minerva.base.styles is loaded as render blocking
Thus this css rule can be moved safely to a non-render blocking place

Change-Id: Ie8bab826ebc0785e24bb85600de261372c429434
2018-07-10 22:45:24 +00:00
jenkins-bot 80b41c0170 Merge "Hygiene: Document why selectors are needed" 2018-07-09 22:07:08 +00:00
jdlrobson 20e3bbd28f Don't render blank issues
If an extracted issue has no text, do not render it

Bug: T199005
Change-Id: I18047492e891285ed3af113200d2909e178b8224
2018-07-09 21:33:13 +00:00
jdlrobson 34e1a80318 Talk page 'issues' are not subject to A/B test
Bug: T199005
Change-Id: Ib5f60fc5c2157d0b10e39209f5ce4ff56d745eee
2018-07-09 14:24:29 -07:00
jdlrobson 795c0abf06 Hygiene: Document why selectors are needed
This rule has a lot of selectors (note the fix me)
It's not clear what each of them are needed for so make that
clearer in the code.

Change-Id: I80f07118977f465b7d09efad28f94917dd962a3d
2018-07-05 23:54:52 +00:00
jenkins-bot 48e6e4c6ac Merge "Links should not be clickable in mobile page issue element" 2018-07-05 18:26:02 +00:00
jdlrobson a8ed9380ea Do not restrict images to 320px at tablet resolution
Instead max them to the threshold.
Note restricting them is a problem on pages
like en:Ulaanbaatar - in particular the panoramas
inside the "Urga and the Kyakhta trade" section

Change-Id: I28636c62d3545632d3b025b29d154136a81d8218
2018-07-05 18:05:07 +00:00
Stephen Niedzielski 56dabf0af3 Links should not be clickable in mobile page issue element
Bug: T198115
Change-Id: I18c393d5676084e0be3ba12fa267765593368615
2018-07-04 13:43:11 -05:00
Stephen Niedzielski 874d9c9e3b Hygiene: update JSDoc boxed and JQuery types
From TypeScript's do's and don'ts:[0]

  Don’t ever use the types Number, String, Boolean, or Object. These
  types refer to non-primitive boxed objects that are almost never used
  appropriately in JavaScript code.

Although Minerva only uses JSDocs at this time which seemingly doesn't
care about casing[1], we should endeavor to use the proper return types.

This patch lowercases typing to indicate primitive / boxed type as
appropriate.[2] As a special case, function types are uppercased for
compatibility with TypeScript type checking.

Also, JQuery types are of type "JQuery". The global JQuery object's
identifier is "jQuery". This patch uppercases J's where appropriate.

Lastly, replace unsupported type "Integer" with "number" and a comment.

[0] https://www.typescriptlang.org/docs/handbook/declaration-files/do-s-and-don-ts.html#general-types

[1] https://github.com/jsdoc3/jsdoc/issues/1046#issuecomment-126477791

[2] find resources tests -iname \*.js|
    xargs -rd\\n sed -ri '
      s%\{\s*(number|string|boolean|object|null|undefined)%{\L\1%gi;
      s%\{\s*function%{Function%g;
      s%\{\s*jquery%{JQuery%gi;
      s%\{\s*integer\s*\}%{number} An integer.%gi
    '

Change-Id: I6cbac15940e4501aee7ede8f421b77ffd027170d
2018-07-03 11:10:12 -05:00
Jan Drewniak c10c3f011e Increasing specificity of '.center' class
Bug: T193595
Change-Id: Id365952881118bc3587fe8a0c897892e61f41df1
2018-06-28 22:21:05 +02:00
jenkins-bot 6037e61bc9 Merge "Revert "Suppress display of wikitext editor on action=edit"" 2018-06-22 19:23:37 +00:00
Bartosz Dziewoński 645ffa46f8 Revert "Suppress display of wikitext editor on action=edit"
This reverts commit b8c0e4ff30.

Bug: T196915
Bug: T197834
Change-Id: I875854ab65f8b76929285938d2dbaa996caf3546
2018-06-22 19:11:13 +00:00
jenkins-bot f75590a85b Merge "Update: link icons for standard density displays and CSS" 2018-06-21 22:42:47 +00:00
Stephen Niedzielski 5d938aa9e8 Update: link icons for standard density displays and CSS
The previous lot of link icons look great on high DPI displays but not
as nice as they could on standard resolution displays. According to
Volker, this is because the SVG paths must appear on integer coordinates
and scale up instead of down. The new assets have been designed with
this consideration in mind.

Also, workaround redundant CSS by adding commenting out the "unvaried"
black SVG background-image selector, selectorWithoutVariant.

Bug: T190549
Bug: T197909
Change-Id: Id341d383018a436401541e82cc75d826688eaaae
2018-06-21 17:11:46 -05:00
jenkins-bot efa17f210d Merge "Localise "learn more" and warning icon to issues" 2018-06-20 15:52:42 +00:00
jdlrobson f943abd854 Localise "learn more" and warning icon to issues
This is currently showing up on sisterbox templates e.g.
the one on Category:Beekeeping

Bug: T197728
Change-Id: Idaf4aeb4a9efb668e5c06e19ce1eddace121e741
2018-06-20 08:37:00 -07:00
jenkins-bot d5cd6950b0 Merge "Suppress display of wikitext editor on action=edit" 2018-06-20 09:45:57 +00:00
jenkins-bot 041eaadcb5 Merge "Mobile page issues - visual styling changes" 2018-06-19 22:13:31 +00:00
jdlrobson a231525112 Mobile page issues - visual styling changes
Changes:
* Introduce Jan's beautifully documented $wgMinervaABSamplingRate
Set to 1 to A/B test 50% of the population
* Split out ambox template styles into a separate file referenced
by hacks.less
* Update cleanuptemplates setup script to consider two buckets

Test pages:
* Shqiponja_Partizane
* World_War_II_in_Albania
* Liberation_of_Tirana
* French_Consulate
* Abd_ar-Rahman_IV
* M109_howitzer
* Aimoin
* Transport_in_Brazil
* Transport_in_Cape_Verde

Bug: T191303
Change-Id: I8d11e655ccb847b7999e64dda57b225ad8b1c23a
2018-06-19 14:11:19 -07:00
jdlrobson 2e7e7d3259 Only render table of contents on pages with a table of contents
Bug: T193517
Change-Id: I0ed0255280f525d7726d2e09ceab15a76e2d6026
2018-06-19 18:18:03 +00:00
eranroz 8ca00225dd Fixing alignment of infoboxes for RTL/LTR
Explicitly set align to left on LTR wikis, and same for RTL wikis.
(tested in en wiki with ?uselang=he and he wiki with ?uselang=en)

Bug: T161399
Change-Id: Ic70acf2c56b52fe52eaac021581617342e3ae74f
2018-06-17 22:14:11 +03:00
Stephen Niedzielski 3485269be1 Update: add internal and revise external link icons
Bug: T190549
Change-Id: Iad7fdc2f2a730fa8874487c0d83355f21a0bf7ea
2018-06-15 12:31:42 -05:00
jenkins-bot df9551bf12 Merge "Allow editor access to the full page's wikitext" 2018-06-14 18:45:56 +00:00
David Lynch b8c0e4ff30 Suppress display of wikitext editor on action=edit
As I6c7e3443756fd72749964d1eda37e3d123b201b3 gives full-page editing on
action=edit, suppress the display of the original wikitext editor so there's
not a flash of a different editor before the overlay appears. Provide a
fallback so that in cases of no-JS the wikitext editor can still be reached.

Bug: T196915
Change-Id: I7dd3de984ead4d70e977e5607bb07606d341db54
2018-06-14 11:57:18 -05:00
Jan Drewniak 7617174d40 A/B test bucketing wrapper for page issues AB.
Provides a class that initiates AB-test bucketing and registers
as a MF module. Activates the reading depth test for users who are bucketed
in either buckets "A" or "B".

Does not add event-logging or visual style changes for page issues AB test.

Bug: T193584
Change-Id: If8504a35059c6d1b056cef063a595b1c2ffd351a
2018-06-13 15:43:08 -07:00
Stephen Niedzielski 0b043fbaa7 Fix: don't truncate the article title
Header overflow was truncated in MobileFrontend commit 1655d5233 which
added the language switcher button that appears below the title. This no
longer appears to be required even for articles with lengthy titles.
Perhaps because the language switcher button exceeds the page content
margin, it was thought to be necessary.

Bug: T194544
Change-Id: I4e25e7b03df65803cd553b412881eb565ded9b10
2018-06-13 13:51:44 -05:00
David Lynch 2d930cedbb Allow editor access to the full page's wikitext
Make a new route which uses `#/editor/all` to trigger loading the full page's
text in the editor, rather than defaulting to the first section. This isn't
exposed through the UI, but will be what's used when intercepting action=edit
links, which already loaded the full page's wikitext in the non- overlay
editor.

Bug: T196915
Change-Id: I6c7e3443756fd72749964d1eda37e3d123b201b3
2018-06-12 11:55:37 -05:00
jenkins-bot a0dfcf4e75 Merge "Add "center" layout rules based on mediawiki.skinning in core." 2018-06-06 12:33:55 +00:00
Jan Drewniak 81ef4caaa7 Add "center" layout rules based on mediawiki.skinning in core.
Bug: T193595
Change-Id: I2fa991c68786be95a82132ff720ed6e61074bc99
2018-06-06 11:46:40 +00:00
jenkins-bot 92a6e01791 Merge "Provide gender parameter" 2018-06-06 08:22:36 +00:00
Piotr Miazga 52e8e93020 Provide gender parameter
Bug: T194868
Change-Id: I20fb6aee13c6bf7bc66bf3cae9560548a336e04d
2018-06-05 16:40:11 +02:00
David Lynch e91295a5ea Fix action!=edit opening the editor
Bug: T196150
Change-Id: I5bd4b5ce231f5269676d0706e6762f33f6faa344
2018-06-04 10:20:22 -05:00
Baha ee9ec00234 Don't turn off listening to reference clicks
For event logging purposes we need to be able to listen to reference and
backlink clicks. Clicks on these elements were disabled before this patch.

Although clicking on backlinks was disabled, it wasn't working properly
as the user could click on those links and be taken to the reference.
Thus this piece of code has been removed.

Bug: T191086
Change-Id: Idbaa39523a35f3b649f521be05c83255aa2b1396
2018-05-31 20:10:31 +00:00
jenkins-bot e08d4a4af4 Merge "Edit infobox style to properly position captions" 2018-05-30 09:54:26 +00:00
Timo Tijhof 64134bd8a6 Remove minerva.less from global import path
Use local imports instead given all relevant files are within the
same repository, and don't vary by configuraion.

Bug: T140807
Depends-On: If3edac9a35b346af0320c12f70c0d978a6346201
Change-Id: Ife3cc345a63aff452e93accbe0a593fbaa358732
2018-05-29 12:19:00 +00:00
Jan Drewniak 03a7b57a20 Edit infobox style to properly position captions
Bug: T193881
Change-Id: Ie20dafc0fbf02d654cd9ac137f51ef1436ca97f1
2018-05-24 14:19:58 +02:00
David Lynch ea0ef071a2 Intercept desktop editor links
Make ?veaction=edit/editsource and ?action=edit trigger the appropriate mobile
editing mode.

Bug: T185729
Change-Id: I2275b011d2b3c03462e3c1711d3135ce672596e8
2018-05-20 12:41:21 +02:00
jdlrobson f7e8df65b2 Merge profile icon with user-avatar icon
Both are the same but different variants - so use the variants
ResourceLoader module to keep this modules consistent in color
and form.

Change-Id: Ib75e1ff741fa46ad9698e89c4433b6edbad4d376
2018-05-08 23:35:44 +00:00
David Barratt f51cf7db7b
Use a Drawer for Block Notices
When a user is blocked, the toast message provides insufficent information to
the user. To provide more information, as well as a better design, the block
message will be moved into a drawer.

Bug: T165535
Change-Id: Ib025db3a8a4d1fd7bd05b69f9b5326943288372f
Depends-On: I926918d0bd7f2176f188a2154dc5e99f6a8a7ad1
2018-05-08 13:20:00 -04:00
jdlrobson ddc1e2a30d Content area needs a z-index
The content area is the sibling of the overlay.
For the overlay to overlay it and its children it
must explicitly setting a z-index

additional changes:
* Move UI styles from skins.minerva.mainMenu.styles
to their more logical place (note skins.minerva.mainMenu.styles
is loaded via JavaScript unncessarily)

Bug: T193444
Depends-On: I7c0d02f073a2fe165a6027e3c6d1455e22c1b563
Change-Id: I8be31c7daf254e22ccaed81704cbcd2b638c54f6
2018-05-03 18:01:51 +00:00
jenkins-bot a44370b2b0 Merge "Regression: Avoid reflows on lazy image placeholders" 2018-04-30 18:13:17 +00:00
jdlrobson e7e1aa8229 Regression: Avoid reflows on lazy image placeholders
Now we are applying width: 100% to all placeholders we are causing
significant reflows for the entire page.

Restrict altering the height on only real images which can be distorted
by dimensional changes

Bug: T191893
Change-Id: I982d928273dc3b6f30974f2401760d5d44ce4b82
2018-04-30 10:53:03 -07:00
Jan Drewniak 0374ef64a0 Display content beside infobox instead of below.
Removing CSS rules that that push content below infoboxes.

Bug: T189688
Change-Id: I59736720b36f251c49a27a2dd7f5343d58629992
2018-04-30 17:33:08 +00:00
jenkins-bot 10c672acba Merge "Removing aqua-colored tap highlight color for links on android" 2018-04-30 16:46:11 +00:00
jenkins-bot deef073013 Merge "Change strategy for undoing '.content table' overrides" 2018-04-27 18:53:59 +00:00
Timo Tijhof 1fd6ce6db2 Change strategy for undoing '.content table' overrides
This is effectively a no-op for Minerva itself, but
automatically fixes a bunch of bugs, such as the
lack of centerring on WikiHiero elements.

Bug: T184221
Change-Id: I0af4df2391be1fab3c93fcbfea6624074fc96414
2018-04-27 18:40:14 +00:00
Jan Drewniak 65bd3bfbea Removing aqua-colored tap highlight color for links on android
Bug: T189627
Change-Id: I303b007dd1885115bbc85ff4edad7a812a721a26
2018-04-26 15:58:54 +02:00
jenkins-bot db26e58e1e Merge "Remove unused CSS code" 2018-04-25 22:43:07 +00:00
jdlrobson 026b1ff305 Remove unused CSS code
Remove:
* no-edit-js
* .content_block

Document existence of Parsoid selector
* mw-ref

Change-Id: I0cb695dd437f9e070d57adf60170788dd2047137
2018-04-25 15:16:05 -07:00
jdlrobson b7e1ef4468 Restrict lazy thumbnail placeholder width
Follow up to Ibbba75fcb978b3b049f4cb100f39146d39ebf6af
Bug: T191893

Change-Id: I62a11322ea236498cec464735e741aea173b4c63
2018-04-24 15:34:24 -07:00
jdlrobson a03f159e55 Size restrict images inside noscript tags
Bug: T191893
Change-Id: Ibbba75fcb978b3b049f4cb100f39146d39ebf6af
2018-04-23 13:42:31 -07:00