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

Commit

Permalink
fix: LEAP-443: Support small changes in LSF (#298)
Browse files Browse the repository at this point in the history
* Remove `viewingAllPredictions`, that's so legacy

* Remove `panels`, they are not used anymore for a while

* Remove `hydrated`, we don't need it anymore

See HumanSignal/label-studio-frontend#1166

* Trigger LS build

---------

Co-authored-by: hlomzik <[email protected]>
  • Loading branch information
hlomzik and hlomzik authored Feb 20, 2024
1 parent 49e1df7 commit d93fbbf
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 17 deletions.
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

0 comments on commit d93fbbf

Please sign in to comment.