Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Develop #945

Merged
merged 14 commits into from
Feb 28, 2024
44 changes: 25 additions & 19 deletions src/ui/pages/container/Label-Studio/AllTaskLSF.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,26 +59,32 @@ const LabelStudioWrapper = ({annotationNotesRef, loader, showLoader, hideLoader,
console.log("projectId, taskId", projectId, taskId);
// debugger

useEffect(() => {
useEffect(() => {
let sidePanel = ProjectDetails?.project_type?.includes("OCRSegmentCategorization");
localStorage.setItem("labelStudio:settings", JSON.stringify({
bottomSidePanel: !sidePanel,
continuousLabeling: false,
enableAutoSave: false,
enableHotkeys: true,
enableLabelTooltips: true,
enablePanelHotkeys: true,
enableTooltips: false,
fullscreen: false,
imageFullSize: false,
selectAfterCreate: false,
showAnnotationsPanel: true,
showLabels: false,
showLineNumbers: false,
showPredictionsPanel: true,
sidePanelMode: "SIDEPANEL_MODE_REGIONS"
}))
}, [])
let showLabelsOnly = ProjectDetails?.project_type?.includes("OCRSegmentCategorization");
let selectAfterCreateOnly = ProjectDetails?.project_type?.includes("OCRSegmentCategorization");
let continousLabelingOnly = ProjectDetails?.project_type?.includes("OCRSegmentCategorization");
localStorage.setItem(
"labelStudio:settings",
JSON.stringify({
bottomSidePanel: !sidePanel,
continuousLabeling: continousLabelingOnly,
enableAutoSave: false,
enableHotkeys: true,
enableLabelTooltips: true,
enablePanelHotkeys: true,
enableTooltips: false,
fullscreen: false,
imageFullSize: false,
selectAfterCreate: selectAfterCreateOnly,
showAnnotationsPanel: true,
showLabels: showLabelsOnly,
showLineNumbers: false,
showPredictionsPanel: true,
sidePanelMode: "SIDEPANEL_MODE_REGIONS",
})
);
}, []);

useEffect(() => {
const showAssignedUsers = async () => {
Expand Down
9 changes: 6 additions & 3 deletions src/ui/pages/container/Label-Studio/LSF.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -218,21 +218,24 @@ const LabelStudioWrapper = ({

useEffect(() => {
let sidePanel = ProjectDetails?.project_type?.includes("OCRSegmentCategorization");
let showLabelsOnly = ProjectDetails?.project_type?.includes("OCRSegmentCategorization");
let selectAfterCreateOnly = ProjectDetails?.project_type?.includes("OCRSegmentCategorization");
let continousLabelingOnly = ProjectDetails?.project_type?.includes("OCRSegmentCategorization");
localStorage.setItem(
"labelStudio:settings",
JSON.stringify({
bottomSidePanel: !sidePanel,
continuousLabeling: false,
continuousLabeling: continousLabelingOnly,
enableAutoSave: true,
enableHotkeys: true,
enableLabelTooltips: true,
enablePanelHotkeys: true,
enableTooltips: false,
fullscreen: false,
imageFullSize: false,
selectAfterCreate: false,
selectAfterCreate: selectAfterCreateOnly,
showAnnotationsPanel: true,
showLabels: false,
showLabels: showLabelsOnly,
showLineNumbers: false,
showPredictionsPanel: true,
sidePanelMode: "SIDEPANEL_MODE_REGIONS",
Expand Down
11 changes: 7 additions & 4 deletions src/ui/pages/container/Label-Studio/ReviewLSF.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -268,23 +268,26 @@ const LabelStudioWrapper = ({
}
}, [userData]); */

useEffect(() => {
useEffect(() => {
let sidePanel = ProjectDetails?.project_type?.includes("OCRSegmentCategorization");
let showLabelsOnly = ProjectDetails?.project_type?.includes("OCRSegmentCategorization");
let selectAfterCreateOnly = ProjectDetails?.project_type?.includes("OCRSegmentCategorization");
let continousLabelingOnly = ProjectDetails?.project_type?.includes("OCRSegmentCategorization");
localStorage.setItem(
"labelStudio:settings",
JSON.stringify({
bottomSidePanel: !sidePanel,
continuousLabeling: false,
continuousLabeling: continousLabelingOnly,
enableAutoSave: false,
enableHotkeys: true,
enableLabelTooltips: true,
enablePanelHotkeys: true,
enableTooltips: false,
fullscreen: false,
imageFullSize: false,
selectAfterCreate: false,
selectAfterCreate: selectAfterCreateOnly,
showAnnotationsPanel: true,
showLabels: false,
showLabels: showLabelsOnly,
showLineNumbers: false,
showPredictionsPanel: true,
sidePanelMode: "SIDEPANEL_MODE_REGIONS",
Expand Down
11 changes: 7 additions & 4 deletions src/ui/pages/container/Label-Studio/SuperCheckerLSF.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -188,23 +188,26 @@ const LabelStudioWrapper = ({
}
}, [userData]); */

useEffect(() => {
useEffect(() => {
let sidePanel = ProjectDetails?.project_type?.includes("OCRSegmentCategorization");
let showLabelsOnly = ProjectDetails?.project_type?.includes("OCRSegmentCategorization");
let selectAfterCreateOnly = ProjectDetails?.project_type?.includes("OCRSegmentCategorization");
let continousLabelingOnly = ProjectDetails?.project_type?.includes("OCRSegmentCategorization");
localStorage.setItem(
"labelStudio:settings",
JSON.stringify({
bottomSidePanel: !sidePanel,
continuousLabeling: false,
continuousLabeling: continousLabelingOnly,
enableAutoSave: false,
enableHotkeys: true,
enableLabelTooltips: true,
enablePanelHotkeys: true,
enableTooltips: false,
fullscreen: false,
imageFullSize: false,
selectAfterCreate: false,
selectAfterCreate: selectAfterCreateOnly,
showAnnotationsPanel: true,
showLabels: false,
showLabels: showLabelsOnly,
showLineNumbers: false,
showPredictionsPanel: true,
sidePanelMode: "SIDEPANEL_MODE_REGIONS",
Expand Down
11 changes: 7 additions & 4 deletions src/ui/pages/container/Label-Studio/labelConfigJSX.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
export const labelConfigJS = `<View>
<Image name="image_url" value="$image_url"/>
<Filter name="filter" toName="annotation_labels"
hotkey="shift+f" minlength="0"
placeholder="Filter Labels" />
<Labels name="annotation_labels" toName="image_url" className="ignore_assertion">
<Label value="paragraph" name="paragraph" background="#55EFC4" className="ignore_assertion"/>
<Label value="figure" name="figure" background="#FFEAA7" className="ignore_assertion"/>
Expand Down Expand Up @@ -40,9 +43,9 @@ export const labelConfigJS = `<View>
<Label value="reference" name="reference" background="#F2D7D9" className="ignore_assertion"/>
<Label value="contact-info" name="contact-info" background="#DAEAF1" className="ignore_assertion"/>
<Label value="website-link" name="website-link" background="#8CC0DE" className="ignore_assertion"/>

</Labels>

<Rectangle name="annotation_bboxes" toName="image_url" strokeWidth="3" className="ignore_assertion"/>

</View>`;
<Relations>
<Relation value="continues-to" selected="true"/>
</Relations>
</View>`;
Loading