Commit graph

2765 commits

Author SHA1 Message Date
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
Thiemo Kreuz de9577d2a8 Suppress subsequent errors in svg_check.sh
This code was introduced via I02715a5. In case there is something
wrong with the svgo call (e.g. when my local node_modules are not
up to date), I get many unrelated error messages that are more
confusing than helpful. The first error on the svgo call is still
shown.

Bug: T280923
Change-Id: I5ef7843c9de122c8dce61fbb98737c8acdd0c22c
2021-04-29 10:41:21 +02:00
Thiemo Kreuz 3128334bba Fix settings cog wheel being cut off on mobile
Bug: T281351
Change-Id: I9279d7e4099495e6c359e8adafe50bb08f2d6536
2021-04-29 10:28:11 +02:00
Thiemo Kreuz 986af3863b Fix image size on footer link help screen
Bug: T281353
Change-Id: Icbfa843f8cf76ca903581cac7ec60601b6fd8697
2021-04-29 09:49:57 +02:00
Translation updater bot 22e288f3ab Localisation updates from https://translatewiki.net.
Change-Id: Ic450b0d20500efa45e8ddc03b0e76b7d4218c8e8
2021-04-29 08:54:43 +02:00
jenkins-bot 121c0093b9 Merge "build: Enforce check for uncompressed SVG files in CI" 2021-04-28 21:47:30 +00:00
bwang dce03d9036 Fix setting button placement in article preview
The london thumbnail was also replaced with a larger size to fix the RTL landscape story in storybook

Bug: T276668
Change-Id: I00dfe4762c36f49c93144d1207013c41cf33007a
2021-04-28 15:24:45 -05:00
Translation updater bot 99f5dd09d9 Localisation updates from https://translatewiki.net.
Change-Id: I539371322c87a3e7e8ab2989da503008ace967a7
2021-04-28 16:43:16 +02:00
jenkins-bot acb5d1d8e9 Merge "Make checkboxes use upstream mediawiki.ui.… styles" 2021-04-28 11:12:16 +00:00
jenkins-bot 4bc2dadf82 Merge "selenium: fix JUnit reporter" 2021-04-28 11:12:09 +00:00
Thiemo Kreuz 275a67c730 Make checkboxes use upstream mediawiki.ui.… styles
This does not fully solve the ticket, as these are not the
actual OOUI styles. But it's already much better than the
unstyled checkboxes before.

Bug: T281227
Change-Id: I9a5023482774c09aa73845ca6dfd1c4926f088e1
2021-04-28 10:37:07 +02:00
jenkins-bot 23c09a5d2a Merge "build: Upgrade 'svgo' & re-crush SVGs" 2021-04-28 07:51:03 +00:00
Jan Drewniak b6fceb2fda build: Upgrade 'svgo' & re-crush SVGs
'svgo' upgraded to v2.3.0

This includes:
- Replacing .svgo.json with .svgo.config.js
- Updating the SVGs files. This amounts to changes in the order of
  some attributes.
- Adding the minify-svg command as part of the npm run test command

Bug: T278656
Change-Id: Ia38332be68b8ac47a31caf30272920c0f0c12053
2021-04-28 07:28:16 +00:00
Translation updater bot 57e031f11d Localisation updates from https://translatewiki.net.
Change-Id: Ibee43967e3df3d35079311786fa4cbd8823c5581
2021-04-28 08:49:23 +02:00
Željko Filipin 0f15690b07 selenium: fix JUnit reporter
JUnit reporter configuration changed since WebdriverIO v6. Before this
patch, the reporter was outputing to terminal, instead of outputing to
file.

Bug: T214686
Change-Id: Ib315b0261b3724cded17c85519ac28842d7ab071
2021-04-27 19:50:10 +02:00
Thiemo Kreuz 3a00223a36 Separate reference preview settings in beta & non-beta
This is the smallest possible patch for a backport.

While it seems there is zero technical reason to limit user
option keys to lowercase with dashes, it's best-practice.
Same as message keys.

Bug: T281235
Change-Id: Ia4a45cf4459543c81b23b757ae9c2cfaf9676894
2021-04-27 16:15:17 +02:00
Translation updater bot 5f850befee Localisation updates from https://translatewiki.net.
Change-Id: Id53c370fac5e97a142adf41bd715659cdd62cbb5
2021-04-27 08:38:48 +02:00
jenkins-bot f7ddbcaf3c Merge "Renamed settings local from simple to page" 2021-04-26 14:55:28 +00:00
jenkins-bot e9de7cb261 Merge "Localisation updates from https://translatewiki.net." 2021-04-26 07:16:16 +00:00
Translation updater bot f286bb1f7b Localisation updates from https://translatewiki.net.
Change-Id: I4471d310734726f923279eab767d6636fc3def8e
2021-04-26 09:10:42 +02:00
Translation updater bot 35a6a0c938 Localisation updates from https://translatewiki.net.
Change-Id: I4320d7a5678554f600ffbd4316279da7b5eccc11
2021-04-26 08:57:27 +02:00
anjali041 4f12a23794 build: Enforce check for uncompressed SVG files in CI
- 'dev-scripts/svg_check.sh' is added to the Popups repo
- `svg_check` is run during the npm test script

Bug: T280923
Change-Id: I02715a5a70f0effb3625694f0afb3cd6250ef46c
2021-04-25 13:29:44 +00:00