提交图

74 次代码提交

作者 SHA1 备注 提交日期
Matthias Mullie
6046fbf452 Apply target=_blank in code
This simplifies the message, eliminating complexity
for translators to get the html right, and eliminating
required manual review for such messages.

Bug: T360390
Change-Id: I010ae21283aeb821ce8b0b0bbe29bcabafdb4d55
2024-04-22 09:20:15 +02:00
jenkins-bot
79d8fbb081 Merge "extension.json: Drop 'es6' flag, always true since MediaWiki 1.41" 2024-01-13 02:04:03 +00:00
James D. Forrester
21f7a51152 extension.json: Drop 'es6' flag, always true since MediaWiki 1.41
Change-Id: Iedc65666b8b18430bef78139fdd650692ee32f78
2024-01-12 19:06:25 -05:00
James D. Forrester
a67a49eb4e build: Update MediaWiki requirement to 1.42
All extensions in Wikimedia production are expected to track MediaWiki's release directly.

Change-Id: Ic8bf24025556250cd95399e0b2069c6b91053a96
2024-01-12 18:23:14 -05:00
Umherirrender
2593981080 Use HookHandlers for core hook
The use of "HookHandlers" attribute in extension.json makes it possible
to inject services into hook handler classes in a future patch.

Bug: T346499
Change-Id: I75792b20d0515af668bf6f2df6e96671d0ceebf7
2023-09-18 17:49:04 +00:00
Erik Bernhardson
64821c96a5 Track how long it takes to open a preview
The search platform is working on creating SLI's around various search
use cases, including search previews. Add a metric that times how long
it takes between initiating and finishing a preview load.

Bug: T335499
Change-Id: I79ffae7155ab99180c8cd2d4d7503a1593a5daca
2023-09-06 18:18:57 +00:00
James D. Forrester
568ef19d68 build: Update MediaWiki requirement to 1.41
All extensions in Wikimedia production are expected to track MediaWiki's release directly.

Change-Id: Ifba82a10f7b047c93b081be2a1d69a811a3d9acb
2023-08-19 14:05:38 +08:00
jenkins-bot
fda7e8892c Merge "Remove use of deprecated @vue/composition-api module" 2023-07-07 06:37:14 +00:00
jenkins-bot
825f44cb98 Merge "Avoid LEGO message" 2023-06-29 09:54:40 +00:00
Roan Kattouw
031f3c97ec Remove use of deprecated @vue/composition-api module
Change-Id: I14b7a1d7e2c69cf221478cfae960f6f0d891ba31
2023-06-21 09:39:56 -07:00
Jon Robson
84475f642d Targets are no longer necessary
Bug: T328497
Change-Id: I7aba8b94eb40df539c06aed103bfa7f5607121aa
2023-06-20 15:57:25 +00:00
Simone Cuomo
0f3fbae9f9
Search preview keyboard navigation breaks in certain cases
- [x] Create new store
- [x] Move mouse trap logic in the store
- [x] Unit test the new store

Bug: T333219
Change-Id: I535f5d4daf99b1c4fba0391778f9e25434742cd3
2023-06-12 09:29:59 +01:00
Simone Cuomo
01e97092e6
Remove redundant Targets from extension.json
Change-Id: I0fbc2c43ad9bd511686b7578a9ff453e250069b7
2023-06-12 09:24:29 +01:00
Jon Harald Søby
e11cadced3 Avoid LEGO message
Use string interpolation instead of message concatenation, see
https://www.mediawiki.org/wiki/Help:System_message#Avoid_fragmented_or_'patchwork'_messages

Bug: T338212
Change-Id: Idc034644aca20adab3b79282bcd487102d527f90
2023-06-08 10:11:21 +02:00
Simone Cuomo
1a7f105707
SearchPreview: Migrate Vuex to Pinia
- [x] Migrate store
- [x] Change components to use new store
- [x] Update unit tests

