This ticket is a follow up ticket to T316396
Note: This is desktop only. For mobile implementation, see T327543.
The purpose of this work is to provide more context to the user in the quick view.
In the initial work we did for the snippet we are showing the same snippet in quick view as seen in search results. Showing what the user has already seen in the search results again in quick view is not very useful. Hence in this ticket is to expand the snippet so that it provides more information to the user without having them to go look for it in the article. The user may still want to read the full article but the expanded snippet can provide a little more context and allow users to assess the relevance of the result.
Ideal solution
-
Expand the snippet to complete sentences for however many sentences there are in the snippet.break into its own ticket
When we are not able to identify the sentence boundaries fall back to conservative solution.
Conservative solution
- Expand snippet such that there is little bit of text from before the snippet and after the snippet that show up in the quick view.
- How much more? Expand in each direction such that actual snippet is no more than X# characters on desktop. However this needs to be flexible so we can try different lengths.
- Show ellipsis before/after the snippet when there is more content available in those directions.
-
If there are sentences in the snippet from different parts of the article add ellipsis between them.break into its own ticket
Implementation note: as of T319291, cirrusdoc now allows filtering based on fields. We will need to expose which field the snippet is part of (it can text, auxiliary_text, file_text, opening_text, ...) so we know which to fetch. See quick-and-dirty POC here: https://gerrit.wikimedia.org/r/838165
For detailed specs to to Figma.