Open Bug 1887112 Opened 11 months ago Updated 4 months ago

Read from prefs set by setPref in getVariable

Categories

(Firefox :: Nimbus Desktop Client, task, P5)

task

Tracking

()

People

(Reporter: beth, Unassigned)

References

(Blocks 6 open bugs)

Details

Attachments

(1 obsolete file)

As part of replacing isEarlyStartup, we need a mechanism for reading variables before the store is ready. This can be accomplished via reading prefs set via setPref directly, (i.e., with Services.prefs.getBoolPref et al) but Nimbus loses the ability to track how and when features are being interacted with.

In the future, we will be adding feature activation events (triggered the first time a feature is accessed through nimbus) and so we want to encourage people to interact through this API where possible, instead of directly reading prefs.

We can accomplish the same features of isEarlyStartup via the following pseudocode:

getVariable(varName): 
  if store is not ready:
      if varName is a setPref variable on the user branch:
        return the value of that pref // default branch values (i.e., via firefox.js) can be used to provide defaults
     throw NS_ERROR_UNAVAILABLE
  return value from store as usual
Blocks: 1887114
Depends on: 1887732
Assignee: nobody → brennie

We actually cannot use this behaviour only during startup, because it will become inconsistent if the pref has a default value.

Summary: Read from prefs set by nimbus before the store is ready → Read from prefs set by setPref in getVariable
Attachment #9396969 - Attachment description: WIP: Bug 1887112 - Read setPref variables from prefs before Nimbus store is ready r?chumphreys → Bug 1887112 - Read setPref variables from prefs r?chumphreys
Attachment #9396969 - Attachment is obsolete: true
Priority: P3 → P5
Assignee: brennie → nobody

It is unclear if we are going to be implementing feature activation events, so this is on hold

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: