Skip to content

Commit

Permalink
feat: hide cell move buttons behind feature flag (#19350)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexpaxton authored Aug 20, 2020
1 parent 0780232 commit 45b1f86
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 10 deletions.
23 changes: 13 additions & 10 deletions ui/src/notebooks/components/panel/NotebookPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import InsertCellButton from 'src/notebooks/components/panel/InsertCellButton'
import PanelVisibilityToggle from 'src/notebooks/components/panel/PanelVisibilityToggle'
import MovePanelButton from 'src/notebooks/components/panel/MovePanelButton'
import NotebookPanelTitle from 'src/notebooks/components/panel/NotebookPanelTitle'
import {FeatureFlag} from 'src/shared/utils/featureFlag'

// Types
import {PipeContextProps} from 'src/notebooks'
Expand Down Expand Up @@ -81,16 +82,18 @@ const NotebookPanelHeader: FC<HeaderProps> = ({id, controls}) => {
justifyContent={JustifyContent.FlexEnd}
>
{controls}
<MovePanelButton
direction="up"
onClick={moveUp}
active={canBeMovedUp}
/>
<MovePanelButton
direction="down"
onClick={moveDown}
active={canBeMovedDown}
/>
<FeatureFlag name="notebook-move-cells">
<MovePanelButton
direction="up"
onClick={moveUp}
active={canBeMovedUp}
/>
<MovePanelButton
direction="down"
onClick={moveDown}
active={canBeMovedDown}
/>
</FeatureFlag>
<PanelVisibilityToggle id={id} />
<RemovePanelButton onRemove={remove} />
</FlexBox>
Expand Down
2 changes: 2 additions & 0 deletions ui/src/shared/selectors/flags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export const OSS_FLAGS = {
notebooks: false,
telegrafEditor: false,
streamEvents: false,
'notebook-move-cells': false,
'notebook-panel--spotify': false,
'notebook-panel--test-flux': false,
disableDefaultTableSort: false,
Expand All @@ -36,6 +37,7 @@ export const CLOUD_FLAGS = {
notebooks: false,
telegrafEditor: false,
streamEvents: false,
'notebook-move-cells': false,
'notebook-panel--spotify': false,
'notebook-panel--test-flux': false,
disableDefaultTableSort: false,
Expand Down

0 comments on commit 45b1f86

Please sign in to comment.