Bug: T318646
Change-Id: Ia16543731c8bfed202a519cc7f0d1b7f06236c3d
2023-05-29 10:31:41 +01:00
jenkins-bot
7e12ac4104 Merge "SearchPreview: Migrate the Event store module from Vuex to Pinia" 2023-05-26 10:52:27 +00:00
gerritbot
15dfb2256d Update moved class FauxRequest
See T321882. Moved in I832b133aaf61ee

Bug: T321681
Change-Id: Ica3fe68bac731571e3d1470c42e8e953abb3621b
2023-05-19 10:25:14 +00:00
Simone Cuomo
289d9d4983
SearchPreview: Migrate the Event store module from Vuex to Pinia
- [x] Add Pinia to the project
- [x] migrate event module
- [x] Change component logic to work with Pinia and Vuex
- [x] Update unit test

Bug: T318646
Change-Id: I287d1d0b3dc8972b92cebba1b7551b9b6adc3faf
2023-05-16 13:37:38 +01:00
Volker E
4bfd1e4b4f styles: Replace 'mediawiki.ui/variables' call with skin variables
Replacing 'mediawiki.ui/variables.less' @import with
new skin-aware 'mediawiki.skin.variables.less' standard.
Also
- replacing several static values with new Codex design token featuring
  skin variables.

Bump to required MediaWiki core version >= v1.41.0.

Bug: T332541
Change-Id: Id7aa30c89a90e9b7974f1758b952c15cd5b73c95
2023-04-25 02:34:47 -07:00
jenkins-bot
03256e66a9 Merge "Quick view - Show the expanded search result snippet" 2023-03-21 10:11:44 +00:00
Simone Cuomo
b02517a45c Quick view - Show the expanded search result snippet
- [x] Expand snippets
- [x] Add New values to the API
- [x] Show Bolded Title on expanded snippets
- [x] Work with Snippets with NO text
- [x] Show original snippet is the text of the article is small
- [x] Add unit test

Bug: T316397
Change-Id: Ie57b79726698c32bf771f5e6dc16240a8a830404
2023-03-20 12:08:40 +01:00
jenkins-bot
a2142d5444 Merge "Mobile Quick View: Show interwiki links for the article" 2023-03-07 15:27:41 +00:00
Simone Cuomo
76ed95bb41 Enhance the way the QuickView links searchResult to QuickView article
- [x] Add prefixed-text to search result HTML from hook
- [x] Change logic to use new attribute instead than Title

Bug: T317639
Change-Id: I7d98a176e9f9872c03f4eae9d03f7ee58a148e99
2023-03-06 14:22:32 +01:00
Matthias Mullie
db5afc2242 Create wiki project interwiki link widgets and add to the quick view panel
- [x] Show interwiki links.
- [x] Make sure commons links are not shown
- [x] Page title linking to the to the page
- [x] Logo + project name localized
- [x] Interwiki links appear at the end of the quick View
- [x] Hide section on mobile
- [x] Update Unit tests

Bug: T307085
Change-Id: Ib7d888baf6a3c4d5e09ef49aff397355578452b1
2023-02-20 16:11:33 +01:00
Matthias Mullie
5804d3def9 Revert "Create wiki project interwiki link widgets and add to the quick view panel"
This reverts commit bd7a277da3.

Reason for revert: Prevent deployment before relevant people had a chance to check it out

Change-Id: I0fc5256bca5160915ba3c0d851a59c8fd6700c6b
2023-02-20 15:46:12 +01:00
Simone Cuomo
f1ea85bfd6
Mobile Quick View: Show interwiki links for the article
-[x] Place the inter-wiki link card after the sections card (or before the commons widget).
-[x] Show the title "Related pages in other projects"
-[x] The above title should be same style and follow same spacing (left, right, top) as the title in section card for visual consistency.
-[x] Show maximum of two link at a time as shown in the mock.
-[x] Tapping on the page title will take users to that page
-[x] The project name should not link anywhere
-[x] Show "view other pages" link with the arrow (as shown in the mock) if there are more than 2 inter-wiki links.
-[x] The link will cycle through all the links within the card. See the prototype for behaviour.
-[x] The "view other pages" link should follow the same spacing (left, right, bottom) as the "more sections" link in section card for visual consistency.
-[x] Update the font style for "+ n more sections" in the sections card to match the one in this ticket (for visual consistency).
-[x] If there are no inter-wiki links for the article do not show this card.
-[x] if the title is too long to fit on the card, use ellipses

