Commit graph

2945 commits

Author SHA1 Message Date
Translation updater bot 0dc39c9d11 Localisation updates from https://translatewiki.net.
Change-Id: I840b62d4d1d0c12629affba5fb6cac8f3ae7cc3a
2021-08-11 08:19:30 +02:00
jdlrobson 75a9d81755 Fix pointer class behaviour
Add unit tests for landscape previews.

Bug: T287520
Change-Id: Ib9a7635b532248a4f44c308d7bb5dc7ab08667e6
2021-08-10 10:40:40 -07:00
jdlrobson a0754c8cf9 Storybook: Fix RTL
Provide containers for page previews examples

In storybook we avoid position absolute but this deviation from
how they behave in reality could lead to subtle differences that impact
the rendering of previews. It also doesn't allow to see the preview
in the context of the link which is an important part of visually
verifying the position of the pokey arrow.

This also allows us to rethink the broken RTL mode. We now scope
LTR rules to a LTR class that is present on the container, and use
the CSSJanus parsed stylesheet for RTL.

Change-Id: I189019824ddd6aa759790fd162ffcd543619a953
2021-08-06 14:40:10 +00:00
Translation updater bot 4868c16ea7 Localisation updates from https://translatewiki.net.
Change-Id: I5fddb35ef9fc522d600ec5dbcb0b4ce625185965
2021-08-05 08:22:27 +02:00
Translation updater bot 505221ef58 Localisation updates from https://translatewiki.net.
Change-Id: Ic7692081f4fed7f1e926fd730cf70cff7d41791a
2021-08-04 08:15:16 +02:00
jenkins-bot e27356325f Merge "Show medium size (<320 wide, but >=250 high) images as well" 2021-08-04 01:04:05 +00:00
Thiemo Kreuz a01c31efd7 Show medium size (<320 wide, but >=250 high) images as well
The requirement for landscape images is to be at least 320px
wide. The requirement for portrait images is more relaxed,
only 250px high. Images that fall between these two
requirements currently don't show a thumbnail, even if they
could.

This change affects a very specific group of images:
* Square images from 250 x 250 to 319 x 319.
* Landscape images from 251 x 250 to 319 x 250.
* Landscape images from 319 x 250 to 319 x 318.

The most extreme ratio is 319 x 250. This will be cut to
203 x 250. I.e. the absolute extreme are 58px missing left
and right, but never more.

Requested at https://www.mediawiki.org/wiki/Topic:Vwl97pm6as9fuf6k

Additional stories for testing more extreme small images:
* Small Tall - 300x1000px
* Small Short - 300x200px

Update tests accordingly.

Bug: T268999
Change-Id: I811f1c0e7e9b0c30280b36a61cc7831a5b9e58c8
2021-08-03 13:17:06 -06:00
Translation updater bot 1fbadad160 Localisation updates from https://translatewiki.net.
Change-Id: I52c8df0bd84d92a0958da33554b7fce450e1c46f
2021-08-02 08:37:26 +02:00
Sam Smith 8f5000f346 Remove Popups instrumentation
Bug: T267211
Change-Id: I640ab367cd235ab8da7dd70dbef7ae9076712e84
2021-07-29 17:01:01 +00:00
Translation updater bot 1de4252bdb Localisation updates from https://translatewiki.net.
Change-Id: Ia077f80d873e3907abaa3262903405c09e68013f
2021-07-29 08:45:11 +02:00
sahil 1e1b8506ac selenium: Update wdio-mediawiki
wdio-mediawiki v1.1.1:
- Includes wdio-defaults.conf.js file that vastly simplifies wdio.conf.js.
- Replaces @wdio/spec-reporter with @wdio/dot-reporter.
- Introduces video recording.

Bug: T283597
Change-Id: I76edb3f16272fc6c1d70b0a796115cf5cc22d255
2021-07-28 16:35:31 +05:30
Clare Ming 7a6c036318 Fix regression with reference previews
- Adjust padding, margins for storybook stories.

Bug: T281170
Change-Id: I05ee0f2123a9999b440e3afdeae1d5b2318e602e
2021-07-27 13:57:08 -06:00
jenkins-bot 082fc17aba Merge "Add reference previews to storybook" 2021-07-26 12:47:28 +00:00
Translation updater bot ed785f13cc Localisation updates from https://translatewiki.net.
Change-Id: Ic686ae414d265745bbd10c62fbaf30069175f7dd
2021-07-26 08:12:34 +02:00
jenkins-bot abff28e0b2 Merge "Update package.json engines property to match .nvmrc" 2021-07-23 22:02:58 +00:00
bwang 089a219f5d Update package.json engines property to match .nvmrc
Change-Id: I56453ee8bbd6b783204765bbdba1fe509d8b4e90
2021-07-23 14:16:54 -05:00
Translation updater bot 305cac2be0 Localisation updates from https://translatewiki.net.
Change-Id: Iacca2c90ae4009cc147f3429926897abff6f5c65
2021-07-23 08:08:32 +02:00
jdlrobson f97d29923b Add reference previews to storybook
Change-Id: I8e9e2db66fa94b33abcf7c9cbaff8defe5003ef6
2021-07-22 23:59:26 +00:00
jenkins-bot c13203acbb Merge "package.json - remove "npm run build-storybook" from test script" 2021-07-22 23:20:28 +00:00
Translation updater bot a7dd72d4e7 Localisation updates from https://translatewiki.net.
Change-Id: I9fffdb7ac8251e441c4426ed9bdef267f1657a50
2021-07-22 08:13:30 +02:00
DannyS712 784d9f4e9b package.json - remove "npm run build-storybook" from test script
The npm "test" script runs, among other things
* npm -s run -s doc
* npm run build-storybook

since the doc script is
`jsdoc -c jsdoc.json && npm run build-storybook`
this results in building the storybook output twice. Remove
it from the "test" script.

Also, remove duplicate -s

Change-Id: Iee54e0c8455b752efc714c1fb1487b030ba007a1
2021-07-22 04:26:59 +00:00
Nicholas Ray 96c19adb42 Adjust top padding of popup to account for clip path
* For .mwe-popups-image-pointer classes (portraits that have a thumbnail
with a pokey at top) Override the negative margin on the
.mwe-popups-discreet element which undesirably pulls mwe-popups-extract
up.

* Add a top padding to previews when the pokey is at top and the preview
is not a disambiguation and is a landscape preview to account for the
margin around the text getting clipped by clip-path.

* Apply display: block to image to stop whitespace from appearing below
the image.

Bug: T281170
Change-Id: I7ca6c922b2f4615103e4162d96fd90d891deb1df
2021-07-22 00:11:11 +00:00
jdlrobson 1a62ae90cd Remove the page preview icon hacks
Now the Vector icon stylesheet is aligned with the correct
design specification these should no longer be needed.

Additional changes:
- Fixes icon display in storybook for disambiguation links

Bug: T287058
Depends-On: Ibc136a17662ae839f90babb21e0f7e8f27b7a7d5
Change-Id: I02bfd7973352a03b5be4b6e82575e2209b8e4043
2021-07-21 23:20:17 +00:00
Translation updater bot f1fcf34782 Localisation updates from https://translatewiki.net.
Change-Id: If8d53e13362222d68e5aef473a0e9628a3fc7975
2021-07-20 08:20:55 +02:00
jenkins-bot faee7993b4 Merge "Use relative positioning with zero top,left,bottom,right properties in storybook" 2021-07-16 19:15:49 +00:00
Nicholas Ray 8aef7dca43 Use relative positioning with zero top,left,bottom,right properties in storybook
Instead of using static positioning which changes the behavior of
absolutely positioned elements inside .mwe-popups (such as the footer
and the pseudo-element pokey), use relative positioning but set the top,
left, right, and bottom properties to zero. This more accurately
simulates how the Popup actually behaves in production.

Bug: T271763
Change-Id: I4b588667eaa761286a5381c4b31bee6a2aa427e8
2021-07-16 12:13:43 -06:00
Jan Drewniak dbb58da86b [Storybook] Upgrade Storybook to v6.2.9
This removes the webpack.config.js file, moving the webpack config
into main.js, which replaces config.js.

- Moves the global jQuery into the webpack config in main.js.
- Removes the outdates .nvmrc file in the webpack folder.
- Moves the mockMediaWiki initialization from config.js into
  index.stories.js
- Upgrades webpack to 4.22.2

Bug: T271763
Change-Id: Ie008d69e992625113ae98d52ad6d37186eb933de
2021-07-16 15:38:29 +00:00
Jan Drewniak afda9e4574 [Storybook] Fixing missing images
At certain screen densities, Popups may request images of a certain size
which were previously unavailable.Changes a missing image in models.js
as well.

Bug: T271763
Change-Id: I6400de9be35c3f0cab116ceb76e52f8f2a4a8164
2021-07-14 16:26:20 +00:00
Jan Drewniak 1e04551b1c [Storybook] Removing custom CSS grid and addons from Storybook
Removes the following add-ons and their configuration from Storybook:

- addon-cssresources
- addon-knobs
- addon-options

This will hopefully ease the upgrade to Storybook 6.

Removes the custom CSS grid used to position previews within the Storybook
instance in favour of a flexbox layout. This simplifies the creation
of previews for Storybook.

This change requires us to to add relative positioning to
`.mwe-popups-container` so that the footer is correctly positioned in the
popup without absolute positioning. This positioning has been moved to
be Storybook specific to avoid an regressions in production.

Bug: T271763
Change-Id: I9a97291cb4bca7d4cc60dad232a60f6f92c0adea
2021-07-14 12:54:55 +02:00
jenkins-bot 325789197b Merge "[Storybook] Remove unused Less file in Storybook folder." 2021-07-12 14:47:16 +00:00
Jan Drewniak 02f4650a01 [Storybook] Remove unused Less file in Storybook folder.
This file was used in the initial Storybook implementation but has been
replaced by `.storybook/mocks/custom.less`.

Bug: T271763
Change-Id: I24d2690db13edebdeeb09c5f37c097548007ef89
2021-07-12 13:58:49 +02:00
Translation updater bot 163240af8d Localisation updates from https://translatewiki.net.
Change-Id: Ib22390aeb7618c9a8f09f2b78a6bc237648a6b4b
2021-07-09 08:07:07 +02:00
DannyS712 7bfad7e441 webpack.config.js: remove stray tab
Change-Id: I6926b87f03739986965ba82403257e10e99c2777
2021-07-07 06:43:07 +00:00
Translation updater bot a497098eed Localisation updates from https://translatewiki.net.
Change-Id: Ibb4b6518007158b6bdcb93a4647f831c4072f436
2021-07-07 08:08:04 +02:00
Translation updater bot e4c26e93b9 Localisation updates from https://translatewiki.net.
Change-Id: I9fc82afd4b4fd985f796317c1de3093837379e51
2021-07-05 08:07:13 +02:00
jenkins-bot 9b0c27074a Merge "Add relative positioning to .mwe-popups-container" 2021-07-02 16:14:06 +00:00
Translation updater bot 01e48af491 Localisation updates from https://translatewiki.net.
Change-Id: I318a28156273122919bad84aaf8c327e40747a8d
2021-06-30 08:26:19 +02:00
Jan Drewniak 04ba7badf4 Add relative positioning to .mwe-popups-container
The Popups UI currently depends on the absolute positioning of the
top-level .mwe-popups element to correctly position it's footer.

This dependence on absolute positioning makes it difficult to debug
Popups in isolation (e.g. in Storybook).

Adding relative positioning to the .mwe-popups-container elements
maintains the correct footer positioning and removes the need for a
specialized layout in Storybook that accommodates absolute positioning.

(If changing the Popups layout to accommodate Storybook seems
unjustified, just think of it as increasing testability).

Bug: T271763
Change-Id: Ifba23afa1a2f401b025476a1fa464c2176fb40ec
2021-06-25 12:28:03 +02:00
Translation updater bot 6e6e874c96 Localisation updates from https://translatewiki.net.
Change-Id: Iba2e0c7c09aae344a72970b72aa0d40da10178f1
2021-06-22 08:09:46 +02:00
jenkins-bot 2f19a9be98 Merge "Remove obsolete box-shadow mixin" 2021-06-18 16:45:07 +00:00
bwang 2720740136 Remove obsolete box-shadow mixin
Bug: T282759
Change-Id: Ie5238c97763db3fab639b2ce3ee57f1afd8f0acf
2021-06-18 16:29:14 +00:00
Fomafix 197f7f557e Bump to requires MediaWiki >= 1.34.0
c7595e54f6 changed to
mw.util.escapeRegExp included in MediaWiki 1.34.

Change-Id: Ibef8f95b80d71d26dcd69572ce3b98f43f2cbfc0
2021-06-17 06:16:22 +00:00
Translation updater bot f66be5e9e5 Localisation updates from https://translatewiki.net.
Change-Id: I6388198106ca6b9842a5f71821d3a69005a17aff
2021-06-15 08:33:20 +02:00
jenkins-bot 5da52ba284 Merge "Avoid using User::getBoolOption()" 2021-06-14 16:31:45 +00:00
Translation updater bot 732a7ea0d6 Localisation updates from https://translatewiki.net.
Change-Id: I82fe57d488616f4d7df27cf6d74ba2da98fcdaa1
2021-06-14 08:38:08 +02:00
jenkins-bot 2a7a86db3a Merge "Set default VirtualPageView version to Event Platform schema URI" 2021-06-08 08:42:03 +00:00
Translation updater bot b5074ca86e Localisation updates from https://translatewiki.net.
Change-Id: I610ee044aa36c4d72ef14d6109e276edf322c437
2021-06-07 08:42:40 +02:00
Alexander Vorwerk 35462639c3 Avoid using User::getBoolOption()
User::getBoolOption() is deprecated and should be replaced with
UserOptionsLookup::getBoolOption()

Bug: T277600
Change-Id: I9a2118a6342bd5f145174428dcfb518cba4e439b
2021-06-06 16:44:20 +02:00
James D. Forrester e0e37b76cd .nvmrc: Update to Node 12.21.0 as CI has migrated
Bug: T284345
Change-Id: Ibecb7c972dacc47fcf737fd4e9471413fac24657
2021-06-04 13:50:04 -07:00
Translation updater bot 65d3f0b969 Localisation updates from https://translatewiki.net.
Change-Id: Ic23b8ad78e663bffdb112e229914e99690bb76fc
2021-06-04 08:37:08 +02:00