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
- 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
Dwell delay varies between popup type so should be part of the
definition. Since this is needed by reference tooltips we should
make this part of the Page preview model. This will allow us to
separate concerns of the architecture and reference tooltips
for better maintenance between WMDE and web team.
Bug: T326692
Change-Id: Ia021c8b90fd69d70c4b33744520bb963a65db036
I also removed the bool on the shouldUseReferencePopupsBetaFeature
method. It was always just used with `true`
Bug: T293072
Change-Id: I1a2d6f912fcac2ac77539581897e0feab489edf0
- check if the element has the function in it before using it
- implementing a native code to get the same result based on polyfill examples
- fix Coverage Block
Bug: T340081
Change-Id: I1c2ce46a88cde6323ab862964062dd722ff5edcb
Includes a bit untangling of the reference and page previews tests
and simplifies the setup.
Bug: T337862
Change-Id: Ia92cccb90fd79d10c5b33744520cb963a65db046
Types should not have spaces in them. In the current example this
results in a page preview element with an additional class "<"\'>"
I'm not sure what this is protecting against since we can trust types
to always be in a sensible class friendly form. It would be better
to throw an error in the mw.popups.register function than allow this.
Change-Id: If08c5162c1ca0fc3db4944092231061e22113263
Allow extensions to register new types of previews via
extension attributes.
Changes:
- The check for reference previews doesn't make sense
as $('a[ href*="#" ]' ) will match any elements with a hash
fragment, so the additional check to Title.getFragment
will not provide a different result. This was introduced in
I9ec57e0fbb0d21beaaa7b359c1c2bef64d2c14f5
- Links that point to themselves are marked with mw-selflink
in MediaWiki so this can use the not selector we already have.
- The new API is used internally and only available via extension
Attributes
- An example is provided in SkinJSON
(https://github.com/jdlrobson/mediawiki-skins-skinjson/pull/14)
Bug: T233099
Change-Id: Iefe98c1f0422dbf034e385b1a41a859d030a2cf4
As part of T310054, we moved article tabs into
the #content area on the beta cluster which caused
the daily tests to fail. As a result the page previews
test is currently expecting a page preview to show
on hovering "Article" which is not the case.
Update selector to target links in the parser
content
Bug: T310313
Change-Id: I0bbccbbfbae458d5c32eaea12f855b832b52491c
The requirement for landscape images is to be at least 320px
wide. The requirement for portrait images is more relaxed,
only 250px high. Images that fall between these two
requirements currently don't show a thumbnail, even if they
could.
This change affects a very specific group of images:
* Square images from 250 x 250 to 319 x 319.
* Landscape images from 251 x 250 to 319 x 250.
* Landscape images from 319 x 250 to 319 x 318.
The most extreme ratio is 319 x 250. This will be cut to
203 x 250. I.e. the absolute extreme are 58px missing left
and right, but never more.
Requested at https://www.mediawiki.org/wiki/Topic:Vwl97pm6as9fuf6k
Additional stories for testing more extreme small images:
* Small Tall - 300x1000px
* Small Short - 300x200px
Update tests accordingly.
Bug: T268999
Change-Id: I811f1c0e7e9b0c30280b36a61cc7831a5b9e58c8
User::getBoolOption() is deprecated and should be replaced with
UserOptionsLookup::getBoolOption()
Bug: T277600
Change-Id: I9a2118a6342bd5f145174428dcfb518cba4e439b
User::setOption() is deprecated and should be replaced with UserOptionsManager::setOption()
Bug: T277818
Change-Id: I5698b4422755a921c9c9c01ce29084ebfe5f5385
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
As well as make some more test code more readable without
changing what the test does.
Bug: T281698
Change-Id: Ia153981d9196b47099ef3880ac334718895fb0fc