Bug: T327540
Change-Id: Id7b7ee7c236b57a58c5519fa54bb906dbd321441
2023-02-20 13:33:29 +00:00
Simone Cuomo
bd7a277da3
Create wiki project interwiki link widgets and add to the quick view panel
- [x] Show interwiki links.
- [x] Make sure commons links are not shown
- [x] Page title linking to the to the page
- [x] Logo + project name localized
- [x] Interwiki links appear at the end of the quick View
- [x] Hide section on mobile
- [x] Update Unit tests

Bug: T307085
Change-Id: Ice619688996ef0c4ec237903c7e086f03ee3931c
2023-02-17 16:09:42 +00:00
jenkins-bot
1be7edf3c9 Merge "Remove mobile conditionals" 2023-02-01 11:27:40 +00:00
Matthias Mullie
488bbde82f Remove mobile conditionals
Bug: T326957
Change-Id: I97f746b3ca02f224d78641da77e8820ffef9ed8f
2023-01-31 11:41:58 +01:00
Simone Cuomo
8a1187e134
Mobile: Show wiki data description of the article in quick view
- [x] Show only description on mobile
- [x] Remove unneeded string
- [x] Cleanup code fro un-used variables

Bug: T320647
Change-Id: I99256756d7d802c20e4d9f540e019988b7b92d74
2023-01-30 15:18:14 +00:00
jenkins-bot
d01603900a Merge "Replace searchSatisfaction in SearchPreview event implementation" 2023-01-23 21:30:26 +00:00
Simone Cuomo
4cdc48fe36 Replace searchSatisfaction in SearchPreview event implementation
- [x] Create a sessionId replacement
- [x] Set the session ID to be generated after every 10 minute hiatus
- [x] update Unit Tests
- [x] Add new event on extension Load

Bug: T326663
Change-Id: Ice7e8a5d05a74ee7c0912be491d9ba3620802fae
2023-01-23 13:09:25 +01:00
Simone Cuomo
fcf719dce1 Enhance search Preview keyboard navigation
- [x] Add aria label to arrow on search result
- [x] Enable Search Preview to be closed with ESC
- [x] Autofocus Dialog and add required aria information

Bug: T326641
Change-Id: I362b8dbd697b99c7e175ae0932bb7fb0e1c1bece
2023-01-17 11:24:55 +00:00
Simone Cuomo
64c381f9b4 Mobile: Loading indicator for search preview
- [x] Refactor App.vue by split it in two Desktop and Mobile
- [x] Add loading requirement on mobile
- [x] Create a new flag (componentReady) and repurpose Visible (due to the way mobile works this was needed)
- [x] Create loading spinner directory to re-use existing functionality within Wikimedia
- [x] Change QuickView to expose a slot to change loading indicator

Bug: T321944
Change-Id: I6b4bbe878dca0342172304a225fcb87cc333ac85
2023-01-11 16:36:58 +01:00
Simone Cuomo
afb79c2645 Immediately add padding-right when searchPreview extension load
- [x] Remove JS code
- [x] More enabled logic in the hook
- [x] Create Stylesheet with style to be loaded immediately
- [x] Rename Styles files to be consistent

Bug: T321871
Change-Id: I36d712d7bec3d48d41853e0a47519b5a5dd0a85f
2022-12-12 11:23:12 +00:00
Simone Cuomo
69484e1232 Opening and scrolling quick view in a fixed window.
- [x] Create dynamic variables
- [x] Change QuickView to have fixed position
- [x] Create composable to help with events triggering

Bug: T324278
Change-Id: Ic28c04c138d51273df76b56b026a14b55ebf7b5b
2022-12-09 12:18:04 +01:00
Simone Cuomo
5bed1bbe3f Create Rest API for SearchVue Commons media data
- [x] Create new rest endpoint
- [x] Change UI to wotk with new api
- [x] Update Unit tests
- [x] Change Abort method as not supported in the RestAPI

