Commit graph

3098 commits

Author SHA1 Message Date
jenkins-bot cdede23c59 Merge "Update tests for PHPUnit 9.6" 2023-11-30 23:08:24 +00:00
Ed Sanders c0bf30fb58 Documentation fixes
* Element -> HTMLElement
* JQuery -> jQuery
* Remove `return {void}`

Change-Id: I887dfe98af77358ad4ef4e1c835ccf45c2c64400
2023-11-30 10:38:07 +00:00
Jon Robson 5abc2eed4c Cleanup: Remove non-functional hook
This doesn't work and Popups is not part of the
MediaWiki Language Extension Bundle

Change-Id: I66166ba964fba3a9ece865b701a95b66a924b9b6
2023-11-29 23:40:25 +00:00
jenkins-bot 6d642c38bd Merge "eslint: Enforce no-use-before-define" 2023-11-29 17:38:23 +00:00
jenkins-bot ea42009239 Merge "Update UserOptionsLookup's FQN" 2023-11-29 17:14:37 +00:00
Ed Sanders 2aadb01365 eslint: Enforce no-use-before-define
Only one issue to fix now that we don't error on functions.

Change-Id: Idaee60507557b2a73deaf03d93829b9dade5c1f0
2023-11-29 14:13:12 +00:00
gerritbot 96cea43fe1 Update UserOptionsManager's FQN
User-options related classes are being moved to
the MediaWiki\User\Options namespace in MediaWiki Core;
reflect that change here.

Bug: T352284
Depends-On: I9822eb1553870b876d0b8a927e4e86c27d83bd52
Change-Id: Icb39d3f73e120fd0d9dad5ae362787cd19d47bfb
2023-11-29 12:55:13 +00:00
gerritbot 031ace2dba Update UserOptionsLookup's FQN
User-options related classes are being moved to the MediaWiki\User\Options namespace in MediaWiki Core; reflect that change here.

Bug: T352284
Depends-On: I9822eb1553870b876d0b8a927e4e86c27d83bd52
Change-Id: I0c66220b0ba9501e8ef20a172d21d7e75a19d6cc
2023-11-29 12:39:47 +00:00
Translation updater bot 65d5156e75 Localisation updates from https://translatewiki.net.
Change-Id: Ia0da83b099485cbf565a9ce1bf10715ac5af505a
2023-11-27 08:33:04 +01:00
Daimona Eaytoy d77b6e9992 Update tests for PHPUnit 9.6
- Avoid withConsecutive()

Bug: T342110
Change-Id: I3f07a2f071ddec3f9bbd147b8bfc0d32277203d6
2023-11-27 03:13:29 +01:00
WMDE-Fisch b218a77ca4 Remove all BetaFeature code from ReferencePreviews
The extension is out of beta and will be enabled by default now.
Leaving some hints if we decide to also remove the feature flag.

Bug: T282999
Bug: T351708
Change-Id: I1556b2f3592294d094770ede2c276eddeef8bbe9
2023-11-24 13:07:46 +01:00
thiemowmde 7596165a5d Fix confusing constant names in PHP
The …AFTER_BETA constant is the one we want to keep after we removed
all BetaFeature code. The naming scheme is just confusing.

Safe to rename. Not used anywhere else:
https://codesearch.wmcloud.org/search/?q=REFERENCE_PREVIEWS_PREFERENCE_NAME

We also decided to keep the $wgPopupsReferencePreviews feature flag.
Update the documentation accordingly.

This is split from I1556b2f to make it easier to review.

Bug: T351708
Change-Id: Ifbb41156f2a5a4d8a81e79f613754869c5c89690
2023-11-24 12:51:41 +01:00
Translation updater bot 0018e71804 Localisation updates from https://translatewiki.net.
Change-Id: Ia332c673e1362a1741db7fb5acc5e868a5b8c189
2023-11-22 08:20:29 +01:00
Translation updater bot b29fa65c83 Localisation updates from https://translatewiki.net.
Change-Id: Iaf76660a2e07eaa0bb824f4b4e0adf119f0f51d4
2023-11-21 08:29:42 +01:00
Translation updater bot d628a2a27f Localisation updates from https://translatewiki.net.
Change-Id: Ib8304901106e589f47afdac52e74e74dd2d8f85b
2023-11-20 08:52:04 +01:00
Translation updater bot 22b3e7e8e0 Localisation updates from https://translatewiki.net.
Change-Id: Ib273b5fadd4622974f98e42e10bb293573aca1f3
2023-11-16 09:09:51 +01:00
Translation updater bot 105288a0da Localisation updates from https://translatewiki.net.
Change-Id: Iebc9394150c97557d9e23c4741879fef22afc964
2023-11-15 15:44:01 +01:00
Translation updater bot 5f9430137b Localisation updates from https://translatewiki.net.
Change-Id: I8cf5a8e97109bcbba1dc3fb7c8ff1b01ada4e411
2023-11-13 08:42:07 +01:00
Jon Robson 31e416ba68 Allow disambiguation previews to render when no summary found
This allows preview types to override the default behaviour
which prohibits previews from rendering when the API finds no
extract. In the case of disambiguation pages the summary is not
required to render a preview.

