Skip to content

Commit f8d73f9

Browse files
labels change
1 parent 3a16c71 commit f8d73f9

File tree

4 files changed

+8
-22
lines changed

4 files changed

+8
-22
lines changed

frontend/src/components/Layout/PageLayout.tsx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import { useAuth0 } from '@auth0/auth0-react';
1919
import { showErrorToast } from '../../utils/Toasts';
2020
import { APP_SOURCES } from '../../utils/Constants';
2121
import { createDefaultFormData } from '../../API/Index';
22-
import LoadExistingSchemaDialog from '../Popups/GraphEnhancementDialog/EnitityExtraction/LoadExistingSchema';
22+
import LoadDBSchemaDialog from '../Popups/GraphEnhancementDialog/EnitityExtraction/LoadExistingSchema';
2323
import PredefinedSchemaDialog from '../Popups/GraphEnhancementDialog/EnitityExtraction/PredefinedSchemaDialog';
2424

2525
const GCSModal = lazy(() => import('../DataSources/GCS/GCSModal'));
@@ -437,7 +437,7 @@ const PageLayout: React.FC = () => {
437437
}}
438438
onApply={handleApplyPatternsFromText}
439439
></SchemaFromTextDialog>
440-
<LoadExistingSchemaDialog
440+
<LoadDBSchemaDialog
441441
open={schemaLoadDialog.show}
442442
onClose={() => {
443443
setSchemaLoadDialog({ triggeredFrom: '', show: false });
@@ -467,9 +467,8 @@ const PageLayout: React.FC = () => {
467467
></PredefinedSchemaDialog>
468468
{isLargeDesktop ? (
469469
<div
470-
className={`layout-wrapper ${!isLeftExpanded ? 'drawerdropzoneclosed' : ''} ${
471-
!isRightExpanded ? 'drawerchatbotclosed' : ''
472-
} ${!isRightExpanded && !isLeftExpanded ? 'drawerclosed' : ''}`}
470+
className={`layout-wrapper ${!isLeftExpanded ? 'drawerdropzoneclosed' : ''} ${!isRightExpanded ? 'drawerchatbotclosed' : ''
471+
} ${!isRightExpanded && !isLeftExpanded ? 'drawerclosed' : ''}`}
473472
>
474473
<SideNav
475474
toggles3Modal={toggleS3Modal}

frontend/src/components/Popups/GraphEnhancementDialog/EnitityExtraction/LoadExistingSchema.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ import { extractOptions } from '../../../../utils/Utils';
66
import { useFileContext } from '../../../../context/UsersFiles';
77
import SchemaViz from '../../../../components/Graph/SchemaViz';
88

9-
interface LoadExistingSchemaDialogProps {
9+
interface LoadDBSchemaDialogProps {
1010
open: boolean;
1111
onClose: () => void;
1212
onApply: (patterns: string[], nodeLabels: OptionType[], relationshipLabels: OptionType[], view: string) => void;
1313
}
14-
const LoadExistingSchemaDialog = ({ open, onClose, onApply }: LoadExistingSchemaDialogProps) => {
14+
const LoadDBSchemaDialog = ({ open, onClose, onApply }: LoadDBSchemaDialogProps) => {
1515
const [loading, setLoading] = useState<boolean>(false);
1616
const { setDbPattern, dbPattern, dbNodes, setDbNodes, dbRels, setDbRels } = useFileContext();
1717
const [openGraphView, setOpenGraphView] = useState<boolean>(false);
@@ -127,4 +127,4 @@ const LoadExistingSchemaDialog = ({ open, onClose, onApply }: LoadExistingSchema
127127
);
128128
};
129129

130-
export default LoadExistingSchemaDialog;
130+
export default LoadDBSchemaDialog;

frontend/src/components/Popups/GraphEnhancementDialog/EnitityExtraction/NewEntityExtractionSetting.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ export default function NewEntityExtractionSetting({
7777
const [combinedRels, setCombinedRels] = useState<OptionType[]>([]);
7878
const [isSchemaMenuOpen, setIsSchemaMenuOpen] = useState<boolean>(false);
7979
const schemaBtnRef = useRef<HTMLButtonElement>(null);
80+
8081
useEffect(() => {
8182
const patterns = Array.from(
8283
new Set([...userDefinedPattern, ...preDefinedPattern, ...dbPattern, ...schemaTextPattern])

frontend/src/components/Popups/GraphEnhancementDialog/index.tsx

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ import DeduplicationTab from './Deduplication';
99
import { tokens } from '@neo4j-ndl/base';
1010
import PostProcessingCheckList from './PostProcessingCheckList';
1111
import AdditionalInstructionsText from './AdditionalInstructions';
12-
import { updateLocalStorage } from '../../../utils/Utils';
13-
import { useCredentials } from '../../../context/UserCredentials';
1412

1513
export default function GraphEnhancementDialog({ open, onClose }: { open: boolean; onClose: () => void }) {
1614
const { breakpoints } = tokens;
@@ -19,9 +17,6 @@ export default function GraphEnhancementDialog({ open, onClose }: { open: boolea
1917
setShowTextFromSchemaDialog,
2018
setSchemaLoadDialog,
2119
setPredefinedSchemaDialog,
22-
setSelectedNodes,
23-
setAllPatterns,
24-
setSelectedRels,
2520
setUserDefinedPattern,
2621
setUserDefinedNodes,
2722
setUserDefinedRels,
@@ -37,7 +32,6 @@ export default function GraphEnhancementDialog({ open, onClose }: { open: boolea
3732
setSelectedPreDefOption,
3833
} = useFileContext();
3934
const isTablet = useMediaQuery(`(min-width:${breakpoints.xs}) and (max-width: ${breakpoints.lg})`);
40-
const { userCredentials } = useCredentials();
4135

4236
const orphanNodesDeleteHandler = async (selectedEntities: string[]) => {
4337
try {
@@ -51,10 +45,6 @@ export default function GraphEnhancementDialog({ open, onClose }: { open: boolea
5145
};
5246

5347
const handleOnclose = () => {
54-
// overall
55-
setSelectedNodes([]);
56-
setSelectedRels([]);
57-
setAllPatterns([]);
5848
// User
5949
setUserDefinedPattern([]);
6050
setUserDefinedNodes([]);
@@ -72,10 +62,6 @@ export default function GraphEnhancementDialog({ open, onClose }: { open: boolea
7262
setPreDefinedRels([]);
7363
setPreDefinedPattern([]);
7464
setSelectedPreDefOption(null);
75-
76-
updateLocalStorage(userCredentials!, 'selectedNodeLabels', []);
77-
updateLocalStorage(userCredentials!, 'selectedRelationshipLabels', []);
78-
updateLocalStorage(userCredentials!, 'selectedPattern', []);
7965
onClose();
8066
};
8167

0 commit comments

Comments
 (0)