Bug: T324446
Change-Id: I70de6363b1fd81471ed912ee4b870afeefa7bcf7
2022-12-08 13:59:12 +00:00
Simone Cuomo
80d309c2ec Create Rest API for SearchVue article data
- [x] Create new Endpoint
- [x] Change UI to use new endpoint
- [x] Update Unit tests

Bug: T324445
Change-Id: Ida192b23a11467ba0f2f4f70ebe8c15948242bbc
2022-12-06 14:50:08 +00:00
jenkins-bot
0d7d1b58d8 Merge "Mobile: Show Commons widget in the quick view panel" 2022-12-01 13:07:17 +00:00
Simone Cuomo
6582561f18 Mobile: Show wiki data description of the article in quick view
- [x] Show the card only if description is set on mobile
- [x]. Define a description text made up of `title`, `descriptiopn` and some connection text
- [x] Define logic to manage text size
- [x] Set ellipsis on overflow cross browser on the 7th line
- [x] Fix small issue on safari on Sections component

Bug: T320647
Change-Id: I80ec7fa4629f51beca62a4d43370f2a2e0cdcf95
2022-12-01 11:10:59 +00:00
jenkins-bot
30b6042c82 Merge "Mobile: Tutorial/message to introduce quick view." 2022-11-30 10:32:00 +00:00
Vadim Kovalenko
dd2838e57e Mobile: Tutorial/message to introduce quick view.
[x] Show the onboarding pop up when the logged in user first sees the results on the special search page.
[x] The onboarding pop up should point at the snippet of the first result.
[x] Show the icon, title and text as shown in the pop up in the mocks.
[x] Have the blue icon pulsate. This is a standard component in design system.
[x] Cross icon on the pop up should close the pop up
[x] Automatically close the pop up when the user clicks on a snippet (any snippet on the page). Also open the preview when the snippet is clicked.
[x] Do not show the onboarding pop up again to the same logged in user.
[x] Logged out users will not see this pop up. (Search previews are enabled by default.)
[x] If the user clicks on any link on the page that takes them to a new page consider the onboarding pop up as seen and hide it next time or if they go back.
[x] Clicking on snippet or performing a new search will hide the pop up and do not show it again.
[x] The code should be simple to remove in the future (e.g. we do not want classes and code scattered everywhere, but in a nice folder with all the info in it)

Bug: T321951
Change-Id: I4658b6e9b98de4c443ddade320c6b80d696ff371
2022-11-30 12:00:27 +02:00
Simone Cuomo
6e04179354 Mobile: Show Commons widget in the quick view panel
- [x] Show only three images from commons
 - [x] Show the title "Related images from Wikmedia Commons" as shown in the design.
- [x] The images should maintain its aspect ratio and fit to the given height.
 Extra wide images should crop so that they are never too wide than the width of the mobile screen.
- [x] If there are fewer than three images show less.
- [x] If there are not images do not show this sections
- [x] If there are more than three images show the link "view more" as shown in the design
- [x] The "view more images" links takes users to to the MediaSearch images results page on commons for that query.
 Tapping on the image will open the media search image preview.
- [x] The quick view panel (if it was previously open before navigating to an article) should stay open when user return to search results using browser back button.

Bug: T321001
Change-Id: I4feef4771f98c62734953a1fe03adbf7d895b553
2022-11-28 12:37:39 +00:00
Simone Cuomo
cf142e013a Update position of SearchVue panel to match interwiki widget position
- [x] Import Mediawiki-ui-base
- [x] Remove added style for small viewport
- [x] Create Resize composable
- [x] Close Quickview on small resize
- [x] Set Search Preview Width to align with interwiki
- [x] Ensure the arrow is always visible when a quick view is openj

Bug: T321376
Change-Id: I86f302b8f24b895c7c9b8e7ef3fcd1a6bd6dc300
2022-11-24 14:26:26 +00:00
Vadim Kovalenko
319c6a4923 Implemented basic logic for event logging instrumentation (T321079).
[x] Create a new action in the store to handle Event
[x] Make sure each event includes all data defined in the schema (see T321069)
[x] Make sure the action logs to the correct stream & schema

