Commit graph

825 commits

Author SHA1 Message Date
Bartosz Dziewoński a1e75213da Fix posting talk page replies on pages with subsections
The MobileFrontend section numbers that were used here only count
top-level sections, but this value was passed to code in
MobileFrontend's TalkSectionOverlay#onSaveClick, which uses an API
expecting the standard MediaWiki section numbers.

Extract the section number from the section edit link, like we do
in mobile.init/editor.js in MobileFrontend.

Also, disable the special talk page view unless we're viewing the
latest revision of the page. That could also lead to posting in the
wrong section, as sections are often added and removed, which changes
the numbers.

Bug: T252828
Change-Id: I553a508658804dd8672f2268b7118f77458a9dba
2020-05-14 22:57:00 +02:00
jenkins-bot 47fb85da1d Merge "Replacing instances of toast.show() with mw.notify()" 2020-05-13 14:37:50 +00:00
Sohom Datta 312b52cfb5 Replacing instances of toast.show() with mw.notify()
Replacing toast.show() with mw.notify() as per change 594766

Bug: T212542
Change-Id: Ibb2bb28a8898979754a924305e67e23bc019f663
2020-05-13 16:59:07 +05:30
Volker E b26f62b2fa Change opacity (color) of logo to a subtler gray close to #54595d
Use a variable to rely on opacity value close to `#54595d` similar
to icons in the header.

Bug: T251135
Change-Id: Ie3eaad9ac86f8c3827e0a41f0b73b694d8f8f2fc
2020-05-12 22:09:59 -07:00
Jan Drewniak 1a838f2004 Fix for 27eb9e - "Changing color of logo from black to gray"
Use a variable consistent with Wikimedia UI base instead of
a hard-coded opacity value.

Bug: T251135
Change-Id: I883d3b122c3a0206fe83365a7818929d74f86459
2020-05-04 21:08:25 +00:00
jenkins-bot 5bd8c646c9 Merge "Revert "Changing color of logo from black to gray using opacity."" 2020-05-04 18:14:51 +00:00
Jdlrobson d65ac4b5bb Revert "Changing color of logo from black to gray using opacity."
This reverts commit 27eb9e1666 to simplify the SWAT of
https://gerrit.wikimedia.org/r/594254

Change-Id: Iccb2e32c3b46e5014849a9a397e062203631342d
2020-05-04 17:58:30 +00:00
Volker E c9461c9dd8 Replace skins.minerva.mainMenu.advanced.icons with OOUI icons
Additional changes:
* Address a fixme relating to the overflow icon and move some AMC styles
out of the critical path for non-AMC pages

Note about ellipsis:
The class mf-mw-ui-icon-rotate-clockwise cannot be used as it's part of
MobileFrontend and loaded via JS. Minerva must work without MobileFrontend
and this rotation is needed without JS.

Bug: T244444
Change-Id: Ifd02c50305cf036dd6df640d778678668507e5eb
2020-05-01 12:18:35 -07:00
Jan Drewniak 27eb9e1666 Changing color of logo from black to gray using opacity.
Bug: T251135
Change-Id: I332e36149f71976008f1c020ff79db4adb96b9b8
2020-04-30 19:29:24 +02:00
Jan Drewniak 5144e73313 Remove "last-modified-bar__text" as a JS selector
When enchancing the watchlist items with the "time ago"
feature, the "last-modified-bar__text" class is added
to the element, which could have unexpected consequences.

That class is removed from the watchlist and instead
of using it as a JS selector, the `modified-enhancement`
class is used for both the watchlist and last-modified
bar.

Change-Id: I4a157adf51b9ed45bcba977f4f6622c7991471ba
2020-04-30 16:17:23 +02:00
Volker E c1a2462298 Remove unused user icons
They have been introduced in I0ef9c4cf3ea6 but have since been replaced
by OOUI modules. Time to say goodbye.

