Page MenuHomePhabricator

Research what context information we can access to support "auto night mode"
Closed, ResolvedPublic


We're considering adding an option to let users automatically apply the night mode theme to the app. This option is offered by some other apps and could be based on 3 potential triggers:

  1. Ambient brightness level
  2. Nightshift "on/off" status (ie if nightshift is on at the OS level, also apply night mode)
  3. Time chosen by the user

Some apps also offer a geolocation based option, however we don't plan to pursue this.

This spike is to look into what options (particularly for 1 and 2) are technically feasible and potential issues/tradeoffs.

Event Timeline

Third party apps don't have access to the ambient light sensor or night shift status. Third party apps do have access to the current screen brightness and can be notified of screen brightness changes.

I'd lean towards cutting this for v1, or maybe doing a bit more product/design research on the priority for this. My general distaste for being "too clever" leads me to like the brightness slider over the local diurnal cycle.

Is there a way to determine sunrise/sunset from the OS or would we need to use a library/service for that?

@JMinor the app would need to know the user's location to calculate sunrise and sunset times. There's not a built in way to determine this.

JMinor claimed this task.

Thanks. Might just be better off picking an arbitrary time.