Trigger event for SearchPreview is open (T321071)

[x] When a user clicks on a search result and a new search preview open, trigger an event with action "open-searchpreview"
[x] When a user clicks on the same search result DO NOT trigger an event
[?] When an user refresh a page that has Search preview already open (auto open on load) do not trigger an event

Trigger an event when SearchPreview is closed (T321080)

[x] When a user clicks the "x" to close the popup, trigger an event with action "close-searchpreview"
[x] When a user clicks away and the clickview closes, trigger the same action
[x] When an user clicks on another result (on desktop) and the popup closes, trigger the same action
[x] When an user clicks on the same search result and the clickview closes, trigger the same action
[?] When a user leaves the page (while quickview was still open), trigger the same action

Add unit tests

Bug: T321080
Bug: T321071
Bug: T321079

Change-Id: Ia89b1b1957da9eef718a5f536c7770e18f3a6db7
2022-11-14 16:32:35 +02:00
Simone Cuomo
ad6eb3445d Loading content in Search Previews
- [x] Add loading skeleton
- [x] Show loading animation until everything is loaded
- [x] Position search Preview correctly
- [x] Update unit tests
- [x] Update background colour of image placeholders

Bug: T318951
Change-Id: I00cd52214fa9e8a591181d097dd5ad1b66a8d6ff
2022-10-28 11:24:02 +02:00
Matthias Mullie
ea3e015ec2 Add temporary toggle for disabling on mobile
SearchVue will disengage from mounting on mobile unless:
- it is allowed via a URL param (&quickViewEnableMobile=1)
- or in the absense of such manual override, depending on
  it's global config per $wgQuickViewEnableMobile

Bug: T320666
Change-Id: Iaffff1cb8d644827ba70b44512278873ea5bc4c7
2022-10-27 10:16:48 +00:00
Matthias Mullie
22827e9e6e Set aspect ratio ahead of time & remove fixed heights
Also added background color to image component
(only visible while loading)

Also fixed 'close' i18n message.

Bug: T318951
Bug: T319209
Change-Id: I4a8545248e6207f168105f191c647526a404c3fa
2022-10-18 20:35:54 +02:00
Vadim Kovalenko
cd486ed676 Tutorial/message to introduce quick view and inform users of quick view turn on/off option
- [x] Show the onboarding pop up when the logged in user first sees the results on the special search page
- [x] The onboarding pop up should point at the snippet of the first result. (The pop up is a standard component in design system.)
- [x] Show the icon, title and text as shown in the pop up in the mocks
- [x] Have the blue icon pulsate. This is a standard component in design system.
- [x] Show the arrow (the one that shows up on hover) of the first snippet while the onboarding pop up is up
- [x] Close button on the pop up should close the pop up and also hide the arrow next to the first snippet
- [x] Automatically close the pop up when the user clicks on a snippet (any snippet on the page). Also open the preview when the snippet is clicked
- [x] Link to preferences will take users directly into search preference in a new window
- [x] Ensure that any interactions immediately under the pop up are disabled while the pop is up
- [x] Do not show the onboarding pop up again to the same logged in user.
- [x] Logged out users will not see this pop up. (Search previews are enabled by default.)
- [x] If the user clicks on any link on the page that takes them to a new page consider the onboarding pop up as seen and hide it next time or if they go back.
- [x] Clicking on snippet or performing a new search will hide the pop up and do not show it again.
- [x/-] The code should be simple to remove in the future (e.g. we do not want classes and code scattered everywhere, but in a nice folder with all the info in it)

Bug: T311669
Change-Id: Ia24564a6c3a72d492d17e3d89810888676e09478
2022-10-17 15:49:39 +03:00
Vadim Kovalenko
2c7ee3aef9 SearchVue: Update verbiage for 'search preview' config
Implement conditional messages for main and other namespaces related to text
in QuickViewSections template

Bug: T317950
Change-Id: Ibb10cebdfdd0556ffbe72b61e8bf46af0b237501
2022-10-07 07:19:37 +03:00