Page MenuHomePhabricator

[EPIC] Create mechanism for persisting client-side preferences
Closed, ResolvedPublic

Description

What is it?

In working through T327979: Enable persistent fixed width setting for anonymous users, it became apparent that we need a general-purpose solution for storing client-side user preferences that impact page layout and other fundamental pre-render activities. Such a solution could be used for persisting the width persistence itself, but could also be used to store other upcoming layout-related preferences.

This feature generally has the following requirements:

  • Happens early enough to avoid page flashes
  • Persists between refreshes and ideally sessions
  • Works for anonymous users
  • Avoids splitting the cache
  • Takes into account other concerns of Performance and SRE from the outset
  • Is generalizable / can support multiple different kinds of use cases, beyond simple binary storage

End-User Impact

  • (+) Ability to persist preferences that impact user between refreshes and sessions
  • (+) Ability to persist layout-related preferences for anonymous users
  • (+) Prepares us for other potential upcoming use cases for this feature
  • (-) May take longer to implement
  • (-) Requires coordinating between multiple teams

Engineering Impact

  • (+) Ability to store future preferences in this way
  • (+) Enables incorporating performance and SRE concerns into implementation

Design Impact

  • (+) Enables the persistence of future user-focused, layout-related design concerns
  • (-) Depending on the solution, may be constrained to specific kinds of preferences or specific parameters around this storage

Other Impact

  • This will serve as a pilot for how these teams can work together to solve cross-functional and cross-team concerns in a way that is sustainable for the longer term.

What does it block?

  • We have potential upcoming feature work (READ: yet to be prioritized, not necessarily on our roadmap) that needs this ability, including (potentially but not necessarily) other desktop improvements-related layout change persistence, dark mode, and font size preferences.

What does done look like?

  • We have identified an end-state solution that Performance, SRE, and Web all sign off on
  • We have iteratively worked toward this solution by shipping incremental progress toward three client-side preferences
  • We have made subtasks for the identified use cases, and those tasks have been completed.

Phases of Work and Owners / Timeline

  • Phase 1: SRE+Perf+Web meet together to discuss roadmap and timelines, and identify goal end state. This may spin out necessary related spikes.
  • Phase 2: Hardening of the width persistence solution (https://phabricator.wikimedia.org/T327979) and/or other Desktop Improvements-related work.
  • Phase 3: We support a use case identified to be one month out - iterating toward our ideal solution but not necessarily satisfying all criteria for this
  • Phase 4: We support a third use case with a solution that represents agreed-upon best practices.

Cross-Team Dependencies

  • Performance - participation in working group and related conversations, input into performance-related considerations
  • SRE / Data Persistence - participation in working group and related conversations, input into SRE-related considerations
  • SRE / Traffic - participation in working group and related conversations, input into SRE-related considerations
  • Architecture - Participation in meta-discussions about how to approach cross-team collaboration and input

Existing Artifacts

  • See solution implemented here for how we initially solved this using a client-side cookie.

Open Questions

  • What are the limitations and pitfalls of the client-side cookie-based approach?
    • The hope is we can discuss and identify these and arrive at a means of addressing
  • What metrics should we consult related to performance, and how can we work to optimize these together?
    • The hope is we can arrive at specific numbers and means of measuring them.
  • How can we approach working across teams to balance the concerns of each group without a full Technical Decision Forum process?
    • The hope is we can pilot an abbreviated process for moving toward more effective architecture while consulting the relevant parties
  • How can we deliver on necessary Product deliverables while also working toward better longer-term architecture in this space?
    • The hope is that by taking a phased approach we can increasingly improve the quality of this solution in the face of real-world needs.

Event Timeline

NBaca-WMF renamed this task from Create mechanism for persisting client-side preferences to [EPIC] Create mechanism for persisting client-side preferences.Feb 13 2023, 5:56 PM
NBaca-WMF updated the task description. (Show Details)

Change 883243 had a related patch set uploaded (by Jdlrobson; author: Jdlrobson):

[mediawiki/core@master] [POC] Support disabling multiple features in client preferences

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

NBaca-WMF claimed this task.

This will now be handled by means of https://phabricator.wikimedia.org/T333867 , the official TDMP request. I am closing this ticket and moving all subtasks to this other ticket.