Skip to content

Commit

Permalink
Update setPref syntax (#577)
Browse files Browse the repository at this point in the history
  • Loading branch information
Barret Rennie authored Mar 6, 2024
1 parent 2205cb2 commit c73e3d4
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions docs/deep-dives/desktop/desktop-pref-experiments.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,21 @@ pref-feature:
string:
description: A variable setting a string pref.
type: string
setPref: test.string
setPref:
branch: user
pref: test.string
int:
description: A variable setting an integer pref.
type: int
setPref: test.int
setPref:
branch: default
pref: test.int
boolean:
description: A variable setting a boolean pref.
type: boolean
setPref: test.boolean
setPref:
branch: user
pref: test.boolean
```
## Experiments vs Rollouts
Expand All @@ -54,13 +60,10 @@ first enrollment, with some caveats:
## Pref branches
By default, values will be set on the default branch. The default branch is not
persisted, so prefs set on the default branch will not be available until Nimbus
completes its startup and loads all its active experiments from disk.
If the feature setting the pref specifies `isEarlyStartup: true`, then the
values will be written to the user branch so that they persisted and available
during early startup on the user branch.
Each variable using `setPref` must specify which branch will be written to.
The default branch is not persisted, so prefs set on the default branch will not
be available until Nimbus completes its startup and loads all its active
experiments from disk.

## User Preference Changes

Expand Down

0 comments on commit c73e3d4

Please sign in to comment.