Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/features/projects/view/toolbar/MobileToolbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import { Stack } from "@mui/material"
import Selector from "./Selector"
import { useProjectSelection } from "../../data"

const isDiffFeatureEnabled = process.env.NEXT_PUBLIC_ENABLE_DIFF_SIDEBAR === "true"

const MobileToolbar = () => {
const {
project,
Expand Down Expand Up @@ -31,7 +33,7 @@ const MobileToolbar = () => {
items={version.specifications.map(spec => ({
id: spec.id,
name: spec.name,
hasChanges: !!spec.diffURL
hasChanges: isDiffFeatureEnabled && !!spec.diffURL
}))}
selection={specification.id}
onSelect={selectSpecification}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"
import { faPenToSquare } from "@fortawesome/free-regular-svg-icons"
import { useProjectSelection } from "../../data"

const isDiffFeatureEnabled = process.env.NEXT_PUBLIC_ENABLE_DIFF_SIDEBAR === "true"

const TrailingToolbarItem = () => {
const {
project,
Expand Down Expand Up @@ -62,7 +64,7 @@ const TrailingToolbarItem = () => {
items={version.specifications.map(spec => ({
id: spec.id,
name: spec.name,
hasChanges: !!spec.diffURL
hasChanges: isDiffFeatureEnabled && !!spec.diffURL
}))}
selection={specification.id}
onSelect={selectSpecification}
Expand Down
4 changes: 3 additions & 1 deletion src/features/sidebar/view/SecondarySplitHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ const SecondarySplitHeader = ({
<Box sx={{ position: "relative", flexGrow: 1, overflow: "hidden", minWidth: 0, height: 40 }}>
<Stack direction="row" alignItems="center" sx={{ position: "absolute", right: 0, top: "50%", transform: "translateY(-50%)", whiteSpace: "nowrap" }}>
{children}
<Divider orientation="vertical" flexItem sx={{ marginLeft: 0.5, marginRight: 0.5 }} />
{isDiffFeatureEnabled && (
<Divider orientation="vertical" flexItem sx={{ marginLeft: 0.5, marginRight: 0.5 }} />
)}
{mobileToolbar && (
<ToggleMobileToolbarButton
direction={isMobileToolbarVisible ? "up" : "down"}
Expand Down
2 changes: 1 addition & 1 deletion src/features/sidebar/view/internal/primary/Container.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const PrimaryContainer = ({
}) => {
return (
<>
<InnerPrimaryContainer
<InnerPrimaryContainer
variant="temporary"
width={width}
isOpen={isOpen}
Expand Down