Commit graph

1107 commits

Author SHA1 Message Date
Jon Robson 7c9304cbf4 Replace reset with SkinModule normalize
Retain the existing font,
margin and padding values as without
these we would trigger a visual regression.

Visual change: Four minor visual regression with this change
relating to the button in the AMC CTA Drawer and suggested
edits overlay heading. All are acceptable.

Bug: T205341
Change-Id: I6331d88e5b7301fd13249414350a539738cfae53
2024-02-02 18:00:45 +00:00
Jan Drewniak be0b43042e Convert Less variable names from camelCase to snake-case
Converts all Less variable names from CamelCase to snake-case
per the MediaWiki coding conventions.

Removes the following unused Less variables, mostly
related to icons, since those were converted to Codex:
- @icon-touch-area-sm
- @icon-touch-area-md
- @min-size-icon (replaced with @size-icon-medium)
- @icon-glyph-size-sm
- @icon-size-sm
- @icon-padding-sm
- @icon-glyph-size-md
- @icon-size-md
- @margin-icon-md-labelled

Bug: T350581
Change-Id: I1b16e77942d9bea20dcc5636a63d64aa2325a173
2024-01-31 15:24:31 -08:00
Derk-Jan Hartman 33797c9a02 Replace page-list with mw-mf-page-list
This class was renamed in Ia33d199b84c978bf26bbaa1645515ae186bd26be

Bug: T337741
Change-Id: I508d8947b6091c216fab13fa608090b894929dad
2024-01-27 23:38:53 +01:00
Ed Sanders 8ef144f936 build: Update linters
Change-Id: I5aa3ab891890b52057a5fc855315e5b1b2203037
2024-01-24 22:02:12 +00:00
jenkins-bot dfc53408d0 Merge "Do not use mw.loader.require" 2024-01-17 18:57:27 +00:00
Volker E 40912af36d build: Update 'svgo' to latest v3.2.0
The latest update of 'svgo' dependency includes three optimizations on
converting path commands, which
- improves closing paths and how we determine if to use absolute or
  relative commands.
- round arc or convert to lines based on the geometric sagitta
- convert cubic Bézier curves to quadratic Bézier curves where possible
Also unifiying npm command to qua standard notation `minify:svg`.

Bug: T354875
Change-Id: Ibf59b3435b82602c5355b6f1c9b03920ea2e8eab
2024-01-12 17:45:54 +00:00
jenkins-bot 99f457d3a8 Merge "Remove old styles for unnested tabs" 2024-01-11 21:36:09 +00:00
Steph Toyofuku 9c8896ae5c Remove old styles for unnested tabs
Once the cache has cleared out and all tab links are nested in li
elements (983960), follow up on the fixmes introduced and update the
stylesheet to reflect the single way we will be styling `minerva__tab`s
going forward.  This should not be merged until after the break to
ensure the cache has had time to clear

No visual changes on this one as it _should_ effectively be a noop

Bug: T340728
Change-Id: I36be5ab3cacfb5e0c0f056264055509d2ee22271
2024-01-09 22:55:42 +00:00
Jon Robson d5e6a0b4ce Do not use mw.loader.require
That method is marked as private. Instead using require (the
ResourceLoader require)

Bug: T235198
Change-Id: I6e4e5c76717808e416dc703639c15d0de1070a09
2024-01-03 10:53:48 -08:00
Steph Toyofuku 2b41416c0d Allow addPortletLink to target tabs/associated pages
Currently `mw.util.addPortletLink` cannot properly add a portlet link to
the associated pages tabs, as there is no `p-associated-pages` id on
mobile.  This change pulls the id from the page data, and adds the
necessary class for the tab to be styled correctly - since tabs do not
have corresponding icons while most portlet links do, we also branch on
this class (effectively on whether we are in the tab container) to
ensure an icon is not inserted

Finally, I added a few comments and spacing in the sections of code that
I touched to make them more readable and resolve some of the linter
warnings, but happy to hear if these are not helpful!

Bug: T340728
Change-Id: I33fc12611a6238552a3eb47f6ca37f087903a92a
2023-12-21 16:37:28 -08:00
Steph Toyofuku 88caf181e5 Rework tabs to use unordered list
As part of my work on fixing addPortletLink for tabs on mobile (T340728)
we need these tabs to be correctly designated as an unordered list (note,
this is also how they are rendered in Vector).  In addition, update the
styles to account for the link being nested in a list item now

