Commit graph

2686 commits

Author SHA1 Message Date
Marcel Ruiz Forns cf1b674665 Set default VirtualPageView version to Event Platform schema URI
This schema has been fully migrated to Event Platform.  Setting
this as the default lets us remove the mediawiki-config override
of this that is currently being used.

Bug: T238138
Change-Id: I645a81a4a22130ed6a442c055d6bf4e78160705f
2021-05-24 20:33:45 +02:00
sahil 9a22c9a028 selenium: Update README.md file
Bug: T282237
Change-Id: I16d7f7744f01be15e32a2729e9f516dbb508e41e
2021-05-24 18:04:51 +00:00
Translation updater bot f677e6f211 Localisation updates from https://translatewiki.net.
Change-Id: I3d8aa47d3ab4d1d2c167a5310e76651fc4f4bd7e
2021-05-24 09:55:06 +02:00
jenkins-bot b84f12e76a Merge "Rearrange PopupContext code for readability" 2021-05-22 07:10:52 +00:00
Translation updater bot f516c9bda4 Localisation updates from https://translatewiki.net.
Change-Id: Id819b189551c291b93777afbe9bad13fadad4ae7
2021-05-21 12:10:31 +02:00
Translation updater bot 47cfa0d8c4 Localisation updates from https://translatewiki.net.
Change-Id: Ie77fb454e38e9a856ab80245cc1af952dd7b9f92
2021-05-21 08:34:28 +02:00
jenkins-bot bf5e84b3b5 Merge "Change "graphic" to "figure" in placeholder message" 2021-05-20 16:57:35 +00:00
Volker E 21d49d3de1 build: Add and use 'browserslist-config-wikimedia'
Use central, shareable `browserslist-config-wikimedia/modern` config.

Bug: T282937
Change-Id: I72b38cba2028eab0b67543d066c341b76b91b5bb
2021-05-19 11:19:34 -07:00
Umherirrender 0f087ce5e9 build: Updating composer dependencies
* php-parallel-lint/php-parallel-lint: 1.0.0 → 1.3.0
* mediawiki/mediawiki-codesniffer: 35.0.0 → 36.0.0
* mediawiki/minus-x: 1.1.0 → 1.1.1

Libup is broken on the build steps due to different node versions

Change-Id: I28aefe77365b9812f9cc0f9e5177f45e9f5c2cc2
2021-05-19 19:38:42 +02:00
Thiemo Kreuz 792324359f Change "graphic" to "figure" in placeholder message
This message is not for stuff that's literally a "graphic", but
for tables and some other block elements. I believe "figure" is
a word typically used in science to refer to tables, diagrams,
and such.

Bug: T220208
Bug: T273967
Change-Id: Ie47a1369657608d97ad421507af25fbfa99aaed5
2021-05-19 10:22:21 +02:00
Translation updater bot 0853a4d316 Localisation updates from https://translatewiki.net.
Change-Id: I9622d366a97325a98785c283e94a99b9b46004e7
2021-05-17 08:43:15 +02:00
Translation updater bot 1c3a6fa458 Localisation updates from https://translatewiki.net.
Change-Id: Ib873ecc5d9109857e4b91fcfea3b46b5d5745fa5
2021-05-14 08:45:14 +02:00
Translation updater bot 2f06a49a6c Localisation updates from https://translatewiki.net.
Change-Id: Ia6a051c65082f503c80954d0940fa14cbe870406
2021-05-12 09:22:55 +02:00
Translation updater bot 4d7ea9bad1 Localisation updates from https://translatewiki.net.
Change-Id: I2747b5053f0d5328b4f434fd753a72cdfcbe3dbf
2021-05-11 09:07:46 +02:00
WMDE-Fisch cb7fd4e4f8 Update entrypoint- and bundle-size limits
These numbers haven't been updated for some time now due to the many
recent changes in the code. Since we're wrapping things up I guess
it makes sense to have them accurate again.

Change-Id: I73c202a65192e8011acefd664bea7b62b1b556da
2021-05-10 10:00:39 +02:00
Translation updater bot 1648eb35ee Localisation updates from https://translatewiki.net.
Change-Id: Id4949ba5f2684caf41e9499168a032b7760333c2
2021-05-10 08:53:15 +02:00
Thiemo Kreuz 5d2c5aeaa1 Remove a small piece of unused code from reference.js
Turns out this was only in place because the test was
(intentionally) incomplete. But it's dead code in
production. Let's get rid of it.

