Page MenuHomePhabricator

Special:Search - Ellipsis are added even if the text is very small and there is nothing left
Open, Needs TriagePublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

  • go to special:Search
  • Search for an article that has very little text (less than the 4 lines of text shown in the snippet)

What happens?:
The snippet shows ... at the end of the snippet

What should have happened instead?:
The ellipsis should not have shown as there is nothing extra to be shown

Other information (browser name/version, screenshots, etc.):

image.png (264×848 px, 40 KB)

NOTE: From @SimoneThisDot: This is in PHP Mediawiki not in SearchVue. I am not sure what is the best way to find out the actual article size without having to fetch it. The effort required on the Backend to find out if the snippet is small may be too big for the edge case.

Event Timeline

CBogen added subscribers: Sneha, CBogen.

As per @Sneha if this estimates at a small, we will move forward; if it is M or above we will put back in the backlog.

CBogen renamed this task from Special:Search - Ellipsis are added even if the text is very small and there is nothing left to [S] Special:Search - Ellipsis are added even if the text is very small and there is nothing left.Mar 8 2023, 5:53 PM
CBogen renamed this task from [S] Special:Search - Ellipsis are added even if the text is very small and there is nothing left to Special:Search - Ellipsis are added even if the text is very small and there is nothing left.

I have done some investigation and it seems like this may actually use too many resources and changes for the very low implication it may have.

@matthiasmullie do you have any idea on how we can best solve this? From what I can see the only way would be to reproduce all the logic we did on the Frontend do know where the snippet comes from, compare it with the full text and then know if there is more. This seems to be very resource intensive.

The last point to raise is that this is very unluckily to happen in production as it expects a page to have less than 200 characters in total (that would probably just happen with a placeholder).

Another Idea would be to actually do this from the searchPreview (so it will just take effect on users using the searchPreview extension). We already have all the data and all the logic, we just need to link it to the result in the DOM.

I am going to move this one back to the backlog given the level of effort required.