Page MenuHomePhabricator

Keys used to store user settings in local storage do not follow one naming convention
Closed, DeclinedPublic


Popups keep two user settings in the browser local storage:

  • is feature enabled for anonymous user under mwe-popups-enabled key
  • preview count under ext.popups.core.previewCount key


The isEnabled is following the old naming convention, preview count new one. We should follow only one naming convention and migrate data from mwe-popups-enabled to ext.popups.core.enabled key.


Both values are stored as a separate object, can we use a one object that keeps both variables?

Event Timeline

Any reasons for it to be one particular way? Given preview count will go away when EventLogging is removed do we need to do anything here or can we wait until that happens?

Migrating localStorage keys usually involves 2 steps:

  • Backwards compatible change that removes the previous key from users localstorage
  • Follow up change to remove the migration code.

(otherwise we pollute user storage unnecessarily which may be restricted in size..)

If we're going to drop the EventLogging then no action is required. I do not have reasons to pick the one way, but I want to make naming consistent across all data stored in localstorage.