Skip to content

Commit

Permalink
feature flag asset graph sidebar
Browse files Browse the repository at this point in the history
  • Loading branch information
salazarm committed Sep 20, 2023
1 parent e245fed commit 3aa9b78
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
1 change: 1 addition & 0 deletions js_modules/dagster-ui/packages/ui-core/src/app/Flags.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export const FeatureFlag = {
flagSidebarResources: 'flagSidebarResources' as const,
flagHorizontalDAGs: 'flagHorizontalDAGs' as const,
flagDisableAutoLoadDefaults: 'flagDisableAutoLoadDefaults' as const,
flagDAGSidebar: 'flagDAGSidebar' as const,
};
export type FeatureFlagType = keyof typeof FeatureFlag;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,8 @@ export const getVisibleFeatureFlagRows = () => [
key: 'Experimental horizontal asset DAGs',
flagType: FeatureFlag.flagHorizontalDAGs,
},
{
key: 'Experimental DAG sidebar',
flagType: FeatureFlag.flagDAGSidebar,
},
];
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ const AssetGraphExplorerWithData: React.FC<WithDataProps> = ({
const findAssetLocation = useFindAssetLocation();
const {layout, loading, async} = useAssetLayout(assetGraphData);
const viewportEl = React.useRef<SVGViewport>();
const {flagHorizontalDAGs} = useFeatureFlags();
const {flagHorizontalDAGs, flagDAGSidebar} = useFeatureFlags();

const [highlighted, setHighlighted] = React.useState<string | null>(null);

Expand Down Expand Up @@ -449,7 +449,7 @@ const AssetGraphExplorerWithData: React.FC<WithDataProps> = ({
</Box>
</Box>
<QueryOverlay>
{showSidebar ? null : (
{showSidebar || !flagDAGSidebar ? null : (
<Tooltip content="Show sidebar">
<Button
icon={<Icon name="panel_show_left" />}
Expand Down Expand Up @@ -497,7 +497,7 @@ const AssetGraphExplorerWithData: React.FC<WithDataProps> = ({
/>
);

if (showSidebar) {
if (showSidebar && flagDAGSidebar) {
return (
<SplitPanelContainer
key="explorer-wrapper"
Expand Down

0 comments on commit 3aa9b78

Please sign in to comment.