Page MenuHomePhabricator

Share Highlight: Page-share (summary text) share links should not include text fragment
Closed, ResolvedPublic2 Estimated Story PointsBUG REPORT

Description

The share dialog will currently always generate #:~:text= text fragments.
This is exactly what we want for shared where the user selected text, but for those opened through the generic <share> toolbelt button, the ones that we populate with article summary text, we do not want that:

  • the user did not intend to share a specific excerpt
  • the generated link contains unnecessary bloat
  • the text fragment is most likely invalid, as summaries strip away part of the content (e.g. reference links)

For shared that are not based on user-selected text, the share uri that is generated should not include a fragment.

Event Timeline

matthiasmullie set the point value for this task to 2.May 5 2026, 4:29 PM
mfossati changed the task status from Open to In Progress.May 8 2026, 10:50 AM

Change #1285404 had a related patch set uploaded (by Marco Fossati; author: Marco Fossati):

[mediawiki/extensions/ReaderExperiments@master] ShareHighlight: don't append the text fragment to the URL if there's no user selection

https://gerrit.wikimedia.org/r/1285404

Change #1285404 merged by jenkins-bot:

[mediawiki/extensions/ReaderExperiments@master] ShareHighlight: don't append the text fragment to the URL if there's no user selection

https://gerrit.wikimedia.org/r/1285404

Etonkovidova subscribed.

The url for a page-share card doesn't include any unnecessary fragments, e.g. https://en.wikipedia.beta.wmcloud.org/wiki/Sun?wprov=shhu0
wprov=shhu0 is added for shareHighlight experiment.