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 1 commit
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
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
9 changes: 1 addition & 8 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 @@ -41,11 +38,7 @@
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
43 changes: 0 additions & 43 deletions src/components/SidebarTabs/SidebarTabs.js

This file was deleted.

38 changes: 0 additions & 38 deletions src/components/SidebarTabs/SidebarTabs.styl

This file was deleted.

9 changes: 2 additions & 7 deletions src/tags/object/PagedView.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import Types from '../../core/Types';
import Tree from '../../core/Tree';
import { Pagination } from '../../common/Pagination/Pagination';
import { Hotkey } from '../../core/Hotkey';
import { FF_DEV_1170, isFF } from '../../utils/feature-flags';
import { AnnotationMixin } from '../../mixins/AnnotationMixin';

const Model = types.model({
Expand Down Expand Up @@ -143,12 +142,8 @@ const HtxPagedView = observer(({ item }) => {
}, [item.annotation.lastSelectedRegion]);

useEffect(() => {
if (isFF(FF_DEV_1170)) {
document.querySelector('.lsf-sidepanels__content')?.scrollTo(0, 0);
} else {
document.querySelector('#label-studio-dm')?.scrollTo(0, 0);
}

document.querySelector('.lsf-sidepanels__content')?.scrollTo(0, 0);

setTimeout(() => {
hotkeys.addNamed('repeater:next-page', () => {
if (page < totalPages) {
Expand Down
3 changes: 0 additions & 3 deletions src/utils/feature-flags.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
// Outliner + Details
export const FF_DEV_1170 = 'ff_front_1170_outliner_030222_short';

// Fix lag on first video playing start
export const FF_DEV_1265 = 'ff_front_dev_1265_video_start_lag_100322_short';

Expand Down
6 changes: 2 additions & 4 deletions tests/functional/feature-flags.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import * as FLAGS from '../../src/utils/feature-flags';
// import * as FLAGS from '../../src/utils/feature-flags';

export const CURRENT_FLAGS = {
[FLAGS.FF_DEV_1170]: true,
};
export const CURRENT_FLAGS = {};