Skip to content
This repository was archived by the owner on Apr 18, 2024. It is now read-only.

feat: LSDV-4708: Removed FF_DEV_1170 outliner feature flag and corresponding components #1337

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
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
1 change: 0 additions & 1 deletion e2e/tests/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ async function initLabelStudio({
'update',
'submit',
'controls',
'side-column',
'topbar',
'annotations:history',
'annotations:current',
Expand Down
65 changes: 0 additions & 65 deletions src/components/AnnotationTab/AnnotationTab.js

This file was deleted.

68 changes: 19 additions & 49 deletions src/components/App/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,14 @@ import '../../tags/visual';
import { TreeValidation } from '../TreeValidation/TreeValidation';
import { guidGenerator } from '../../utils/unique';
import Grid from './Grid';
import { SidebarPage, SidebarTabs } from '../SidebarTabs/SidebarTabs';
import { AnnotationTab } from '../AnnotationTab/AnnotationTab';
import { SidePanels } from '../SidePanels/SidePanels';
import { SideTabsPanels } from '../SidePanels/TabPanels/SideTabsPanels';
import { Block, Elem } from '../../utils/bem';
import './App.styl';
import { Space } from '../../common/Space/Space';
import { DynamicPreannotationsControl } from '../AnnotationTab/DynamicPreannotationsControl';
import { isDefined } from '../../utils/utilities';
import { FF_DEV_1170, FF_DEV_3873, isFF } from '../../utils/feature-flags';
import { FF_DEV_3873, isFF } from '../../utils/feature-flags';
import { Annotation } from './Annotation';
import { Button } from '../../common/Button/Button';

Expand Down Expand Up @@ -216,11 +214,10 @@ class App extends Component {
</Block>
);

const outlinerEnabled = isFF(FF_DEV_1170);
const newUIEnabled = isFF(FF_DEV_3873);

return (
<Block name="editor" mod={{ fullscreen: settings.fullscreen, _auto_height: !outlinerEnabled }}>
<Block name="editor" mod={{ fullscreen: settings.fullscreen }}>
<Settings store={store} />
<Provider store={store}>
{newUIEnabled ? (
Expand All @@ -247,56 +244,29 @@ class App extends Component {
mod={{
viewAll: viewingAll,
bsp: settings.bottomSidePanel,
outliner: outlinerEnabled,
showingBottomBar: newUIEnabled,
}}
>
{outlinerEnabled ? (
isFF(FF_DEV_3873) ? (
<SideTabsPanels
panelsHidden={viewingAll}
currentEntity={as.selectedHistory ?? as.selected}
regions={as.selected.regionStore}
showComments={!store.hasInterface('annotations:comments')}
>
{mainContent}
{isDefined(store) && store.hasInterface('topbar') && <BottomBar store={store} />}
</SideTabsPanels>
) : (
<SidePanels
panelsHidden={viewingAll}
currentEntity={as.selectedHistory ?? as.selected}
regions={as.selected.regionStore}
>
{mainContent}

{isFF(FF_DEV_3873) && isDefined(store) && store.hasInterface('topbar') && <BottomBar store={store} />}
</SidePanels>
)
{isFF(FF_DEV_3873) ? (
<SideTabsPanels
panelsHidden={viewingAll}
currentEntity={as.selectedHistory ?? as.selected}
regions={as.selected.regionStore}
showComments={!store.hasInterface('annotations:comments')}
>
{mainContent}
{isDefined(store) && store.hasInterface('topbar') && <BottomBar store={store} />}
</SideTabsPanels>
) : (
<>
<SidePanels
panelsHidden={viewingAll}
currentEntity={as.selectedHistory ?? as.selected}
regions={as.selected.regionStore}
>
{mainContent}

{viewingAll === false && (
<Block name="menu" mod={{ bsp: settings.bottomSidePanel }}>
{store.hasInterface('side-column') && (
<SidebarTabs active="annotation">
<SidebarPage name="annotation" title="Annotation">
<AnnotationTab store={store} />
</SidebarPage>

{this.props.panels.map(({ name, title, Component }) => (
<SidebarPage key={name} name={name} title={title}>
<Component />
</SidebarPage>
))}
</SidebarTabs>
)}
</Block>
)}

{newUIEnabled && isDefined(store) && store.hasInterface('topbar') && <BottomBar store={store} />}
</>
{isFF(FF_DEV_3873) && isDefined(store) && store.hasInterface('topbar') && <BottomBar store={store} />}
</SidePanels>
)}
</Block>
</Provider>
Expand Down
10 changes: 1 addition & 9 deletions src/components/App/App.styl
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@
flex-direction column
background-color var(--main-bg-color)

&__auto_height
height: auto

&_fullscreen
position absolute
background white
Expand All @@ -36,16 +33,11 @@
.wrapper
flex 1
display grid
grid-template-columns calc(100% - 320px) 320px
grid-template-rows 1fr
align-items stretch
max-width 100%
height calc(100% - var(--topbar-height))

// view all and new UI have only one children, so no grid required
&_view_all
&_outliner
grid-template-columns 100%
grid-template-columns 100%

& .menu
padding-bottom 8px
Expand Down
107 changes: 0 additions & 107 deletions src/components/CurrentEntity/Controls.js

This file was deleted.

16 changes: 0 additions & 16 deletions src/components/CurrentEntity/Controls.styl

This file was deleted.

Loading