Page MenuHomePhabricator

[Share Highlights] Unsupported CSS "has" feature
Closed, ResolvedPublic1 Estimated Story Points

Description

The style linter invoked via npm run lint currently emits the following warning:

Running "stylelint:all" (stylelint) task
>> resources/experiments/shareHighlight/styles/app.less
>>   18:1  ⚠  Unexpected browser feature "css-has" is not supported by Edge 79-81,83-104, Firefox 49-120, Chrome 49-81,83-104, Safari 10-15,10.1,11.1,12.1,13.1,14.1,15.1,15.2-15.3, Safari on iOS                                                    plugin/no-unsupported-browser-features

https://caniuse.com/css-has says that Safari & other browsers on iOS <15.4 don't support the feature.
The reported global usage is 0.35%.

Acceptance criteria

  • Check if the feature is supported end exclude from the experiment accordingly

Event Timeline

SherryYang-WMF set the point value for this task to 1.
mfossati renamed this task from iOS Safari bug with "has" in CSS to [Share Highlights] Unsupported CSS "has" feature.May 5 2026, 12:00 PM
mfossati updated the task description. (Show Details)
matthiasmullie moved this task from Backlog to Ready on the Reader Growth Team board.
mfossati changed the task status from Open to In Progress.May 11 2026, 10:24 AM
mfossati claimed this task.
mfossati updated the task description. (Show Details)

Rather than checking for specific devices, I reckon we might prefer to check for support of the feature(s): https://developer.mozilla.org/en-US/docs/Web/API/CSS/supports_static

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

[mediawiki/extensions/ReaderExperiments@master] ShareHighlight: exclude iOS < 15.4

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

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

[mediawiki/extensions/ReaderExperiments@master] ShareHighlight: exclude browsers that don't support CSS has

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

Change #1285873 abandoned by Marco Fossati:

[mediawiki/extensions/ReaderExperiments@master] ShareHighlight: exclude iOS < 15.4

Reason:

In favor of 1286317

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

Change #1286317 merged by jenkins-bot:

[mediawiki/extensions/ReaderExperiments@master] ShareHighlight: exclude browsers that don't support CSS has

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

Change #1286482 had a related patch set uploaded (by Matthias Mullie; author: Matthias Mullie):

[mediawiki/extensions/ReaderExperiments@master] Also skip instrumentation for unsupported browsers

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

Change #1286482 merged by jenkins-bot:

[mediawiki/extensions/ReaderExperiments@master] Also skip instrumentation for unsupported browsers

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

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

[mediawiki/extensions/ReaderExperiments@wmf/1.47.0-wmf.2] ShareHighlight: exclude browsers that don't support CSS has

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

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

[mediawiki/extensions/ReaderExperiments@wmf/1.47.0-wmf.2] Also skip instrumentation for unsupported browsers

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

Change #1286846 merged by jenkins-bot:

[mediawiki/extensions/ReaderExperiments@wmf/1.47.0-wmf.2] ShareHighlight: exclude browsers that don't support CSS has

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

Change #1286847 merged by jenkins-bot:

[mediawiki/extensions/ReaderExperiments@wmf/1.47.0-wmf.2] Also skip instrumentation for unsupported browsers

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

lwatson subscribed.

Verified that the share experiment is not initialized on an unsupported browser (iPad mini, software version 12, Safari). Using the URL param ?mpo=share-highlight:treatment, text selection did not trigger the floating share button.

Bug: The Minerva toolbelt share button is visible. This share button is not functional and should not be visible for unsupported browsers.
Filed follow up: T426360: Share Highlight: hide the share button in Minerva's toolbelt for unsupported browsers