This reverts commit 6924a89b07.
Reason for revert: Breaks persistence of setting
for anonymous users.
Change-Id: I3efc20f44281c1c68c4162584388e33bb38c4848
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
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
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
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
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
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
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
- Removes .mw-ui-icon and .mw-ui-icon-element
- Aligns markup/styles between generic and disambiguation previews
- Update padding for generic and disambiguation previews to be the same as other popups, results in minor visual changes
Bug: T341899
Change-Id: I9a58fc6a93160d07452ea6f903e1797dd9421d92
TestUser is expensive and requires DB access because it creates the user
in the test database. That is not needed here. For these tests, a mock
is enough.
Also make PopupsGadgetsIntegrationTest an integration test, to fix a
local failure and in view of I0a04c82250582fed7a66c1e10868d9b4f3823a28.
If a test is testing the integration of X with Y, guess what, it's an
integration test ;-)
Change-Id: Ie8b3376ce97b9ddc67746f7754b92628c5ab9470