Commit graph

72 commits

Author SHA1 Message Date
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
Translation updater bot c4079953a1 Localisation updates from https://translatewiki.net.
Change-Id: I3054337ad546420dcee00151e446a7f84a7d0291
2023-08-07 08:39:24 +02:00
Translation updater bot f686f04750 Localisation updates from https://translatewiki.net.
Change-Id: I67bdd2c864bd01da76360e178ae8159267c0d285
2022-11-18 09:19:17 +01:00
Translation updater bot 59e8b2a946 Localisation updates from https://translatewiki.net.
Change-Id: Ia805890e73f53ccdb9af99ae9b314af7d7272071
2022-10-24 08:23:25 +02:00
Translation updater bot f2814744e3 Localisation updates from https://translatewiki.net.
Change-Id: I5834c023b26d12a13bb121a2e581be4fcb3c4666
2022-02-28 14:29:16 +01:00
jenkins-bot f7ddbcaf3c Merge "Renamed settings local from simple to page" 2021-04-26 14:55:28 +00:00
Translation updater bot 35a6a0c938 Localisation updates from https://translatewiki.net.
Change-Id: I4320d7a5678554f600ffbd4316279da7b5eccc11
2021-04-26 08:57:27 +02: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
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
Svantje Lilienthal cf9258b0c5 Changed radio button to checkbox in anonymous user settings window
Bug: T277639
Change-Id: Ifa84dda88a8a167fc8ed2cef17254c1b722ade2d
2021-04-21 14:13:47 +02:00
WMDE-Fisch 190962cc5b Remove dead code around cog wheel dialogue
An "advanced" option was first introduced in 2014 via patch I374805e
(originally named "monitor-or-edit", renamed via patch I7b4f6d2).

The isNavPopupsEnabled() function was added in 2016 via patch
Ic660f48.

The code that disables the extension entirely the moment the NavPopups
gadget is enabled was added in 2017 via patch Ia474b1b (T151058) and
patch Ia837816 (T160081).

As of now, the "advanced" option can only be seen in an extreme edge
case:
* Only for anonymous users.
* Only if NavPopups is enabled by default for anonymous users.
* Only if the $wgPopupsConflictingNavPopupsGadgetName setting is
  misconfigured.
* … or if NavPopups is not a gadget in the first place, but e.g.
  loaded via Common.js.

In this situation the settings dialog opens with all *3* options. This
is broken for several reasons:
* The "simple" option enables the extension, but doesn't disable
  NavPopups. Both trigger, resulting in both popups being displayed
  the same time.
* Since "simple" is the default, this bogus behavior is the default
  for anonymous users.
* The "off" option doesn't stick. Every time the settings dialog opens
  "advanced" is checked instead.
* "Off" can't work anyway. There is no code to disable the gadget.
* Only the "advanced" option "works", but more by accident.

It's unclear how to fix this:
* There is no code that does anything with the "advanced" option. It's
  not even stored. The behavior of the option is identical to "off".
* The code appears as if "advanced" was meant to be shown instead of
  "off". I.e. anonymous users can only choose one of the popups, but
  not disable both. But there is no code to hide the "off" option.
* The bug when both popups are displayed was fixed in 2017 via an
  entirely different mechanism. Re-introducing "advanced" does not
  only mean duplication, it's unclear how the 2 mechanisms are meant
  to work together.

It really, really feels like this was just forgotten.

Bug: T278949
Change-Id: Iab21f3a649a5b2f19ebb0d0dbb45ce1450c65678
2021-04-15 15:29:16 +02:00
Clare Ming 4908f82c01 Add title attribute to settings gear icon
Add message, description, extension for title. Update createPagePreview, renderPagePreview methods to add title attribute to settings gear icon. Add test for title attribute. Increase maxSize, maxAssetSize, maxEntrypointSize. Add compiled js files.

