Commit graph

2800 commits

Author SHA1 Message Date
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
Svantje Lilienthal 3b6d9ccc9d Renamed settings local from simple to page
We changed the handling of the popup settings. They now contain popup types (pages and references). 
To not get confused with the old setting options (simple, advanced and off), 
we would like to rename the local for the simple setting to page. 
It should already contain the correct string.

Bug: T277639
Change-Id: I8847b890e9e31602277a92d82a188fcdd3eea855
2021-04-23 14:35:06 +00:00
jenkins-bot 5594191b6b Merge "Clean up popup type settings related code" 2021-04-23 13:46:15 +00:00
jenkins-bot a5786d63e5 Merge "Add tests for rewritten SETTINGS_CHANGE action reducer" 2021-04-23 13:43:24 +00:00
Thiemo Kreuz d0872e3025 Clean up popup type settings related code
* Change more places to not hard-code the popup types, but use
  loops and such.
* Change many `function ()` headers to use the more streamlined
  ES6 sytnax.

Bug: T277639
Bug: T277640
Change-Id: Ifece87d51012e0e069286453b27f5c9ae273710e
2021-04-23 15:38:38 +02:00
Thiemo Kreuz a2c8417d74 Add test case for syncUserSettings with reference previews
Code was introduced in I13acfb8, but not individually tested
so far.

Bug: T277639
Change-Id: Ica4527d3514246069cce7f5848c22764c6306531
2021-04-23 13:05:09 +02:00
Thiemo Kreuz 7f938bb077 Add tests for rewritten SETTINGS_CHANGE action reducer
The new code that is tested here was introduced in I860a1b3.

Bug: T277639
Change-Id: I128e69f8ca0415ff78d68a2fea2c9622c90029e0
2021-04-23 11:03:28 +00:00
Svantje Lilienthal e5909e06c5 Updated settings link for anonymous users
Bug: T277640
Change-Id: I5abfed7ba1d55286276d03141dd3af33008b7e04
2021-04-23 12:46:31 +02:00
Svantje Lilienthal 09c2c52945 Added popup types handling
We added reference preview as a checkbox the the
anonymous user settings. To handle both popup types
(pages and references), we changed the usage of
preview.enabled. We pass on all types as a map
inside preview.enabled. The footer link to edit the
settings will appear for anonymous users if at least
one type is disabled.

Bug: T277639
Change-Id: I860a1b35ac7749d8d0884575f6acb7186ad8e4d0
2021-04-23 12:14:23 +02:00
Translation updater bot abdeec417b Localisation updates from https://translatewiki.net.
Change-Id: I3d7eb7ba99b025e69f139356749fa9c60f078d36
2021-04-23 08:37:17 +02:00
jenkins-bot c3dc5f8e05 Merge "Clean up code enabling individual popup types" 2021-04-22 15:47:08 +00:00
jenkins-bot b3c865f32c Merge "Fix icon placement in reference previews" 2021-04-22 14:38:31 +00:00
Translation updater bot a17b5deb70 Localisation updates from https://translatewiki.net.
Change-Id: I0048cef61d4ea7805e7c873f6b95a10f18cbfd7b
2021-04-22 09:32:05 +02:00
jenkins-bot a6e4fd5def Merge "build: Replace Grunt tasks with npm scripts for eslint, stylelint, banana-checker & svgo." 2021-04-21 23:48:41 +00:00
bwang 2081ab4bf3 build: Replace Grunt tasks with npm scripts for eslint, stylelint, banana-checker & svgo.
Changes of note:
- The doc and node-debug jobs are moved to ensure that all test prefixed
jobs are together in the package.json manifest.
- 2 additional scripts are added (linter:js & linter:styles) to match WVUI's NPM script naming convention.

Bug: T206462
Change-Id: Ib84f93c20f13aefb2d8f8755261b1f14e5902f16
2021-04-21 22:25:17 +00:00
Thiemo Kreuz 25e7143f4c Fix icon placement in reference previews
The icons are all slightly misplaced since Iba5367f (T277663).

This patch also replaces the deprecated variable @iconSize.
This is only about the variable name, the value doesn't change.

Bug: T280762
Change-Id: I9ce00aed5a91a95b64427d63881784196f94169b
2021-04-21 17:50:08 +00:00