Commit Graph

462 Commits

Author SHA1 Message Date
jdlrobson 44ed0f5e69 Talk tab select should sit on top of page actions
Per design review with Alex.

Bug: T212216
Change-Id: Id4e1f5167c50a8d75a0682c4e8ed219c36b93be3
2019-02-13 11:42:15 -08:00
jenkins-bot a2173b0061 Merge "Remove backwards compatible CSS" 2019-02-13 05:36:17 +00:00
jdlrobson 577b72a14d Remove backwards compatible CSS
This is no longer needed when Varnish cache has cleared (About a
week from I7e989a3d4553eb3357598a5cad3ccebf51dc9fae being deployed

Bug: T212216
Change-Id: I1afb68f68cc90d89c442907426bd046ddc68f488
2019-02-12 17:40:49 -08:00
Stephen Niedzielski 7d4ca12a2e Hygiene: remove unused page issues function
Remove getAllIssuesSections(). This is no longer in use and does not
appear to be sufficiently general purpose to want to maintain.

Bug: T212371
Change-Id: I7ed73408705cba64b26dd318e78ae415b707e687
2019-02-13 01:34:32 +00:00
Stephen Niedzielski f54b4e75db Hygiene: move variable from file to local scope
Move allIssues from file scope to local scope.

Bug: T212371
Change-Id: I74693925ff0b20a36ec6acd53490cfde7273c984
2019-02-13 01:33:04 +00:00
Stephen Niedzielski 8ee27ed610 Hygiene: favor page issues all sections symbol
In pageIssues.js:

- Consistently use the KEYWORD_ALL_SECTIONS symbol instead of hardcoding
  the string, "all".

- Improve typing for allIssues.

- Wrap a long line.

Bug: T212371
Change-Id: I429fe37f88311c787e91946bb1438c6961eeeb5b
2019-02-13 01:32:29 +00:00
Stephen Niedzielski 3dc9cff2c2 Hygiene: separate page issue view logic
- Move page issue view components that do not modify the DOM during
  during construction to PageIssueLearnMoreLink.js and PageIssueLink.js.
  PascalCase is used optimistically for filenaming in the hopes that
  these functions can become something like a JSX component. A "new"
  function prefix is used in the meantime.

- Move page issue view logic that munges the existing DOM to
  pageIssueFormatter.js. Substitute "create" prefixes for insert so that
  clients won't forget that calling the function is a modify operation.
  Alternative naming welcome but it shouldn't be confused with more
  idealistic components that do not depend on DOM state for
  construction.

- Consolidate createPageIssueBanner() and
  createPageIssueBannerMultiple() into insertPageIssueBanner() as the
  code was quite similar and were it a true component, it would probably
  be a single component.

All new files appear under page/ to keep their distinction from the
overlay code clear.

Some view logic remains in pageIssues.js but it shall be difficult to
isolate.

Bug: T212376
Change-Id: Iccce709c34fa8de5a28a5a00098add5775e3dc9a
2019-02-13 00:42:56 +00:00
jdlrobson 7e423c07b7 Talk tabs in AMC mode
A new feature/skin option is added that is enabled safely inside
a MobileFrontend available/unavailable hook that changes the skin
to place talk tabs at the top of the page.

These new talk tabs purposely show on the main page, user page
and standard pages and do not show on special pages.


Depends-On: Ie1a583657176acc6f7046c569c2e94fa2f72ff93
Bug: T212216
Change-Id: I57b70cd325666a287678dc897159b5bf9d089b78
2019-02-13 00:02:35 +00:00
Stephen Niedzielski c561fbc794 Hygiene: update categoryOverlay to use factory API
- Revise M.require( 'mobile.categories.overlays/CategoryOverlay' ) to
  'mobile.categories.overlays/categoryOverlay' (lowercase c).

- The category overlay is a factory function not a class. Replace new
  operator with function invocation. This only looked strange and didn't
  break anything since the new operator uses the returned value if
  specified, not `this`, which was the result of the factory function
  and the OverlayManager understands both Overlays and functions that
  return Overlays.

Bug: T208915
Change-Id: Ife098ee5ed1a8a164a4e31013a490076658f4147
2019-02-11 22:49:59 +00:00
jenkins-bot 985311dddd Merge "Make section edit icons display:block, predictable height" 2019-02-11 22:42:21 +00:00
Ed Sanders 023364caa1 Make section edit icons display:block, predictable height
Previously they had an extra few pixels caused by line-height.
This makes some heading levels slightly shorter, but heading
heights more predictable.

Change-Id: I25cb1f39ab6c80bf9f318de18339e716156c9a2b
2019-02-11 23:19:56 +01:00
Stephen Niedzielski 198688fe5f Hygiene: update talkOverlay to use factory API
- Revise M.require( 'mobile.talk.overlays/TalkOverlay' ) to
  'mobile.talk.overlays/talkOverlay' (lowercase t).

- The category overlay is a factory function not a class. Replace new
  operator with function invocation. This only looked strange and didn't
  break anything since the new operator uses the returned value if
  specified, not `this`, which was the result of the factory function
  and the OverlayManager understands both Overlays and functions that
  return Overlays.

Bug: T208915
Change-Id: I496f78c24c485d88b046bac6889c7ff09267b250
2019-02-11 15:11:06 -07:00
jenkins-bot 718527e061 Merge "Switch to outside list style for ordered lists too" 2019-02-11 20:13:26 +00:00
jenkins-bot e668cd36d7 Merge "Revert "Hygiene: Track minerva errors count only once"" 2019-02-11 18:27:52 +00:00
Jdlrobson 29bfece958 Revert "Hygiene: Track minerva errors count only once"
We talked about this in standup today and given Sam's comment
in T212970#4943448 and a potential loss of data, we've considered
this a little risky and would like to revert and discuss this.

We can reapply the patch later if necessary.

This reverts commit a486bde329.

Bug: T212970
Change-Id: I0aad3937dde92bf7a46df8c1cf892bf5ce257e17
2019-02-11 18:11:16 +00:00
jenkins-bot e79e2202b9 Merge "Apply <sup> styling to Parsoid refs as well" 2019-02-09 19:23:55 +00:00
Ed Sanders cc727b9c11 Apply <sup> styling to Parsoid refs as well
Currently they are 0.8em, instead of 0.75em.

Change-Id: Ieb91c1251839ff4bb54451aae69af9fb88322219
2019-02-09 14:10:52 +00:00
jenkins-bot 6b22dc3906 Merge "Change z-index of page-issues read-more link" 2019-02-08 23:10:28 +00:00
Stephen Niedzielski 66c44402d7 Hygiene: replace OO.mfExtend with mobile.mfExtend
Use the mobile.startup module mfExtend export directly instead of
OO. This will allow MobileFrontend to reduce its exposed API.

Bug: T208915
Depends-On: Idededf132f724176c38c5e0a7c9327f00489a09d
Change-Id: Id582325c830c229240b88cf4e151afea48fea750
2019-02-08 21:42:03 +00:00
Stephen Niedzielski 28b0aa441d Hygiene: rename mobile.startup variable in search
Rename `client` to `mobile` in search.js. This was the only deviation in
naming when persisting `M.require( 'mobile.startup' )`.

Bug: T208915
Change-Id: I46f8a7a560cbb78fdec970cc0d2eff32238bf59e
2019-02-08 13:52:54 -07:00
jenkins-bot 578eb28966 Merge "Hygiene: move PageGateway import to top" 2019-02-08 20:09:53 +00:00
Stephen Niedzielski 9cf8da6514 Hygiene: move PageGateway import to top
Move synchronous import to the top of the file next to other
mobile.startup imports to make it easier to find.

Bug: T215648
Depends-On: I6393e4403034cce51c01003bdf5bcaf3b76ae9f1
Change-Id: Icf52160b84f05a4ac3e069112460cf0bc97a0b4b
2019-02-08 11:59:16 -08:00
jenkins-bot cbd624d6ab Merge "page actions is no longer position absolute" 2019-02-08 19:22:42 +00:00
jenkins-bot 4bf79bd6df Merge "Merge skins.minerva.scripts.top and skins.minerva.mainMenu into scripts" 2019-02-08 19:10:03 +00:00
Bartosz Dziewoński abf223da58 Switch to outside list style for ordered lists too
See design rationale on T150377.

Furthermore, 'inside' lists cause rendering issues inside VisualEditor
(tested with Chrome 71 and Firefox 65 on desktop), as seen on T208102.

Bug: T150377
Bug: T208102
Change-Id: Ia8e47ab98226a78cb5a3a4ef5f09d729ea3c8791
2019-02-08 18:40:19 +01:00
jenkins-bot 2496a33fa8 Merge "Hygiene: Track minerva errors count only once" 2019-02-08 15:57:39 +00:00
jdlrobson b356c7f134 Merge skins.minerva.scripts.top and skins.minerva.mainMenu into scripts
These modules can safely be merged.

Since skins.minerva.scripts.top is added via addModules to the HTML it must
be marked as deprecated and remain temporarily as a redirection to skins.minerva.scripts

All modules have been renamed to be in there new home - no deprecation notices are needed
as they are not used outside Minerva.

I leave skins.minerva.mainMenu.styles as it is used by Special:MobileMenu
and needs to continue to do so.

Change-Id: Ie919151630f4389f8e84e808bec003a6d3d07bd9
2019-02-07 18:10:15 -08:00
Jan Drewniak 73885e01c2 Change z-index of page-issues read-more link
Changes z-index from 1 to 0 on page-issues link to avoid showing
white background when navigation menu slides over.

Also changing z-index value on SpecialNotificationsOverlay.less
from the hard-coded value of 2 to @z-indexOverOverlay
(which is set to 2).

Bug: T214550
Change-Id: If033755115f2a266869fb87c4314798c422d88ed
2019-02-07 19:37:02 -05:00
Piotr Miazga a486bde329 Hygiene: Track minerva errors count only once
To minimize the traffic sent to the stats endpoint we should
track errors only once after request is done, not on every
error occurence.

Bug: T212970
Change-Id: I64f101159aa1f2179e612effa850851fffcf39c6
2019-02-07 23:46:14 +00:00
Stephen Niedzielski 5593b23aa8 Hygiene: replace mobile.startup/paths with props
Replace all occurrences of `M.require( 'mobile.startup/pathToModule' )`
with `M.require( 'mobile.startup' ).pathToModule`. Where multiple
requires existed, add an intermediate variable,
`var mobile = M.require( 'mobile.startup' )`, and dot off that.

This changes improves the consistency of MinervaNeue which currently
contains a mix of require styles and eliminates any deprecated requires.

Bug: T208915
Change-Id: If14f280672d914d07275197100b12421bb217b67
2019-02-07 14:55:04 -07:00
jdlrobson 95b139d756 page actions is no longer position absolute
This was causing lots of problems with the AMC design and seems
unnecessary. It dates back to tablet support added in
I14c8182473c9508ffc38a8d5baf114bcb016a35f in 2014. This no longer
appears to be needed for tablet.

Changing the HTML means we need to be careful about Varnish cached
HTML with new styles. To avoid UI regressions we use a new temporary
class heading-holding--new which will be removed as soon as possible.
The no-page-actions modifier is no longer needed given the new heading
holder doesn't care what's inside it.

Bug: T212216
Change-Id: I7e989a3d4553eb3357598a5cad3ccebf51dc9fae
2019-02-07 12:16:14 -08:00
jdlrobson de023e3b49 Not all amboxes are tables
Per https://www.mediawiki.org/wiki/Topic:Usyourmpyvolsjrw
we should not restrict amboxes to table elements. This is not
necessary and breaks certain projects.

Change-Id: Ice6d05506a9ef1450299e9804aae59493033c136
2019-02-06 00:25:02 +00:00
Stephen Niedzielski 0dfdbadb4b Hygiene: migrate View.events to constructor prop
Migrate View.events to constructor property. MobileFrontend supports
both the deprecated View.prototype.events and recently passing events as
an argument at construction (see dependent patch).

As a client, Minerva doesn't provide nearly so many extensible classes
as MobileFrontend. The classes changed in this patch are no different so
events are not expected to be extended.

Bug: T208915
Depends-On: Ic193e97b4cd6f72d226bd9768e904bdec168ba39
Change-Id: I68923e2dfd4b2f3e3f3de5185e9b65ab0b665ab7
2019-02-05 22:03:37 +00:00
Ed Sanders 3cefa5b144 build: Update eslint-config-wikimedia to 0.10.1
Change-Id: Ifc410d35c8e5bb2915ea2c1e8e51bc7db09f5172
2019-02-02 11:14:39 -08:00
jdlrobson d305a29db8 Do not capitalize wikidata descriptions
Many languages have no concept of capitalisation so messing with
user input is problematic. Trust editors to do the right thing and
if not, fix it on wiki.

Bug: T131013
Change-Id: Iebdb7b78fdaa31a6daf8f52077c079672ef4ff5a
2019-01-25 22:47:27 +00:00
jenkins-bot 74a37b0412 Merge "Hygiene: revise lazyImageLoader.loadImages() API" 2019-01-25 20:52:49 +00:00
Stephen Niedzielski 0ce4fa8a66 Hygiene: revise lazyImageLoader.loadImages() API
There is no longer a need to pass in a jQuery dependency.

Don't use the stateful skin to query image placeholders. Use the lazy
image loader instead.

Depends-On: I3d023b3d96bf278666abb956142e5cee12b68b1f
Bug: T214658
Change-Id: I2bf42366c0e27462c32162124d07761b91d66166
2019-01-25 10:50:09 -07:00
Ed Sanders 63ead8075d build: Update eslint-config-wikimedia to 0.10.0
* Add inline exceptions for global selectors
* Exception for $.animate in scrolling code
* Fix $ prefixing in search.js
* Fix repeated selectors in search.js & toc.js
* Disable no-parse-html-literal in tests

Change-Id: Id58fe11d1e09714501a378e4ca7ed9588f02f32d
2019-01-24 17:59:40 +00:00
Ed Sanders 6c53e320bf eslint: Remove exception for computed-property-spacing
Change-Id: Ief22145c02379bdb3d37c96c5e1ef50f0ab519cf
2019-01-24 17:58:36 +00:00
Ed Sanders dc5077dbae build: Update devDependencies
eslint-config-wikimedia   0.8.1  →   0.9.0
 grunt-contrib-watch       1.0.0  →   1.1.0
 grunt-stylelint          0.10.0  →  0.10.1

Change-Id: I3c8ad96f006ab4501e30d0884ae620b30f23fca8
2019-01-24 17:58:36 +00:00
Jan Drewniak 6627078c08 Remove a `.content-header` CSS selector.
A `.content-header` is often placed inside a `.content` div,
so this selector causes a 90% width on a container element as well as
it's child element, which is probably undesirable.

Bug: T210745
Change-Id: Ib559db66a513537127ad543cb54a119af8ebf8df
2019-01-23 22:44:56 +01:00
jdlrobson 4d734942c5 Remove large bottom margin at top of main page
Main pages do not have page actions, yet the header always adds
bottom padding to compensate for the fact that page actions are
absolutely positioned.

a new class is added adopting BEM notation that informs the client
that no page actions are going to be visible. In conjuction to this
we strip the relevant HTML from the DOM.

Bug: T212216
Change-Id: Ib69991e91160ba7e2ca3beca4475c2a06c4b9cd3
2019-01-23 12:10:06 -07:00
jenkins-bot 33736e3ead Merge "Reduce unnecessary selector specificity" 2019-01-19 04:38:54 +00:00
Volker E 994edd76e0 Reduce unnecessary selector specificity
Bug: T214218
Change-Id: If0afb83d7f5f9b288427aaf09951348ed94cd74e
2019-01-18 17:23:48 -08:00
jenkins-bot ffb97f5c9f Merge "Hygiene: Merge skins.minerva.base.reset into skins.minerva.base.styles" 2019-01-18 17:13:52 +00:00
jenkins-bot a816f81278 Merge "skins.minerva.tablet.styles can be merged" 2019-01-18 17:13:51 +00:00
jenkins-bot 63796763b0 Merge "Prevent black background from appearing on menu after clicking reference" 2019-01-17 23:33:31 +00:00
Jan Drewniak 5c638304e2 Prevent black background from appearing on menu after clicking reference
Bug: T211691
Change-Id: Ibaf027c401f12022c21be7f7f959a1389f2bd153
2019-01-18 00:16:11 +01:00
Stephen Niedzielski d1a20753fa Hygiene: revise lazy image loading API
Update the API usage for lazily loaded images. This is still clumsy and
may be further revised in future patches.

Bug: T211724
Depends-On: Ic73f78825eaab561e8ed694aa6cc102ccb471f95
Change-Id: Ia708cda688e6bdb12074d85d98f7e98fdf7b0ca8
2019-01-17 20:45:23 +00:00
jdlrobson 24b1e7d54d Hygiene: Merge skins.minerva.base.reset into skins.minerva.base.styles
No need for 2 modules that are both loaded on every page load
Provided consumers are loading skins.minerva.base.styles they will
continue to get the same CSS. If any consumers exist that load
skins.minerva.base.reset but not skins.minerva.base.styles they will
need to use their own css reset file
(e.g. https://meyerweb.com/eric/tools/css/reset/)

Change-Id: I599e6d5a84b311cb3bb2da197da1b688e0e6b9d4
2019-01-15 12:30:32 -08:00