Page MenuHomePhabricator

[Spike] Consider the impact of dark mode and font size on user preferences table
Closed, ResolvedPublic0 Estimated Story Points

Description

In T345664 we are considering allowing client preferences to be usable by logged in users. While one motivation for this is to allow different experiences on different devices (e.g. laptop, desktop, tablet) another concern we have is impact on the database which we'll explore as part of this task.

The motivation for this is we expect that at least 15% of users will use a font size preference and a significant amount of users would likely make use of a dark mode (possibly > 50% considering current app usage) [1]. Note we would want light mode to be the default experience for anonymous users and currently it is not possible to have different preference defaults for logged in or anonymous users.

Given we have two skins for mobile and desktop on two very different mediums, we think it is essential that preferences do not apply across skins, so for each of these preferences we would need 2 preferences.

Preps

  • Ask Olga about data we have for dark mode usage in apps to help inform discussion.

Question to answer

  • Would a situation where we have 15% of users have 2 preferences stored for font size, and 50%+ users have 2 preferences stored for dark mode be problematic from a DBA POV? If so, how should we adjust our implementation?

[1] Approximately 60% of accounts on Android and iOS

Outcome

  • Write up a summary of the discussion
  • Create/prioritize any follow up tickets

Event Timeline

Jdlrobson updated the task description. (Show Details)
ovasileva set the point value for this task to 1.

I am so sorry but as things stand right now, I will have to block this. user_properties is exploding (T54777#9139837) but the good news is that growth team is working on fixing its biggest offender (Echo) in T321527: Support conditional defaults for user properties and once that's done we can revisit this (hopefully in a couple of weeks). I also highly recommend getting T346054: Normalize user_properties table done too but it's much more work and more complicated to pull off (https://www.mediawiki.org/wiki/User:ASarabadani_(WMF)/Database_for_devs_toolkit/How-to/Data_migration )

I support any sort of clean up on user_properties in any shape or form. There are many subtasks of T54777.

We (Nat, Olga, I) clarified this in conversation with Amir today.

  • deployment of any new preferences should be blocked on T321527
  • if we decide to move away from user preferences to device preferences in future we can run a maintenance script to remove the preference
Jdlrobson changed the point value for this task from 1 to 0.Sep 25 2023, 5:44 PM