Add diff checks feature-flag

This commit is contained in:
tidy-dev 2024-02-07 08:26:48 -05:00
parent 1ec6086e4e
commit 0780dfdad6
2 changed files with 7 additions and 2 deletions

View file

@ -101,3 +101,7 @@ export function enableSectionList(): boolean {
export const enableRepoRulesBeta = () => true
export const enableCommitDetailsHeaderExpansion = () => true
export const enableDiffCheckMarksAndLinkUnderlines = enableBetaFeatures
export const enableDiffCheckMarks = enableDiffCheckMarksAndLinkUnderlines

View file

@ -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
}