There should be no visual change as a result of this, but if there is
please let me know!!  I will be testing locally in pixel after pushing
to ensure the change is transparent

Bug: T340728
Change-Id: I922558a59aa909ce76079bab057811d76467f644
2023-12-19 15:28:11 -08:00
jenkins-bot 56a4b8686a Merge "Fix alignment for nearby and settings items in menu, and correctly hide when JS is disabled" 2023-12-14 22:34:13 +00:00
Steph Toyofuku 5e35d585cf Fix alignment for nearby and settings items in menu, and correctly hide when JS is disabled
Removes a `display: inherit` that was causing issues with the alignment of these two items in the menu.  In addition, correctly sets display to none for jsonly-specified list items when client js is disabled and rename the class to make it more specific to the menu items

Note: this will have a visual impact as it is fixing what is currently a visual bug.  The jsonly hiding will also not work with cached content, but since it's currently broken we figured this was acceptable

Bug: T346670
Change-Id: I56d2c4fcba09d199a0fd6aad2f1621509bbfaba5
2023-12-14 21:58:39 +00:00
jsn c5bced40fb show article footer on diff pages
Bug: T350637
Change-Id: Ib1b75956a2595b4fc51bfe2acfd83b251dcec079
2023-12-14 14:13:19 -06:00
thiemowmde e0d893c0f5 Fix broken reference popup when name contains # character
The fragment in a URL like http://example.com/foo#bar#baz doesn't end
when there is another # somewhere. That # is part of the fragment.

I'm not sure since when this issue exists. It's already in the first
version of this codebase from 2017, see Iff1f7e6.

Bug: T332007
Change-Id: I3b0726380d2f385475f5ba53aeab16932d7ccaa7
2023-12-12 15:08:55 +01:00
Bartosz Dziewoński 97aed1ad86 Add styles for new heading HTML
Add CSS to support new HTML markup for headings with section edit
links, which will soon be used by Parsoid page views (T269630)
and by the old parser (T13555). Keep the old rules to provide
temporary support for cached page HTML and emergency opt-outs,
as well as permanent support for plain headings on special pages
and in Parsoid edit mode HTML.

See documentation page for further explanation:
https://www.mediawiki.org/wiki/Heading_HTML_changes

Depends-On: I44587461582d648b56ef0c9c7ae0c322895c69c2
Bug: T13555
Bug: T269630
Change-Id: Ib97d034ab533124f06441e788c8608fb274dccf0
2023-11-27 20:03:16 +00:00
Bartosz Dziewoński 6294ca7196 Reduce CSS size & specificity for headings
Nesting these rules inside `h1, h2, h3, h4, h5, h6 { … }` generated
some enormously long selectors (as the whole selector had to be
repeated 6 times). It's not needed, as these elements do not occur
anywhere else.

Change-Id: I1647e37ff9a0c975d9320e4c34857f210a1858c2
2023-11-27 18:31:54 +00:00
Bartosz Dziewoński d3c5b8a6b2 Restore section edit link styles
The 'edit-page' class is no longer applied to section edit links.
Follow-up to I9f768706c0a0f14f14ee4b3812288218bef36018.

Remove a rule that seems no longer needed.

Bug: T351853
Change-Id: I0891332d613d152374c37f232ed596292d89b583
2023-11-27 19:29:31 +01:00
Bartosz Dziewoński 5f17c89649 Remove unused CSS for cached HTML
Searched for /fixme.*remove/.

Follow-up to:
* I55a25dfb8aba3d1b589a36ba4cba3bba0fe710a1
* I98443b0dcb88911a5314092216809387b4fb80dc
* I3c9d59f49f1b939981a7b2b450448db6736d5958
* Ie24c0215d07d5e4605d8479ed9e950a3d9c9b086

Change-Id: Id52487f6f5e4802ea2700c51e87e63565f340f5d
2023-11-17 18:52:27 +01:00
jenkins-bot 35ba0447b0 Merge "eslint: Enable no-use-before-define" 2023-11-17 16:55:41 +00:00
Ed Sanders 67f955eb20 eslint: Enable no-use-before-define
Change-Id: Id26b6017e06f436e9200638766bb8073fce8f03f
2023-11-17 16:06:59 +00:00
Ed Sanders 88595174e6 Remove unused user-button styles
This class was removed in I55c18cf72.

Change-Id: I59069d97cdcc827d279edc76560f8c33fa2f71f2
2023-11-16 10:42:26 +00:00
Jon Robson f78a77c825 Remove eslint disable in MobileFrontend
This method already throws a deprecation warning in production
so there is no need to guard against it here.

Bug: T348807
Change-Id: Iab346822e80dd716c001497c0587b163a49a3265
2023-11-14 10:24:17 -08:00
Jdlrobson ca28efc9c7 Drop mw.mobileFrontend references
This restores the previously reverted patchset
If5b76245bf60bfa9cf977cdbf37ee0d6bb65f9d9

Changes since original:
* Added Depends-On to MobileFrontend
* Uses OOUI classes for page issues rather than es6 classes - ES6
classes do not support modifications to class prior to running
super so MobileFrontend's View class is not compatible without
significant refactors.

Depends-On: I24ad75adf8519102ca356d64d99d765ab69180cc
Bug: T348807
Change-Id: I4ff82af0251254c846f2caee330af5af738f6029
2023-11-10 01:30:52 +00:00
Jdlrobson 2ee3e27406 Revert "Drop mw.mobileFrontend references"
This reverts commit 19ea6328b0.

Reason for revert: Breaks page issues and image overlay. I
will break this up into smaller less risky patches.

Change-Id: If5b76245bf60bfa9cf977cdbf37ee0d6bb65f9d9
2023-11-03 19:26:16 +00:00
Jon Robson 19ea6328b0 Drop mw.mobileFrontend references
Bug: T348807
Change-Id: Ib71b43005e5788d0e29917a165281faa84926414
2023-10-31 21:54:26 +00:00
Jon Robson 5170e69d3c Fixes read only mode.
When $wgReadOnly = true; in LocalSettings.php the edit icons
appear locked and when clicked should show a warning.

This also addresses deprecation warnings in the code and
tidies up the ES6 code.

Note to reviewer: Please use git diff HEAD^ -w
when reviewing this diff. Mostly whitespace changes.

Change-Id: I3fa83cc1dc4da62260fd0ef50ac14805c3e1282b
2023-10-31 00:41:29 +00:00
Jon Robson db8e3b09af Document messages and add hours and minute units
Follow up to I5a4a2588da3d701be87690038c2c9b2bc1aa0365

Change-Id: I6ea2b98bd3d03e586cc58307d3f2f0f1119059e3
2023-10-30 23:37:12 +00:00
jenkins-bot 3a4b1f1082 Merge "Style the desktop diff and history page of Minerva to look like mobile pages" 2023-10-30 14:53:32 +00:00
Volker E 1dbd976eb9 styles: Bring headings line-height value in line with Codex
The line-height value for headings in MinervaNeue was 1.3,
while in Codex and Vector it changed to 1.375.
This patch brings the value in MinervaNeue in line with Codex and
the corresponding change in Vector a while ago.
This also makes future typographic changes more easily handlable.

Bug: T331403
Change-Id: I4320035708d6005388428dfbc90da2ef613841b5
2023-10-24 21:54:51 -07:00
jenkins-bot 16eed12b1a Merge "Generate section edit links via SkinMustache" 2023-10-24 01:12:49 +00:00
Jon Robson 0c8caebfc6 Generate section edit links via SkinMustache
Bug: T346944
Depends-On: Ief6a6ee03ada8207fc5c60ea438412fa2d529022
Change-Id: I9f768706c0a0f14f14ee4b3812288218bef36018
2023-10-23 23:17:43 +00:00
Jon Robson a3f03245fd Style the desktop diff and history page of Minerva to look like mobile pages
Depends-On: Ie8ac1aab6d2fe5f4575a6891c36efe497458e093
Bug: T305113
Bug: T240624
Change-Id: I5a4a2588da3d701be87690038c2c9b2bc1aa0365
2023-10-20 18:35:10 +00:00
Ed Sanders a8aecda711 Udate jsdoc and use jsdoc-wmf-theme
Depends-On: Ic3861870c10f64d7f5414669a9d25b8ffb4c79a4
Change-Id: I6750e9bb6d5409e497b5605e3a4660734f5677ab
2023-10-20 13:42:19 +00:00
Jon Robson 05231bb254 Support extension of page actions via hook and addPortletLink
This adds support for:
mw.util.addPortletLink('p-views', '#', 'text', 'fooz',null,
  null,'#page-actions-overflow' )

and adding multiple edit icons via hooks.

Depends-On: I655097769620301143140ded1cde4c7a16879ef4
Depends-On: I401805224c0f387ac85b52b50c1f298b83c03a91
Bug: T346944
Change-Id: I3c9d59f49f1b939981a7b2b450448db6736d5958
2023-10-04 22:15:47 +00:00
Sergio Gimeno 2a9680f2a4 Apply content styles to mw teleport target
Bug: T347199
Follow-up: Ibd5d8c7cc7880678fae498a451cfd417f1f8e1b8
Change-Id: I50274180b62dec902fd7b9030313d4bcf13bd494
2023-09-28 11:29:30 +02:00
Jon Robson b51c6511ef Fixes history icon in green last modified bar
Currently the last modified bar icon appears black rather than
white. This is because the last modified icon shares icon CSS
with the page actions in AMC.

Untie these by giving the icon in this context a different selector,
taking care to support cached HTML.

Change-Id: I98443b0dcb88911a5314092216809387b4fb80dc
2023-09-25 20:40:55 +00:00
Jon Robson c53f69f36a Fixes notification overlay: Change URL using location
Partial revert of I192c6d4235c57f69cf48dcd67aa6c4810df62dfa
The deprecation notice seems incomplete. The two functions are not
equivalent and we have various usages elsewhere in the codebase.

Bug: T346685
Change-Id: I063daa217708c3bebac97af7be9eedab01f5217b
2023-09-18 14:15:12 -07:00
jenkins-bot 18451d4f94 Merge "Fixes console warnings" 2023-09-13 23:37:11 +00:00
Jon Robson d407d1054c Remove or document remaining mw-ui-icon usages
Most of these are captured in other bugs
The anon talk message style doesn't do anything.

Bug: T344022
Change-Id: Iba1fce98ea05931fe07b2b20f07c62d198039d1b
2023-09-13 00:03:38 +00:00
jenkins-bot d676f6e910 Merge "Ensure header edit icons are the same size" 2023-09-12 00:09:12 +00:00
bwang 9e9c1292e4 Ensure header edit icons are the same size
Bug: T345969
Change-Id: Ica191284df74610c958ad8808dcd1c03839b1a5d
2023-09-11 18:37:31 -05:00
jenkins-bot 757dfc078e Merge "Add figure and picture elements to the reset." 2023-09-11 22:02:40 +00:00
Jon Robson 658f1c3439 Fix Echo badges on desktop Minerva, remove module
Bug: T345785
Change-Id: I2913c60d609a11fa74d90e858bf112627553aa13
2023-09-11 14:35:40 -05:00
Derk-Jan Hartman 2728752633 Add figure and picture elements to the reset.
These are newer elements but they have similar user agent defaults to
img/video/audio etc.

This should fix the usage of imagemaps, which use frameless figures
and currently have excessive margin in minerva

Change-Id: If9f995401b771baffe221e474991cf1e3fbc7f76
2023-09-09 13:53:06 +02:00
jenkins-bot 5a6016b708 Merge "Remove old :before icon selectors and update selectors to not use minerva and wikimedia prefixes" 2023-09-07 18:46:41 +00:00
Jon Robson 52de5fd597 Fixes console warnings
Fixes "[1.40] Use of PageGateway is a NOOP and deprecated. Please remove this call."
Fixes Use of "navigate" is deprecated. use navigateTo instead

Change-Id: I192c6d4235c57f69cf48dcd67aa6c4810df62dfa
2023-09-07 11:22:49 -07:00
bwang 269bd5bdaf Remove old :before icon selectors and update selectors to not use minerva and wikimedia prefixes
Bug: T344022
Change-Id: I573d7b36513cd0b74f62621cc246f719bcb94256
2023-09-06 13:53:22 -05:00
bwang e7b908cd5a Fix unseen notifications icon
Bug: T345483
Change-Id: I4e0b2ce146dc9ac65e6f8e3532fc825c3bd8ce18
2023-09-05 19:09:53 +00:00
bwang 0e391a87e0 Update addPortletLink for Codex
For testing make sure to check the 3 variants:
```
mw.util.addPortletLink('page-actions', '#', 'text' );
mw.util.addPortletLink('p-interaction', '#', 'text' );
mw.util.addPortletLink('p-personal', '#', 'text' );
```

Bug: T344006
Change-Id: Iad3a8d5ed1237c1438d170f07c9c3fe3784182fe
2023-08-29 19:27:56 +00:00