mirror of
https://github.com/desktop/desktop
synced 2024-10-02 14:23:59 +00:00
Add diff checks feature-flag
This commit is contained in:
parent
1ec6086e4e
commit
0780dfdad6
|
@ -101,3 +101,7 @@ export function enableSectionList(): boolean {
|
|||
export const enableRepoRulesBeta = () => true
|
||||
|
||||
export const enableCommitDetailsHeaderExpansion = () => true
|
||||
|
||||
export const enableDiffCheckMarksAndLinkUnderlines = enableBetaFeatures
|
||||
|
||||
export const enableDiffCheckMarks = enableDiffCheckMarksAndLinkUnderlines
|
||||
|
|
|
@ -19,6 +19,7 @@ import { WhitespaceHintPopover } from './whitespace-hint-popover'
|
|||
import { TooltipDirection } from '../lib/tooltip'
|
||||
import { Button } from '../lib/button'
|
||||
import { diffCheck } from '../octicons/diff-check'
|
||||
import { enableDiffCheckMarks } from '../../lib/feature-flag'
|
||||
|
||||
enum DiffRowPrefix {
|
||||
Added = '+',
|
||||
|
@ -402,7 +403,7 @@ export class SideBySideDiffRow extends React.Component<
|
|||
const { showSideBySideDiff, lineNumberWidth, isDiffSelectable } = this.props
|
||||
return (
|
||||
(showSideBySideDiff ? lineNumberWidth : lineNumberWidth * 2) +
|
||||
(isDiffSelectable ? 14 : 0)
|
||||
(isDiffSelectable && enableDiffCheckMarks() ? 14 : 0)
|
||||
)
|
||||
}
|
||||
|
||||
|
@ -545,7 +546,7 @@ export class SideBySideDiffRow extends React.Component<
|
|||
}
|
||||
|
||||
private renderLineNumberCheck(isSelected?: boolean) {
|
||||
if (!this.props.isDiffSelectable) {
|
||||
if (!this.props.isDiffSelectable || !enableDiffCheckMarks()) {
|
||||
return null
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue