mirror of
https://github.com/desktop/desktop
synced 2024-09-13 21:31:32 +00:00
Add a feature flag
This commit is contained in:
parent
ec8f6bfc76
commit
021c324385
|
@ -106,3 +106,5 @@ export const enableDiffCheckMarksAndLinkUnderlines = enableBetaFeatures
|
|||
|
||||
export const enableDiffCheckMarks = enableDiffCheckMarksAndLinkUnderlines
|
||||
export const enableGroupDiffCheckmarks = enableDevelopmentFeatures
|
||||
|
||||
export const enableLinkUnderlines = enableDiffCheckMarksAndLinkUnderlines
|
||||
|
|
|
@ -238,7 +238,7 @@ import {
|
|||
} from './updates/changes-state'
|
||||
import { ManualConflictResolution } from '../../models/manual-conflict-resolution'
|
||||
import { BranchPruner } from './helpers/branch-pruner'
|
||||
import { enableMoveStash } from '../feature-flag'
|
||||
import { enableLinkUnderlines, enableMoveStash } from '../feature-flag'
|
||||
import { Banner, BannerType } from '../../models/banner'
|
||||
import { ComputedAction } from '../../models/computed-action'
|
||||
import {
|
||||
|
@ -2223,7 +2223,10 @@ export class AppStore extends TypedBaseStore<IAppState> {
|
|||
setBoolean(underlineLinksKey, true)
|
||||
}
|
||||
|
||||
this.underlineLinks = getBoolean(underlineLinksKey, underlineLinksDefault)
|
||||
// Always false if the feature flag is disabled.
|
||||
this.underlineLinks = enableLinkUnderlines()
|
||||
? getBoolean(underlineLinksKey, underlineLinksDefault)
|
||||
: false
|
||||
|
||||
this.showDiffCheckMarks = getBoolean(
|
||||
showDiffCheckMarksKey,
|
||||
|
|
|
@ -3,8 +3,8 @@ export enum PreferencesTab {
|
|||
Integrations,
|
||||
Git,
|
||||
Appearance,
|
||||
Accessibility,
|
||||
Notifications,
|
||||
Prompts,
|
||||
Advanced,
|
||||
Accessibility,
|
||||
}
|
||||
|
|
|
@ -43,6 +43,7 @@ import { Prompts } from './prompts'
|
|||
import { Repository } from '../../models/repository'
|
||||
import { Notifications } from './notifications'
|
||||
import { Accessibility } from './accessibility'
|
||||
import { enableLinkUnderlines } from '../../lib/feature-flag'
|
||||
|
||||
interface IPreferencesProps {
|
||||
readonly dispatcher: Dispatcher
|
||||
|
@ -257,10 +258,6 @@ export class Preferences extends React.Component<
|
|||
<Octicon className="icon" symbol={octicons.paintbrush} />
|
||||
Appearance
|
||||
</span>
|
||||
<span>
|
||||
<Octicon className="icon" symbol={octicons.accessibility} />
|
||||
Accessibility
|
||||
</span>
|
||||
<span>
|
||||
<Octicon className="icon" symbol={octicons.bell} />
|
||||
Notifications
|
||||
|
@ -273,6 +270,12 @@ export class Preferences extends React.Component<
|
|||
<Octicon className="icon" symbol={octicons.gear} />
|
||||
Advanced
|
||||
</span>
|
||||
{enableLinkUnderlines() && (
|
||||
<span>
|
||||
<Octicon className="icon" symbol={octicons.accessibility} />
|
||||
Accessibility
|
||||
</span>
|
||||
)}
|
||||
</TabBar>
|
||||
|
||||
{this.renderActiveTab()}
|
||||
|
@ -375,14 +378,6 @@ export class Preferences extends React.Component<
|
|||
/>
|
||||
)
|
||||
break
|
||||
case PreferencesTab.Accessibility:
|
||||
View = (
|
||||
<Accessibility
|
||||
underlineLinks={this.state.underlineLinks}
|
||||
onUnderlineLinksChanged={this.onUnderlineLinksChanged}
|
||||
/>
|
||||
)
|
||||
break
|
||||
case PreferencesTab.Notifications:
|
||||
View = (
|
||||
<Notifications
|
||||
|
@ -441,6 +436,14 @@ export class Preferences extends React.Component<
|
|||
)
|
||||
break
|
||||
}
|
||||
case PreferencesTab.Accessibility:
|
||||
View = (
|
||||
<Accessibility
|
||||
underlineLinks={this.state.underlineLinks}
|
||||
onUnderlineLinksChanged={this.onUnderlineLinksChanged}
|
||||
/>
|
||||
)
|
||||
break
|
||||
default:
|
||||
return assertNever(index, `Unknown tab index: ${index}`)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue