File tree Expand file tree Collapse file tree 3 files changed +13
-6
lines changed
Expand file tree Collapse file tree 3 files changed +13
-6
lines changed Original file line number Diff line number Diff line change @@ -24,3 +24,4 @@ GITHUB_APP_ID=123456
2424GITHUB_PRIVATE_KEY_BASE_64 = base 64 encoded version of the private key - see README.md for more info
2525ENCRYPTION_PUBLIC_KEY_BASE_64 = base 64 encoded version of the public key
2626ENCRYPTION_PRIVATE_KEY_BASE_64 = base 64 encoded version of the private key
27+ NEXT_PUBLIC_ENABLE_DIFF_SIDEBAR = true
Original file line number Diff line number Diff line change @@ -11,6 +11,8 @@ import useDiffbarOpen from "@/features/sidebar/data/useDiffbarOpen"
1111import ToggleMobileToolbarButton from "./internal/secondary/ToggleMobileToolbarButton"
1212import { useProjectSelection } from "@/features/projects/data"
1313
14+ const isDiffFeatureEnabled = process . env . NEXT_PUBLIC_ENABLE_DIFF_SIDEBAR === "true"
15+
1416const SecondarySplitHeader = ( {
1517 mobileToolbar,
1618 children
@@ -48,11 +50,13 @@ const SecondarySplitHeader = ({
4850 ) }
4951 </ Stack >
5052 </ Box >
51- < ToggleDiffButton
52- isDiffbarOpen = { isDiffbarOpen }
53- onClick = { setDiffbarOpen }
54- isDiffAvailable = { ! ! specification ?. diffURL }
55- />
53+ { isDiffFeatureEnabled && (
54+ < ToggleDiffButton
55+ isDiffbarOpen = { isDiffbarOpen }
56+ onClick = { setDiffbarOpen }
57+ isDiffAvailable = { ! ! specification ?. diffURL }
58+ />
59+ ) }
5660 </ Box >
5761 { mobileToolbar && (
5862 < Collapse in = { isMobileToolbarVisible } >
Original file line number Diff line number Diff line change @@ -10,6 +10,8 @@ import PrimaryContainer from "./primary/Container"
1010import SecondaryContainer from "./secondary/Container"
1111import RightContainer from "./tertiary/RightContainer"
1212
13+ const isDiffFeatureEnabled = process . env . NEXT_PUBLIC_ENABLE_DIFF_SIDEBAR === "true"
14+
1315const ClientSplitView = ( {
1416 sidebar,
1517 children,
@@ -51,7 +53,7 @@ const ClientSplitView = ({
5153
5254 useKeyboardShortcut ( event => {
5355 const isActionKey = isMac ( ) ? event . metaKey : event . ctrlKey
54- if ( isActionKey && event . key === "k" ) {
56+ if ( isDiffFeatureEnabled && isActionKey && event . key === "k" ) {
5557 event . preventDefault ( )
5658 setRightSidebarOpen ( ! isRightSidebarOpen )
5759 }
You can’t perform that action at this time.
0 commit comments