Change-Id: Ieeb145b6972dceb7eeda3a167d907b680d5c3ce4
2021-05-07 16:43:01 +02:00
Thiemo Kreuz 8a08a88f66 Remove/update some ESLint exclusions
Change-Id: Icd4c2d968e2b445a54709368de056373a7814919
2021-05-07 16:26:00 +02:00
jenkins-bot d09d5765e3 Merge "Update JSDoc types and comments to be more specific" 2021-05-07 13:01:06 +00:00
Thiemo Kreuz 6b728243d6 Add missing test cases for the settings reducer
As well as make some more test code more readable without
changing what the test does.

Bug: T281698
Change-Id: Ia153981d9196b47099ef3880ac334718895fb0fc
2021-05-07 11:21:37 +00:00
Thiemo Kreuz e4da147efa Update JSDoc types and comments to be more specific
For example: We know the HTML element we are dealing with is
always an <a> element.

I believe the small changes in this patch are all obvious and
non-controversial. Please let me know if you disagree.

Change-Id: I9fe15845affffdd0f5f0fd6ef7d6b607cb567ac7
2021-05-07 11:57:58 +02:00
jenkins-bot 5b641130f6 Merge "More unit test cases for isReferencePreviewsEnabled" 2021-05-07 09:19:44 +00:00
Translation updater bot e3cba6a7e9 Localisation updates from https://translatewiki.net.
Change-Id: I14ccfa2378bd28fb4dd574046095e1b982b76d6a
2021-05-07 08:43:01 +02:00
Thiemo Kreuz 7c3f369019 Rearrange PopupContext code for readability
For example:
* Anonymous users are a critical exception. They must always
  load the module.
* Otherwise check if one preview type is active.
* Prefer isRegistered() over isAnon(), because isRegistered()
  is part of the UserIdentity interface.

Change-Id: Iea7e3bb7ef01bd72ccbd1fc5e574437f6dc42aa2
2021-05-06 16:44:41 +02:00
Thiemo Kreuz 92864de4d0 Tune confusing log error down to a warning
This is not really an error. It does not really have
consequences for the user, except:
* It might waste bandwidth because the module is loaded, but
  unused.
* It might waste a tiny bit of CPU time.
However, this can only happen for registered users, and only
with very specific combinations of settings (notably: a
conflicting gadget must be activated).

The reason it's marked as an error is that previously we could
give more guarantees about this. This changed recently. We will
check if the log message is still helpful and either remove it,
or restore the previous guarantees.

Bug: T271206
Change-Id: I218726c9c4879a405acef68710e79c6ac8d070fe
2021-05-06 10:08:29 +02:00
Translation updater bot e337445751 Localisation updates from https://translatewiki.net.
Change-Id: Id77e555c41fcd79d17b467a81bd857be59d061ab
2021-05-06 08:54:50 +02:00
jenkins-bot e9fac7bcc5 Merge "Enable ReferencePreviews for old users by default" 2021-05-05 15:54:15 +00:00
Andrew Kostka 1fce62ca7b Enable reference previews for anonymous users when not in beta
Change-Id: I605bc79626999c2e65cdceaa47dd6c4479a3d249
2021-05-05 16:43:25 +02:00
Thiemo Kreuz 5b6ed0e580 Enable ReferencePreviews for old users by default
The behavior for PagePreviews – implemented years ago – was
different. For old users it was disabled by default. This
behavior is wrong for ReferencePreviews.

Bug: T271206
Change-Id: I28c43ab3348ffdc27b068fc1ac1d6a6a06ee90a6
2021-05-05 14:32:15 +02:00
Translation updater bot 5e22d4c317 Localisation updates from https://translatewiki.net.
Change-Id: I65bc12ab63e366fa95cd6c61eb4623d09df3e517
2021-05-05 08:38:59 +02:00
Thiemo Kreuz c5e9a68ab8 Set both Beta/non-Beta user option in Selenium tests
I was not able to reproduce the issue locally, but I believe
this might be the reason for the failure we see. It can't hurt
and needs to change anyway, with or without the failure.

Bug: T281324
Change-Id: I0002f952438d7afe2fb6c2100bf25760f7dda10d
2021-05-04 10:45:32 +02:00
Translation updater bot 3aa117bda7 Localisation updates from https://translatewiki.net.
Change-Id: Ib5b776ae46b7f74af950e9d8fdd943a58bd7ebc6
2021-05-04 08:52:49 +02:00
jenkins-bot 3e675c1c62 Merge "build: Upgrade eslint-config-wikimedia from 0.17.0 to 0.20.0" 2021-05-03 21:04:16 +00:00
jenkins-bot c61ff9f6ba Merge "build: Upgrade stylelint-config-wikimedia from 0.10.1 to 0.10.3" 2021-05-03 21:04:14 +00:00
James D. Forrester 14c2102476 build: Upgrade eslint-config-wikimedia from 0.17.0 to 0.20.0
Some inline compatibility queries for the maintainers, where it
wasn't obviously intentional.

Change-Id: Idd659a0a0f7fb86c3f6870b8fe4608bbf8a45f05
2021-05-03 12:31:52 -07:00
James D. Forrester 2d5f39f4c7 build: Upgrade stylelint-config-wikimedia from 0.10.1 to 0.10.3
Also update coverage thresholds so the repo builds with newer
build tools.

Change-Id: I5561f2008b5e5462bb9afdb00c3ed86ff59c57f7
2021-05-03 12:29:30 -07:00
James D. Forrester dc0e13b324 .gitattributes: Don't list package-lock.json
This mis-use of the feature encourages people to commit changes to
this security-sensitive file without review, and inhibits local
development.

This reverts 77ab060997.

Change-Id: I8e310dc0abf0b46514c38f9d4c116c96debeeefa
2021-05-03 19:17:02 +00:00
Thiemo Kreuz 30863cfae5 More unit test cases for isReferencePreviewsEnabled
Not all relevant combinations of flags are currently covered
by tests.

Change-Id: I6276d591185d08a46ffa69b710e1d28c01536b76
2021-05-03 18:57:43 +02:00
Thiemo Kreuz 729f342aa9 Minimize and optimize reference preview CSS
This minifies the CSS a bit by simplifying some selectors that
don't need to be that specific.

This also optimizes the code for the 3 icons that can appear
in a reference popup:
* The type icon in the title.
* The settings icon in the footer.
* The (i) icon that can appear in the content.

Some of this CSS used "resets on top of resets". This is more
straightforward now.

To fully test all 3 icons please use an example like this:
<ref>
{| class="wikitable mw-collapsible"
| Collapsible table
|}
</ref>

Bug: T234205
Bug: T280762
Change-Id: I9e338475a161164e7707b9bb0498dba640313174
2021-05-03 13:26:13 +02:00
jenkins-bot d7869a0086 Merge "Fix settings dialog offering ReferencePreviews when unavailable" 2021-05-03 08:32:55 +00:00
Translation updater bot 3c59226bd3 Localisation updates from https://translatewiki.net.
Change-Id: Ie80b3f1e618bec779615ab590f6da7cd2119ee5a
2021-05-03 08:37:43 +02:00
Thiemo Kreuz 75155a076a Fix settings dialog offering ReferencePreviews when unavailable
Open questions:
* It is possible to make the patch smaller in case this makes
  it easier to backport it. Is this worth it?
* This code is not covered by any test. I think it's worth
  writing tests. Most of this code will stay, even after beta.

Bug: T281352
Change-Id: I5f30054f1664643b427909f7fa189b4ea5e11879
2021-05-01 17:32:55 +02:00
James D. Forrester b21da7dcbd build: Switch node version to 10.24.0 now CI is on buster
Change-Id: I7e84c4b668db188bbc930115e05b2d34be256d29
2021-04-30 11:39:16 -07:00
Volker E 4c1d1ba39f build: Make 'svg_check.sh' script executable and change to tabs
Change-Id: I276b7ec65dc4e15960883afd85fd56e6c7b9f3b7
2021-04-30 03:37:08 -07:00
jenkins-bot 51e976ae2b Merge "Fix settings cog wheel being cut off on mobile" 2021-04-30 07:45:16 +00:00
jenkins-bot 8414cf0115 Merge "Fix setting button placement in article preview" 2021-04-29 19:05:13 +00:00
jenkins-bot da9a2699bc Merge "Suppress subsequent errors in svg_check.sh" 2021-04-29 16:51:10 +00:00
jenkins-bot e003fed7f2 Merge "Move VirtualPageViews back to mw.track" 2021-04-29 14:47:18 +00:00
Marcel Ruiz Forns a6a06f70bf Move VirtualPageViews back to mw.track
Use mw.track instead of dedicated tracker for VirtualPageViews.
This way we can migrate it to the new Event Platform client.
The new client does not observe DNT, which was the reason this
instrument was moved to a dedicated tracker on the first place.

Bug: T279382
Change-Id: I8bb515eab337ffed686ba7522bc6153cfdd8ca8d
2021-04-29 16:15:16 +02:00
Thiemo Kreuz b431d8c7f0 Fix image position on the settings dialog help screen
Bug: T281353
Change-Id: Ie8aafa5a315c21e2acaaf27a8e11f5397d38e6de
2021-04-29 12:05:46 +02:00