Bug: T346686
Change-Id: Ifb8bbef943b02dfa971e2af96511ac708733bdd1
2023-11-09 13:02:51 -08:00
Ed Sanders bf3600f20a Convert nycrc from JSON to JS to allow comments
Change-Id: Ib3c3b8b2f5f87b5f00dcf8b718a0d1bf07948c56
2023-11-09 11:36:11 +00:00
Ed Sanders 461f949823 build: Update linters
Also restructure eslint config so that
* root files are linted with server rules
* src and tests share config

Change-Id: Ie4d0731ba9670af7f3e60cdfe3c4e331386b17c6
2023-11-09 11:36:08 +00:00
Translation updater bot 8cd688cb70 Localisation updates from https://translatewiki.net.
Change-Id: I3107389e206ae786a8e1abba9d6e030e51f37e3a
2023-11-06 08:57:18 +01:00
Jdlrobson 46d9c97180 Removing mw.ui.checkbox dependency (take 2)
This reverts commit af90386c67.

Reason for revert: The codex-styles module is now only loaded when
the settings cog is clicked.

Bug: T348069
Change-Id: I1d3c3a7b5c74c3e2d64765274468e48c014a4047
2023-10-27 16:46:40 -07:00
Jdlrobson af90386c67 Revert "Removing mw.ui.checkbox dependency"
This reverts commit 85d9a7b0ed.

Reason for revert: Unexpected visual change flagged by Pixel.
We're now loading BOTH codex search and Codex
styles on page load (the latter via JavaScript). This results in
a visual regression in the sidebar as the message box for
languages switches from MediaWiki UI to Codex. I am not 100% sure
what the right approach is here, but we should pause to assess
given this new learning.

Possible options
1) Add checkbox styles to codex-search bundle
2) Load codex-styles on page load instead of codex-search
3) Delay the loading of the codex-styles until the overlay is
rendering
4) Wait until Codex has code splitting.

Change-Id: I633364fea54b048492c6bde10b4c4cc8ab99b9ae
2023-10-27 21:59:46 +00:00
Jan Drewniak 85d9a7b0ed Removing mw.ui.checkbox dependency
wRemoves deprecated mw.ui.checkbox dependency
in favour of the `codex-styles` module.

Replaced checkbox markup in setting dialog accordingly.

Bug: T348069
Change-Id: I456a1c35cfc16703648c849917157258df67b224
2023-10-25 15:08:36 -04:00
Translation updater bot 8eb0e05dfc Localisation updates from https://translatewiki.net.
Change-Id: I03a362e7269ebd60c7fbfd1dbd356b63b13ce580
2023-10-24 09:38:25 +02:00
Translation updater bot 20cb4f5713 Localisation updates from https://translatewiki.net.
Change-Id: I739eeecc318d3fb3c85386cd160f337d0f5e8959
2023-10-20 09:20:30 +02:00
Jon Robson a6a65204c6 Revert "Generalize settings code"
This reverts commit 6924a89b07.

Reason for revert: Breaks persistence of setting
for anonymous users.

Change-Id: I3efc20f44281c1c68c4162584388e33bb38c4848
2023-10-19 14:13:15 -07:00
jwbth f504232535 Update excluded selector to its current name in OOUI
OO.ui.ButtonedElement has been renamed to OO.ui.ButtonElement 9 years
ago in I1abecd8aaf694799e4e46acb07afbdfb458a4882 together with its
classes. This change updates the class name in the list of selectors
that don't trigger a popup (EXCLUDED_LINK_SELECTORS) to its current
name.

Bug: T348893
Change-Id: I9b93ce62e0664ba06a14d71477afc0be4fae2fd4
2023-10-19 13:43:49 -07:00
Jon Robson 6924a89b07 Generalize settings code
A new REGISTER_SETTING action replaces the BOOT action for
registering settings. This allows custom preview types to be
associated with a setting. They do this by adding the enabled
property to the module they provide to mw.popups.register

Every time the new action is called, we refresh the settings
dialog UI with the new settings.

Previously the settings dialog was hardcoded, but now it is generated
from the registered preview types by deriving associated messages
and checking they exist, so by default custom types will not show
up in the settings.

Benefits:
* This change empowers us to add a setting for Math previews to allow
them to be enabled or disabled.
* Allows us to separate references as its own module

Additional notes:
* The syncUserSettings.js changeListener is no longer needed as the logic
for this is handled inside the "userSettings" change listener in response to
the "settings" reducer which is responding to
SETTINGS_CHANGE and REGISTER_SETTING actions.

Upon merging:
* https://www.mediawiki.org/wiki/Extension:Popups#Extensibility will be
updated to detail how a setting can be registered.

Bug: T334261
Bug: T326692
Change-Id: Ie11057052fb9035944f2b79a17fb486f97102994
2023-10-17 15:08:15 +00:00
jenkins-bot 9cfd3358aa Merge "mw.popups.isEnabled should always return boolean" 2023-10-16 18:08:29 +00:00
Jon Robson 614039b7df mw.popups.isEnabled should always return boolean
Mismatch between documentation and function signature

