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

fix: LEAP-443: Support small changes in LSF #298

Merged
merged 6 commits into from
Feb 20, 2024
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
5 changes: 1 addition & 4 deletions src/components/Label/Toolbar/Toolbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,7 @@ export const Toolbar = observer(({ view, history, lsf, isLabelStream, hasInstruc

const task = view.dataStore.selected;

const { viewingAllAnnotations, viewingAllPredictions } =
lsf?.annotationStore ?? {};

const viewAll = viewingAllAnnotations || viewingAllPredictions;
const { viewingAll: viewAll } = lsf?.annotationStore ?? {};

return lsf?.noTask === false && task ? (
<Block name="label-toolbar" mod={{ labelStream: isLabelStream }}>
Expand Down
2 changes: 0 additions & 2 deletions src/sdk/dm-sdk.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
* interfaces: Dict<boolean>,
* instruments: Dict<any>,
* toolbar?: string,
* panels?: Record<string, any>[]
* spinner?: import("react").ReactNode
* apiTransform?: Record<string, Record<string, Function>
* tabControls?: { add?: boolean, delete?: boolean, edit?: boolean, duplicate?: boolean },
Expand Down Expand Up @@ -159,7 +158,6 @@ export class DataManager {
this.showPreviews = config.showPreviews ?? false;
this.polling = config.polling;
this.toolbar = config.toolbar ?? DEFAULT_TOOLBAR;
this.panels = config.panels;
this.spinner = config.spinner;
this.spinnerSize = config.spinnerSize;
this.instruments = prepareInstruments(config.instruments ?? {});
Expand Down
11 changes: 0 additions & 11 deletions src/sdk/lsf-sdk.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
import {
FF_DEV_1752,
FF_DEV_2186,
FF_DEV_2715,
FF_DEV_2887,
FF_DEV_3034,
FF_DEV_3734,
Expand Down Expand Up @@ -163,8 +162,6 @@ export class LSFWrapper {
const queuePosition = queueDone ? queueDone + 1 : queueLeft ? queueTotal - queueLeft + 1 : 1;

const lsfProperties = {
// ensure that we are able to distinguish at component level if the app has fully hydrated.
hydrated: false,
user: options.user,
config: this.lsfConfig,
task: taskToLSFormat(this.task),
Expand Down Expand Up @@ -195,7 +192,6 @@ export class LSFWrapper {
onSelectAnnotation: this.onSelectAnnotation,
onNextTask: this.onNextTask,
onPrevTask: this.onPrevTask,
panels: this.datamanager.panels,
};

this.initLabelStudio(lsfProperties);
Expand Down Expand Up @@ -378,13 +374,6 @@ export class LSFWrapper {
this.lsf.initializeStore(lsfTask);
this.setAnnotation(annotationID, fromHistory || isRejectedQueue);
this.setLoading(false);
if (isFF(FF_DEV_2715)) {
this.setHydrated(true);
}
}

setHydrated(value) {
this.lsf.setHydrated?.(value);
}

/** @private */
Expand Down