Bug: T274887
Change-Id: Ibb29deb3418569d8283b954b4b22074423e78bda
2021-04-02 13:30:07 -06:00
Andrew Kostka e4e07e509a Separate page and reference preview preferences
Bug: T277638
Change-Id: I8144625e0d3a2626511f35d4e92d082b6fa44bb4
2021-03-29 14:09:27 +02:00
Andrew Kostka 9a7539391f Messages for a separate reference previews preference
Bug: T277638
Change-Id: I8294cea7f8677b8ff09ce7deff3e69ed6e6ea93a
2021-03-24 10:25:56 +01:00
Thiemo Kreuz 919a7a5a30 Don't use {{int:…}} in full sentence messages
Directly referencing other messages is sometimes a good idea,
e.g. in a sentence like "Please look for a button with the
label \"{{int:cancel}}\"."

But here the word is used as part of a sentence. "This is
really not great, because in some languages the word can
change according to grammar." (T276218#6886266)

This patch doesn't change the wording of the messages, and
should not need PM approval. The qqq.json entries are
annotations for tranalators and don't need PM approval either.

The only additional change is that I update the gadget's names
to be their canonical ones everywhere.

Bug: T276218
Change-Id: I8a05f3871fa1d5d0570e1cba90ead29f9ea3b7df
2021-03-05 16:01:00 +01:00
Translation updater bot 39a309ddbc Localisation updates from https://translatewiki.net.
Change-Id: Ie8d5ee5889d0f00a035b3ae1b161b40de5a85b56
2021-03-04 08:39:08 +01:00
Andrew Kostka 82d54945e4 Combine page and reference preview preferences
Update copy and remove unnecessary reference preview preference
in favor of using the default preference. It seems there is no
stable method to link to the subsections on the preference page
for gadgets. So in all cases does the link just point to the
gadgets pref page.

These changes should only be visible when reference previews
are no longer marked as a beta feature.

Bug: T265709
Change-Id: I7b8ab91331092ada04b230315373548673b9272c
2021-02-25 10:21:16 +00:00
Thiemo Kreuz ef4b032513 Add new reference type "note" without an icon
Bug: T274343
Change-Id: Ib9f3fe98baf1d194e686b007a9c535f2b49ac19d
2021-02-11 10:15:36 +01:00
jenkins-bot 46ece02214 Merge "Use a checkbox for the preference" 2020-11-17 12:31:32 +00:00
Adam Wight 789cedc168 Remove reference preview "Jump to reference" link
Now that the footnote label links to the references section, we don't
need this additional link.

Bug: T265482
Change-Id: Ib9b2939eb49e7b826c7699a5b7fa0e8255fa9da1
2020-10-30 11:33:24 +00:00
Bartosz Dziewoński 310d587732 Use a checkbox for the preference
Bug: T174726
Change-Id: Ie7dff009adc97653fdb3106f58ea97d26da49f49
2020-10-28 20:40:25 +01:00
Thiemo Kreuz 1cf721e2a2 Handle collapsible & sortable elements in reference popups
Elements that are marked as collapsible (often tables, but can
actually be anything) are most certainly marked as such because
they are big and don't fit in a popup.

Another plugin makes tables sortable.

In both cases non-functional UI elements appear in the popup.
We decided:
* Hide collapsible elements (no matter if currently collapsed
  or not), and show a placeholder text instead.
* Remove sortable arrows.

This is a baseline patch that solves everything, except the
(i) icon is missing. This will be added in the next patch.

Bug: T220208
Change-Id: I58f3036bf4988d0ebe5716b0a54506446fca10c3
2020-10-28 17:23:12 +01:00
Translation updater bot fdf07a5346 Localisation updates from https://translatewiki.net.
Change-Id: Ia5c5fa216e119f43766ffeea9d85e4fccefec463
2020-04-07 08:47:32 +02:00
Thiemo Kreuz a63a1cf91c Split user preferences for Page and Reference previews
Bug: T233813
Change-Id: I89205658c561961b90abaa133a004e54beebfab5
2019-10-17 11:21:21 +02:00
Translation updater bot 472b10e638 Localisation updates from https://translatewiki.net.
Change-Id: I29a3e248be5c09af55ce9aeb1821ecc5e3b28813
2019-04-05 22:27:35 +02:00
Translation updater bot f688bfebdd Localisation updates from https://translatewiki.net.
Change-Id: I351d1e6523ccdc2acbce3bc7d305acc73c2abed4
2019-03-20 22:27:19 +01:00
Thiemo Kreuz 1d2becc25a Consistently talk about "Reference" instead of "Footnote"
During story time on 2019-03-12 it was decided to consistently talk
about "References" in all messages. Main motivation is that this is
the term the community is most familiar with, and it is also the term
that is used in reference section headings most of the time.

Bug: T215063
Change-Id: Iaab8d2c0da1546a3c9d27bc8e2e1c784050ed135
2019-03-13 09:29:26 +01:00
Andrew Kostka f91c160214 Add a beta feature switch for reference previews
Bug: T215896
Change-Id: I6a4cc2103d594dc11f62da247891d3f190619899
2019-02-25 20:38:12 +01:00
Thiemo Kreuz d81415a040 Add all reference type icons and messages
These icons are currently unused because the gateway does not deliver
the necessary information. This will be used starting with I6223cbb.
This patch aims to introduce all resources needed by the later.

Bug: T214908
Change-Id: Ie0c3c059222700169f2605c3123554c74d974256
2019-02-20 09:32:11 +01:00
Translation updater bot d98bc7151c Localisation updates from https://translatewiki.net.
Change-Id: I51a24682c5fe9be58803ed2835937c3e3219ca04
2019-02-13 22:38:30 +01:00
Johannes Kroll d4d8cefac4 Rename link in footer to "Jump to footnote"
Bug: T215063
Change-Id: I18201bdeee65418ef147203a845f34447c24e163
2019-02-13 16:01:24 +01:00
Thiemo Kreuz 671c39ef4a Add reference preview type
This adds support for preview popups on reference/footnotes from
the Cite extension. For that a new preview type was introduced and
integrated into the existing structures.

The essential starting points were this code comes into action are
added behind the feature flag introduced in the previous patches.

Bug: T213415
Change-Id: Ie0ccb03117bd654373d0f458b62cc52018361c67
2019-01-23 12:12:36 +01:00
Volker E 3cfb1d346a Amend preferences message to unify with messages elsewhere
The other messages when announcing a widget below use a ':' at the
end of line and add extra information in brackets, not on a new line.

Bug: T203992
Change-Id: Ide151e39159df01fa1c97c808bcf7ad29c671580
2018-09-24 16:50:03 -07:00
Volker E 567bd4176f Remove unique and misplaced italicized text from preferences setting
This is the first step, in a second after the OOUI rollout we should also
remove the paragraphs within the `label`, for appearance and HTML validation
reasons.

Bug: T203992
Change-Id: I4a12e4572ae2518079616e3765a5d3954aab794b
2018-09-12 15:44:10 -07:00
Translation updater bot 1704bdbbfe Localisation updates from https://translatewiki.net.
Change-Id: I3d8f684f9379be76a91b3615f33f3f197db7306a
2018-05-08 22:20:39 +02:00
Stephen Niedzielski 007efbef05 Hygiene: remove unused strings
Remove popups-redirects and popups-send-feedback, which are unused. They
appear to be remnants of the code before the rewrite:

- popups-redirects was removed in I42fb9cc1a8b26eaf6807243e4e7bdbf0b56dc35c
- send-feedback was removed in If545873bb97b1da8ea5001dce575b1ef512903fb

Also, add detail to prefs-reading qqq string.

Change-Id: I072d416b2805a2a05e76aa28f083db730e0a523a
2018-04-11 22:47:54 +00:00
Stephen Niedzielski 4dd9df12eb Doc: update some of the popups / preview terminology
Bug: T165036
Change-Id: Id75543d4d886e4cca8278baaf4f4a21c8e4389b7
2018-03-23 11:18:26 +01:00
Stephen Niedzielski c4b50b04ac Hygiene: remove unused resources
In I7395e3438836149becdd576942bdaf6f21b4163f the settings templates
were rewritten so that they no longer displayed an image.

descriptionText and images were dropped from the template but not from
the template provider. These are artifacts from relating to that patch
and are no longer used.

Change-Id: I1be7ef288d37f338e83dab3cf041e628a06608d2
2018-03-21 17:07:18 -05:00
Jan Drewniak 1e946a379d Custom page preview for disambiguation pages
Creating a different page preview for disambiguation pages.

This patch:
- modifies the Preview model to accept a new 'type' property
- modifies the Restbase Gateway to pass the 'type' prop to the Preview model
- creates a new template to accept both generic/disambig previews
- modifies the renderer to render the new template
- generates icons for new template through resource loader
- adds new i18n strings
- modifies event-logging "preview seen" event to send new "disambiguation" previewType
- updates event logging schema version
- adds tests for Preview model and renderer for new preview type
- does way too much? yes, yes it does.

Bug: T168392
Change-Id: Idc936cc3eabbdd99a3d98f43c66b4cdbb7d24917
2018-03-14 11:24:26 -07:00
Translation updater bot 9899f10a2d Localisation updates from https://translatewiki.net.
Change-Id: Ia7a4e7cb6b9778410606fb38e66885f2c1e65d7d
2018-02-27 22:25:54 +01:00
Translation updater bot d4f3afd201 Localisation updates from https://translatewiki.net.
Change-Id: Ifcb8b82ff9d0f5f4862abbd1da72f59f33686c78
2018-01-18 22:49:48 +01:00
Translation updater bot 636bd416a9 Localisation updates from https://translatewiki.net.
Change-Id: Ifd6abb5e3e14b876456e8cea239640686a322cc4
2017-02-15 22:37:46 +01:00
jdlrobson 09ccfa9a13 Remove last modified line
Note this is a breaking change in the sense that it breaks the function
signature for createModel which no longer needs to be passed the last
modified time. Given this change is in the mpga branch at current time
and hasnt been exposed for public use I have deemed this okay.

The change removes tests relating to the last modified bar, removes
lines in the templates and updates existing tests and code to reflect
the new function signature for create model.

Settings icon is floated to right which will be flipped for RTL
users.

Bug: T137775
Change-Id: I7737e37d956c62f1f1c0694d7a25a58d91651f4d
2017-02-02 11:28:11 +00:00
Piotr Miazga 05060a3073 Inform users about conflicting gadgets/customizations
Changes:
 - Added a default help copy under Page Previews enable switch

Bug: T151058
Change-Id: I4f24906147e1e9d8a8f132a9a84606153c8694d7
2017-01-17 20:49:34 +01:00
Piotr Miazga 211f1d1658 Disable Page Previews preferences when NavPopups are enabled
Changes:
 - introduced PopupsGadgetsIntegration class handles all checks
 - show help message on Preferences page when NavPopups is enabled
 - unit test everything

Bug: T151058
Change-Id: Ia474b1b30378efe84dedf3ad47c1f833e88d69b5
2017-01-11 01:06:48 +01:00
Piotr Miazga f597e341af Introduce Opt-In option on user preferences page
This changes introduces new option on Special:Preferences page that
allows users to enable/disable Page Previews feature.
By default feature is disabled. Temporarily option in Preferences
page is smoke and mirrors as switching logic is still WIP.

Bug: T146889
Change-Id: Ifdd17ce265d2d4c7583433ed4991443c563f1fe3
2016-12-16 01:06:59 +01:00
Sam Smith b2f9ffa9b0 previews: Add generic fallback preview
Changes:
* Make the gateway handle missing pages, which are characterised by the
  MediaWiki API response having both the missing property set to truthy
  and the page not having any revisions.
* Add the preview-empty template and associated "mwe-popups-is-empty"
  CSS class, which describe what an empty preview contains and how it
  should look.

Supporting changes:
* Move the original preview template into the ext.popups module.

Bug: T151054
Change-Id: Ife75bf9c6bafdfe0a6cc3e20eea853b4ac8f951b
2016-12-02 12:02:43 +00:00
Sam Smith 89975c4942 Remove mobile support
Note well that mobile support is a consideration in the refactoring
effort (see T149801).

Change-Id: I82adc1550b66d0a456aa299ad6c8d2d097fbb7ae
2016-11-08 09:32:04 +00:00