Change-Id: Id36e60780287f27fa5a99c6b10b1ac61647f3b93
2020-04-28 21:41:37 -07:00
jenkins-bot 8cb8a3cd3a Merge "Reduce last-modified-bar nesting and add mw-footer class" 2020-04-28 16:17:28 +00:00
Volker E b88cc09284 Clarify comment on Desktop MinervaNeue
Change-Id: Ibba6ea33f6338688dc3239d1da4b8c8d973f3c9b
2020-04-27 12:15:19 -07:00
Volker E 447a83415c Reduce last-modified-bar nesting and add mw-footer class
Reducing (currently) unnecessary `last-modified-bar` context nesting,
which isn't done consistently across stylesheet files.
Additionally adding new `mw-footer` class, but not yet using it
exclusively due to caching.

Change-Id: I6b9caa42c1907ec1a7f8c8b67334fb7f08705848
2020-04-27 12:02:47 -07:00
Volker E 18ab61d4fe Use .text-overflow() mixin from 'mediawiki.mixins'
Removing MinervaNeue's own mixin now that it's possible.
Also unify code instances to use new mixin.

Depends-On: Ia8d6e7229b49598b0f4cb19dff463ffe2f11a43d
Change-Id: Iaffcefcb7a239d5ddecbe17097573d06099de88e
2020-04-21 11:49:30 -07:00
jdlrobson 2e32f41fd3 Drop skins.minerva.icons.image module now cache has cleared
Bug: T244444
Change-Id: I181d41f60481efa904d5e951cf08480bbae82015
2020-04-10 17:36:46 +00:00
jdlrobson 276ae636fe Use standardized icon classes and fix some missing icons
The icon pack wikimedia.ui was strangely using a non-standard
icon class using empty strings as a way to disable the default behaviour
of setIcon. Instead of fighting APIs - use the methods available.

The icon pack is also renamed to reflect what it's actually used for -
providing icons for overflow menus and it is no longer loaded as a dependency
by skins.minerva.scripts

Fixes issues with:
* History icon with AMC disabled and user is logged in
* Table of contents icon
* Language icon when it appears in overflow menu on user pages
when logged in where AMC is disabled
* listBullet appears in 2 modules as it is used in 2 places - the AMC
overflow menu (log icon on user overflow menu) and for table of contents
(JS only)

Bug: T232383
Change-Id: I05220ffa56195be6a594e3a8a57ae16858088444
2020-04-02 01:37:33 +00:00
Volker E 98d3225fc8 Rename several icons to WikimediaUI naming
Renaming to WikimediaUI standard naming and adding to module
skins.minerva.icons.wikimedia which is loaded via addModuleStyles
 'edit' → 'editLock'
 'edit-enabled' → 'edit'
 'toc' → 'listBullet' (already included in wikimedia.ui module)
 'mainmenu' → 'menu'
 'language-switcher' → 'language'
 'clock' → 'history'

Icon `page-actions-overflow` which is only needed on AMC is moved out of the stable icon
pack and added to skins.minerva.mainMenu.advanced.icons temporarily which is loaded on AMC pages only:
 'page-actions-overflow'

Additional changes:
* Renaming 'clockIconClass' to 'historyIconClass' to stay on name.
* Module `skins.minerva.icons.images` is deprecated and shipped for old
HTML markup. It will be removed in 2 weeks.

Bug: T232383
Change-Id: Ia3bafc74a85293c2414c0ef4ccf3bb20c75135d1
2020-03-31 11:48:57 -07:00
jenkins-bot 8a85cd2ae6 Merge "Remove unused 'talk' icon" 2020-03-28 23:28:46 +00:00
Volker E 0f5f376b64 Remove unused 'talk' icon
Bug: T244444
Change-Id: I42f60785c4693da7542a61e0ad415850175cb0f5
2020-03-27 18:06:37 -07:00
jenkins-bot 7a4fe1afcc Merge "Use 'download' icon from OOUI" 2020-03-28 00:17:03 +00:00
Volker E cc05fb9aca Use 'download' icon from OOUI
Bug: T244444
Change-Id: Ic65303b42c7b37c4017b98897139273f15ee1598
2020-03-27 17:01:51 -07:00
jenkins-bot bd5167a616 Merge "Remove obsolete fallback CSS classes" 2020-03-27 03:04:01 +00:00
Volker E 28361446f9 Remove obsolete fallback CSS classes
Introduced in I0f929f2f3b11362

Bug: T244444
Change-Id: I7e45adf0549c35aaa0c8390329e20d205126f616
2020-03-26 17:52:58 -07:00
jdlrobson e56302a3f6 Break title on watchlist and scope non-hyphenated links
Non-hyphenated links according to T230860 were added for
infoboxes but the default is no hyphens so these no
longer should be needed. It was likely working around
a recently removed bit of CSS in MediaWiki:Minerva.css
(See T248415)

The new selector is needed for Special:Contributions

Bug: T237230
Change-Id: I500ca1a6182f505ceb31441c49e4dcacd597a5d3
2020-03-27 00:30:54 +00:00
jenkins-bot 494935f617 Merge "Always enable stylelint rules after disable" 2020-03-11 23:32:22 +00:00
Umherirrender 53fab7c03d Always enable stylelint rules after disable
Change-Id: I3c677fb6e3ff9666e8e50f3a2ad9cd9ac57c29b8
2020-03-11 15:50:14 -07:00
Volker E 8d463a80b3 build: Add 'sortAttrs' convention rule to 'svgo' & re-run
Following SVG optimization & coding conventions.

Change-Id: I0ab8c59a42cfbc4d7c8d600a9eee155c0cb37fa8
2020-03-07 20:09:42 -08:00
jdlrobson 1200cb5279 Storybook added to MinervaNeue
For now just adding story entries for footer element and last modified.

Bug: T244106
Change-Id: Ib36f22f9b9d805f87fc074d12473497cfaf91b79
2020-03-03 15:22:34 +00:00
jdlrobson fb36687fc3 setAttribute takes a string not an array
Since we are dealing with arrays here with the value of classes
but using native DOMElement we need to convert the array to a string

Follow up to  I331912a1cd6cd4293c22a1a48bb32cdec48bd37d

Change-Id: If08d68af8cebecaea02cc29bf779d25d58c0c6c3
2020-03-02 12:05:42 -08:00
jdlrobson 6b6c6b8d6e Menu items added via addPortletLinks should look like other menu items
Requires `I4c477c88ce48484960e40609cd243e63639175bc` to function.

Bug: T236711
Change-Id: I331912a1cd6cd4293c22a1a48bb32cdec48bd37d
2020-02-29 00:11:28 +00:00
Volker E c2bed81acd Remove unused 'warning' icon
Has been introduced in I8d11e655cc and after removal of
cleanuptemplates.js left behind.

Bug: T244444
Change-Id: I47ba73bc528241d98e8f593dcaec3948273fc819
2020-02-25 11:29:40 -08:00
jenkins-bot 30fac0ca85 Merge "Do not allow raw HTML in talk page overlay header" 2020-02-18 23:48:37 +00:00
jenkins-bot 27642e94e7 Merge "Fix Minerva print mode to correctly show top of document" 2020-02-18 18:06:43 +00:00
jdlrobson b3b50ce854 Fix Minerva print mode to correctly show top of document
When we built the new main menu we started using a `nav` element.
Update selectors to hide the `nav` element when printing from
mobile.

When printing from tablet or desktop make sure the header is displayed.

Bug: T244181
Change-Id: I7f60fd11d969a48e1c7926ad8acc4213f9affed4
2020-02-18 17:50:30 +00:00
Volker E d9306ee74d Unify SVGO rules to Wikimedia coding conventions and re-crush SVGs
Remove disabling 'collapseGroups' and 'mergePaths' rules, as they have been
successfully been part of wide SVG optimizations in various different products
and are part of the exemplified safe configuration of Wikimedia SVG coding
convention.
Bring standard 'editLocked' icon with correct size to MN.

Bug: T245296
Change-Id: I385e176a647a799176a6f59e364d165387137224
2020-02-18 00:41:06 +00:00
jdlrobson 7f47dff5e5 Use icons in skins.minerva.mainMenu.icons from OOUI
For all mainMenu icons pull from OOUI icon packs.

We make the necessary changes to Definitions.php, ToolbarBuilder
and LogoutMenuEntry to ensure to update icon glyph names.

There are caching implications for icons that show to anonymous users -
these have been fixed for grade A browsers running JS by appending the
new class to impacted elements.

Grade C browsers being served cached HTML will not benefit from this
emporary fix as available solutions are costly.
As a result these users will not see icons until the cache
expires (maximum of 4 weeks but likely 1 week) or is flushed via
action=purge.

This is acceptable given the amount of impacted users and the fact that
icons are not essential for using the main menu.

Note: The communityportal.svg icon while in the resources folder was
not referenced anywhere in the codebase so its removal is safe.
Please note the same icon in skins.minerva.mainMenu.advanced.icons which
is used for the community portal menu item.

Bug: T244444
Change-Id: I0f929f2f3b11362e02f0d02f57b90b34b5c93d24
2020-02-17 20:36:28 +00:00
jdlrobson 1213eb6ab3 Do not allow raw HTML in talk page overlay header
Bug: T243650
Change-Id: Icb844fb6476d07e7fc0e470d469f2ec3220066f4
2020-02-17 11:19:45 -08:00
Volker E 79bb67027c Unify XML declaration in SVG files
Unifying XML declaration for markup parity and to align to SVG coding
conventions.
Also manually optimizing several others.

Change-Id: I5dc71dc3cea6dde054d3e60ca3337e20ed661568
2020-02-12 13:23:25 -08:00
Volker E ecf404db7f Drop the abandoned, replaced 'KSS' styleguide
KSS is no longer in use anywhere. The only official style guide is
at https://design.wikimedia.org/style-guide.

Depends-On: I688a78e9a71a082c499af55bd01e8fd615130486
Change-Id: I21663c7b48465b0f23f1b40520e8cee9be71c4bc
2020-02-11 14:26:19 -08:00
Volker E 871cee64ae Update '.svgo.yml' with pretty print rule and re-crush all icons
Align with Wikimedia Foundation SVG coding convention.

Bug: T179361
Bug: T244439
Change-Id: Ief272a4fc7a35ee2044046f262aec2ec454683d1
2020-02-11 13:53:36 -08:00
jenkins-bot 90f245c5d3 Merge "Remove eslint "valid-jsdoc" rules/fix linting errors" 2020-02-10 05:48:44 +00:00
jenkins-bot 84e1a223d1 Merge "Use user sandbox icon from OOUI" 2020-02-07 23:44:24 +00:00
Nicholas Ray 17a3c4bee0 Remove eslint "valid-jsdoc" rules/fix linting errors
Our eslintrc file extends "wikimedia/client" which already includes all
of the previously listed jsdoc rules [1]. Therefore, we were clobbering
this much more thorough list.

This commit removes this clobbering and enables a much more extensive
list of jsdoc rules. Additionally, downloadPageActions was made to
conform to the rules.

[1] 07320f16ae/common.json (L99-L137)

Bug: T239269
Change-Id: I19c09054ba0bf2746ac78befc1b44426352113ec
2020-02-07 13:59:24 -07:00
Umherirrender 78dc3baf5c Use single quotes on less @import
Change-Id: I370dd866e9e3836fe6de4c86a54861f055424d7d
2020-02-07 17:51:49 +00:00
jdlrobson a3179d8fff Use user sandbox icon from OOUI
It's called 'markup'. Since this icon only ever shows to logged in
users there are no caching implications.

Bug: T244444
Change-Id: I75f5365ccb5a41f1c0628532e81b5ec63804a2a8
2020-02-07 03:39:08 +00:00
Phuedx 6e4c6c99bc Revert "Reduce 'userContributions' icon code"
This reverts commit 7b4b65a30f, which
caused a regression in the user menu part of Advanced Mobile
Contributions mode.

Bug: T244436
Change-Id: Ifce627dac35b2cd05e1c5ebe658534b6b8d0de88
2020-02-06 11:05:26 -08:00
Umherirrender 4ccaf6e959 Move comments out of class lists
Bypass upstream bug and allow stylelint upgrade
https://github.com/stylelint/stylelint/issues/4049

Change-Id: Ibb0a1cc714324db96cf6c7973cfd8c4616e159b8
2020-02-06 01:05:27 +00:00
jenkins-bot 9837ab99e9 Merge "Clicking the category overlays is synchronous" 2020-02-05 01:48:36 +00:00
jenkins-bot b216b8187f Merge "Dev: Address some FIXMEs" 2020-02-05 00:24:25 +00:00