Page MenuHomePhabricator

[anon prefs] Implement inline script
Closed, ResolvedPublic3 Estimated Story PointsBUG REPORT

Description

Part of the anonymous preference specification involves creating an inline script that will load values from a storage mechanism and append class names to the HTML element.
Although this has largely been implemented as part of T331681, this task captures the work needed to update that implementation to reflect the decisions made via the TDMP process.

TBD: *link to finalized design & decision record*

TODO

  • Update inline script
  • Update Vector to use new saving mechanism

developer notes

Please consider cached HTML - best for us to read the cookie and transfer to cookie and remove old cookie

QA

Can skip QA. QA will be performed as part of T341641.

Sign off

  • Update docs
  • Mark as risky change in the next deploy

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes
Jdlrobson added a subscriber: Jdlrobson.

I've asked Mo to push a new patch for this, that describes the new approach for storing/reading client side preferences (this should replace the existing proposal in https://gerrit.wikimedia.org/r/c/mediawiki/core/+/883243)

Change 932819 had a related patch set uploaded (by Mabualruz; author: Mabualruz):

[mediawiki/core@master] [POC] - core - client side preferences

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

Change 933499 had a related patch set uploaded (by Mabualruz; author: Mabualruz):

[mediawiki/skins/Vector@master] [POC] - Vector - client side preferences

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

blocked by https://phabricator.wikimedia.org/T336527, we need to know if Json.parse and 1 hit on local storage is faster than 10 hits on local storage

Change 935873 had a related patch set uploaded (by Mabualruz; author: Mabualruz):

[mediawiki/core@master] [playground] Run a synthetic test for client side preferences

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

Change 935873 abandoned by Mabualruz:

[mediawiki/core@master] [playground] Run a synthetic test for client side preferences

Reason:

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

Change 937092 had a related patch set uploaded (by Mabualruz; author: Mabualruz):

[operations/mediawiki-config@master] Run a synthetic test for client side preferences

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

Change 936818 had a related patch set uploaded (by Mabualruz; author: Mabualruz):

[performance/synthetic-monitoring-tests@master] Run a synthetic test for client side preferences

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

Jdlrobson changed the task status from Open to Stalled.Jul 13 2023, 8:23 PM

Blocked on T341641. I've added a note to that ticket to make sure this gets resolved.

Change 936818 abandoned by Mabualruz:

[performance/synthetic-monitoring-tests@master] Run a synthetic test for client side preferences

Reason:

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

Change 937092 abandoned by Mabualruz:

[operations/mediawiki-config@master] Run a synthetic test for client side preferences

Reason:

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

Change 939312 had a related patch set uploaded (by Mabualruz; author: Mabualruz):

[operations/mediawiki-config@master] Run a synthetic test for client side preferences

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

Change 939323 had a related patch set uploaded (by Mabualruz; author: Mabualruz):

[performance/synthetic-monitoring-tests@master] Run a synthetic test for client side preferences

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

Change 939312 merged by jenkins-bot:

[operations/mediawiki-config@master] Run a synthetic test for client side preferences

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

Mentioned in SAL (#wikimedia-operations) [2023-07-24T13:33:09Z] <samtar@deploy1002> Started scap: Backport for [[gerrit:939312|Run a synthetic test for client side preferences (T336527 T339268)]]

Mentioned in SAL (#wikimedia-operations) [2023-07-24T13:34:36Z] <samtar@deploy1002> samtar and mabualruz: Backport for [[gerrit:939312|Run a synthetic test for client side preferences (T336527 T339268)]] synced to the testservers mwdebug1001.eqiad.wmnet, mwdebug1002.eqiad.wmnet, mwdebug2001.codfw.wmnet, mwdebug2002.codfw.wmnet, and mw-debug kubernetes deployment (accessible via k8s-experimental XWD option)

Mentioned in SAL (#wikimedia-operations) [2023-07-24T13:49:39Z] <TheresNoTime> [[gerrit:939312]] not synced. T336527 T339268

Change 940912 had a related patch set uploaded (by Samtar; author: Samtar):

[operations/mediawiki-config@master] Revert "Revert "Run a synthetic test for client side preferences""

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

Change 940912 merged by jenkins-bot:

[operations/mediawiki-config@master] Revert "Revert "Run a synthetic test for client side preferences""

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

Mentioned in SAL (#wikimedia-operations) [2023-07-24T14:09:24Z] <samtar@deploy1002> Started scap: Backport for [[gerrit:940912|Revert "Revert "Run a synthetic test for client side preferences"" (T336527 T339268)]]

Mentioned in SAL (#wikimedia-operations) [2023-07-24T14:11:03Z] <samtar@deploy1002> samtar: Backport for [[gerrit:940912|Revert "Revert "Run a synthetic test for client side preferences"" (T336527 T339268)]] synced to the testservers mwdebug1001.eqiad.wmnet, mwdebug1002.eqiad.wmnet, mwdebug2001.codfw.wmnet, mwdebug2002.codfw.wmnet, and mw-debug kubernetes deployment (accessible via k8s-experimental XWD option)

Mentioned in SAL (#wikimedia-operations) [2023-07-24T14:23:30Z] <samtar@deploy1002> Finished scap: Backport for [[gerrit:940912|Revert "Revert "Run a synthetic test for client side preferences"" (T336527 T339268)]] (duration: 14m 05s)

Change 939323 merged by jenkins-bot:

[performance/synthetic-monitoring-tests@master] Run a synthetic test for client side preferences

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

@Jdlrobson: The associated project tag got archived but this task is still open and now has no active project tags. Should this task get resolved? Thanks.

Change 942802 had a related patch set uploaded (by Mabualruz; author: Mabualruz):

[mediawiki/core@master] core - client side preferences inline script -- using cookies

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

Change 942802 abandoned by Mabualruz:

[mediawiki/core@master] core - client side preferences inline script -- using cookies

Reason:

POC migrated changes to 932819

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

Jdlrobson added subscribers: Catrope, Krinkle.

With Mo out I'm taking on finishing up this patch. I met with @Catrope today and agreed on some changes which I've now made (https://gerrit.wikimedia.org/r/c/mediawiki/core/+/932819).

Roan is out on Monday so this is likely to sit here until at least Tuesday.
@Krinkle is also involved in the review process.

Change 932819 merged by jenkins-bot:

[mediawiki/core@master] core - client side preferences inline script

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

Jdlrobson updated the task description. (Show Details)

Change 946614 had a related patch set uploaded (by Krinkle; author: Mabualruz):

[mediawiki/core@master] ResourceLoader: Simplify clientpref storage

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

Change 947428 had a related patch set uploaded (by Krinkle; author: Krinkle):

[mediawiki/core@master] ResourceLoader: Add unit test for clientprefs

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

Change 947480 had a related patch set uploaded (by Krinkle; author: Krinkle):

[mediawiki/core@master] ResourceLoader: Document the clientPrefs system and make Skin option

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

Change 946614 merged by jenkins-bot:

[mediawiki/core@master] ResourceLoader: Simplify clientpref storage

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

Jdlrobson updated the task description. (Show Details)

I've marked this as a risky change for next deploy: T343724#9087299 (cc @Jdrewniak

After talking to @Catrope we agreed to postpone several of the follow up changes from @Krinkle to the next deploy to make reverting easier. This is tracked in T344069. All code there is ready to be merged minus some rebasing.