Commit graph

8 commits

Author SHA1 Message Date
WMDE-Fisch c87e6046ff Rename ReferencePreviews i18n keys from Popups
Final step to get the i18n key names align with this extension.

Note that the few community overrides should have a copy of the
keys we're changing here in place so the overrides work for both
variants as long as the deployment is not finished.

Bug: T363156
Change-Id: Idf098d2cb04e8f02247b78e6b4866338eaf02b44
2024-07-18 11:47:14 +00:00
mareikeheuer 7380a861f0 Display reference preview with sub reference
Identify both parent and child reference (reference and extended
reference) and display them in the reference preview popup.

This is a very simple basic implementation so at least avoid that
the sub referenc content is shown without context.

Bug: T239228
Change-Id: I857e1be32db9fd72073015cbba1b1bd37e32085f
2024-06-28 14:23:27 +02:00
Ed Sanders ed1501c577 JSDoc: Update jsdoc-wmf-theme to 1.0.1
Change-Id: I8237dd3aa9ad73dce59e9a9bf001d6af5de8e185
2024-06-10 16:15:48 +01:00
Ed Sanders 5a2154de38 ESLint: Enforce prefer-arrow-callback
Change-Id: I8d96b69e8c15bc8ad84cfb0c511396e5b3e7ac20
2024-06-03 12:31:33 +01:00
thiemowmde e3fdee52aa Separate names for server-side vs. client-side feature flags
The two are different:

* CiteReferencePreviews as specified in extension.json is a feature
flag that allows us to disable the feature entirely. It could be
named "CiteReferencePreviewsFeature" or "CiteEnableReferencePreviews",
but renaming a feature flag that's already in use is hard.

* The client-side flag tells the JavaScript code "you know what, it
was kind of a mistake you got loaded, please stop". This is because
we can not make all decisions before we register the ResourceLoader
module, e.g. if the user has certain gadgets enabled.

Adding the word "Active" is not a huge improvement, but at least
makes the two different now. Suggestions welcome.

Bug: T362771
Change-Id: I0f6a911df8772616ac50c1301f402f77dbe32089
2024-04-30 11:57:47 +00:00
WMDE-Fisch 179d402344 Add ReferencePreviews config checks to Cite extension
PHP classes and test are somewhat copies from the Popups codebase.
Some refactoring was applied. More could be done. Not to sure if
this should happen more in follow ups though.

Could also reduce the complexity of checks on the JS side. Most of
these things can only change on page load. The only dynamic part
left is the anon user setting managed by the Popups extension.

Note, that I needed to add a new PHP config for here although the
other still exists and is needed in the Popups extension. This
will change, when the user settings code also moves.

I guess it's okay for now though. Both settings default to true
and are not overridden in the config repos.

Also needed to add the Gadget extension as phan dependency.

Bug: T362771
Depends-On: Ia028c41f8aaa1c522dfc7c372e1ce51e40933a5e
Change-Id: Ie6e8bc706235724494036c7f0d873f5c996c46e6
2024-04-25 12:50:27 +02:00
Adam Wight f0849b2b17 Internal config variables renamed from Popups to Cite
This updates the easy variables which are set and get within a single
module, these changes should have no effect and don't need to be
coordinated across extensions.

Bug: T362332
Change-Id: Ibbe69c321e9e2b744ec88cebbdc3476d776f5956
2024-04-22 14:31:55 +02:00
Jon Robson dcb513eb0e Move reference previews to Cite extension
The ext.cite.referencePreviews module will transparently replace the
ext.popups.referencePreviews module after this patch.  Configuration
stays in Popups for now, we can migrate it in later work.

CSS classes may be renamed in the future but this will be handled
separately since it could be a breaking change for on-wiki
customizations.

A lot of fancy footwork happens in this patch to emulate a soft
dependency on Popups.  This mechanism doesn't exist explicitly in
either ResourceLoader or QUnit, so lots of workarounds are used, to
conditionally load the module and to dynamically skip dependent tests.

renderer.test.js is fully skipped for now, but can be wired up in
later work.

Bug: T355194
Change-Id: I0dc47abb59a40d4e41e7dda0eb7b415a2e1ae508
2024-03-12 17:43:51 +01:00