Bug: T346106
Change-Id: I43e0efc67b76496aab228b3f971db795662337cf
2023-10-16 10:44:43 -07:00
Translation updater bot 57dd6314fb Localisation updates from https://translatewiki.net.
Change-Id: I13275fdc9a8b54c53ea8c6356d4dcdbc23871d3e
2023-10-16 09:16:23 +02:00
Translation updater bot 430e5d8ac7 Localisation updates from https://translatewiki.net.
Change-Id: I993d0dee6d1bcf38d9c7f28754ad465742a5c3d5
2023-10-09 08:56:46 +02:00
WMDE-Fisch 90a829179c Better support RTL direction extracts in ReferencePreviews
When the user sets a different language than the projects content
language, ReferencePreviews were rendered LTR. By using the bdi
tag this behavior is fixed.

Note that PagePreviews gets language and direction from the
TextExtracts response and use them to achive the same. The latter
is not straight forward available for ReferencePreviews so I'm
using bdi to achieve the same.

Bug: T345833
Change-Id: I6554e6e1db3aac06c04c9185500e05de238adde2
2023-10-04 15:28:00 +02:00
Translation updater bot 8fa9b56518 Localisation updates from https://translatewiki.net.
Change-Id: I6aa11276004bcc872f16cef616a90c6f5daa9687
2023-10-03 09:33:09 +02:00
Jon Robson 6d0cdc9e45 Disable error logging
The rate is unexpected:  over 5 million in the last 7 days
I don't time to investigate this further so suggest disabling this
for now.

Change-Id: Ie55d1da1652239ad4f6ea94743d6efdd12de9974
2023-09-27 08:47:35 -07:00
jenkins-bot 6d78d364d9 Merge "Disable reference previews when the navigation popups gadget is used" 2023-09-26 15:01:33 +00:00
WMDE-Fisch 62510a4fba [build] Bump wdio-mediawiki to v2.3.0
Change-Id: Id5ab1b832e48cc9c211278f32354ca97ca3b693f
2023-09-26 14:22:42 +00:00
WMDE-Fisch 26c0e592a5 Disable reference previews when the navigation popups gadget is used
Otherwise we will have two popups for references when hovering.

Bug: T347391
Change-Id: I8332e9fe6e214b2bd3491adb2bedcae2870f34c7
2023-09-26 14:44:05 +02:00
Jon Robson a11d459ef1 Selenium: More explicitly target reference links
The previous selector in the case of the first reference link
matches two elements - one in the "Reference links" section
and one in the "References" section.

My hunch is this leads to the test failures we have been seeing

Bug: T344072
Change-Id: Icda37b4f46add4049344f7a8c452082d7b0df5c8
2023-09-21 22:48:43 +00:00
jenkins-bot 0d591abfe7 Merge "Disable error logging for missing settings cog on references beta feature" 2023-09-15 18:50:08 +00:00
Jon Robson 76c0504223 Disable animations in storybook
Needed for chromatic

Change-Id: I372c2a91f698738569ffdc0099508007056684ed
2023-09-15 18:15:08 +00:00
Jon Robson 961778b3c5 Disable error logging for missing settings cog on references beta feature
Bug: T346404
Change-Id: I36b1759f6d00ff6ce584a1bc1ac68dedd633fc6a
2023-09-15 09:49:30 -07:00
Jon Robson e69309d5a2 Remove unhelpful comment
The graphic shown when disabling page previews is not an icon
so it's unhelpful to refer to the deprecated mw-ui-icon library.

Bug: T345653#9168342
Change-Id: I083b3d05fd9629c4c2a773a4805e330cfc2a6a53
2023-09-14 14:44:34 -07:00
bwang 154912e5db Rename icon classes in Popups to use popups-icon prefix instead of mw-ui-icon, replace resource loader icons with codex
Bug: T345653
Change-Id: I19b9861850064df50d6b88cda748feff6231091c
2023-09-12 10:56:53 -05:00
Translation updater bot ad94a23b4f Localisation updates from https://translatewiki.net.
Change-Id: If6ddd8765ca19f40bcee62aa16a34a892b2fab98
2023-09-11 09:04:48 +02:00
thiemowmde 8c5120c2a6 Fix settings button not working on reference previews
Apparently caused by a mistake in I8697232, and the QA for T340256 not
covering the full functionality of what was changed in the patch.

Bug: T345829
Change-Id: I482d32183ef7f2226c7ad114be0fbaf97bc7b898
2023-09-08 23:45:29 +00:00
James D. Forrester a8557a7042 tests: Raise jQuery requirement from v3.6.1 to v3.7.1
Matches MediaWiki change d3d0a363d1f8c70cfa2e880d24182c050ad9bf78.

Change-Id: I948042fb0c4e19d9162680a4fa3e5ae024393859
2023-09-07 16:14:29 +00:00
bwang c973629507 Simplify pointer spacing CSS and clean up CSS
Bug: T330570
Change-Id: I52e4c4a53e53092bf49d0801df7d5b3d765239c0
2023-09-07 16:07:28 +00:00