docs/technical/feature-flagging.md
To ensure Desktop along without being blocked on design feedback, we need a way to be able to ship features that are stable but not necessarily ready for general usage. This document outlines what we should flag and how to flag these features.
A preview feature can be considered as:
We're currently focused on user interface changes - new views, significant changes to existing views, and so on. We can revisit this list when we identify other cases where this sort of feature flagging needs to occur.
A beta feature should be:
Beta features are a superset of preview features.
A few reasons:
First add a new function to feature-flag.ts. The function should usually check enableDevelopmentFeatures() or enableBetaFeatures(). Then, at runtime, your code should check your feature flag function and either display the new feature or the existing one.
See pull request integration in #3339 for an example.
This separation and naming scheme makes it easier to clean up the new or old feature once things are stabilized.
Opting-in for preview features
GITHUB_DESKTOP_PREVIEW_FEATURES environment variable to 1Don't have that environment variable? No worries, simply create it. (here's a handy guide for doing that on most major OSs).
Opting-out for preview features
GITHUB_DESKTOP_PREVIEW_FEATURES environment variable