Skip to content

New fixes #1224

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

Merged
merged 9 commits into from
Apr 8, 2025
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
3 changes: 0 additions & 3 deletions frontend/src/components/Auth/Auth.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

import React, { useEffect } from 'react';
import { AppState, Auth0Provider, useAuth0 } from '@auth0/auth0-react';
import { useNavigate } from 'react-router';
Expand Down Expand Up @@ -26,7 +25,6 @@ const Auth0ProviderWithHistory: React.FC<{ children: React.ReactNode }> = ({ chi
};

export const AuthenticationGuard: React.FC<{ component: React.ComponentType<object> }> = ({ component }) => {

const { isAuthenticated, isLoading } = useAuth0();
const Component = component;
const navigate = useNavigate();
Expand All @@ -37,7 +35,6 @@ export const AuthenticationGuard: React.FC<{ component: React.ComponentType<obje
}
}, [isLoading, isAuthenticated]);


return <Component />;
};

Expand Down
2 changes: 2 additions & 0 deletions frontend/src/components/Content.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ const Content: React.FC<ContentProps> = ({
selectedChunk_overlap,
selectedChunks_to_combine,
setSelectedNodes,
setAllPatterns,
setRowSelection,
setSelectedRels,
setSelectedTokenChunkSize,
Expand Down Expand Up @@ -586,6 +587,7 @@ const Content: React.FC<ContentProps> = ({
setUserCredentials({ uri: '', password: '', userName: '', database: '', email: '' });
setSelectedNodes([]);
setSelectedRels([]);
setAllPatterns([]);
localStorage.removeItem('selectedTokenChunkSize');
setSelectedTokenChunkSize(tokenchunkSize);
localStorage.removeItem('selectedChunk_overlap');
Expand Down
12 changes: 3 additions & 9 deletions frontend/src/components/Graph/SchemaViz.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,7 @@ import {
MagnifyingGlassPlusIconOutline,
} from '@neo4j-ndl/react/icons';
import { IconButtonWithToolTip } from '../UI/IconButtonToolTip';
import {
userDefinedGraphSchema,
} from '../../utils/Utils';
import { userDefinedGraphSchema } from '../../utils/Utils';
import { graphLabels, nvlOptions } from '../../utils/Constants';
import ResultOverview from './ResultOverview';
import { ResizePanelDetails } from './ResizePanel';
Expand Down Expand Up @@ -89,7 +87,6 @@ const SchemaViz: React.FunctionComponent<SchemaViewModalProps> = ({
}
}, [debouncedQuery]);


const selectedItem = useMemo(() => {
if (selected === undefined) {
return undefined;
Expand Down Expand Up @@ -140,7 +137,6 @@ const SchemaViz: React.FunctionComponent<SchemaViewModalProps> = ({

const headerTitle = graphLabels.generateGraph;


// Callback
const nvlCallbacks = {
onLayoutComputing(isComputing: boolean) {
Expand Down Expand Up @@ -202,9 +198,7 @@ const SchemaViz: React.FunctionComponent<SchemaViewModalProps> = ({
'aria-labelledby': 'form-dialog-title',
}}
>
<Dialog.Header htmlAttributes={{ id: 'graph-title' }}>
{headerTitle}
</Dialog.Header>
<Dialog.Header htmlAttributes={{ id: 'graph-title' }}>{headerTitle}</Dialog.Header>
<Dialog.Content className='flex flex-col n-gap-token-4 w-full grow overflow-auto border! border-palette-neutral-border-weak!'>
<div className='bg-white relative w-full h-full max-h-full border! border-palette-neutral-border-weak!'>
{loading ? (
Expand Down Expand Up @@ -278,4 +272,4 @@ const SchemaViz: React.FunctionComponent<SchemaViewModalProps> = ({
</>
);
};
export default SchemaViz;
export default SchemaViz;
3 changes: 0 additions & 3 deletions frontend/src/components/Layout/PageLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,6 @@ const PageLayout: React.FC = () => {
const handleApplyPatternsFromText = (newPatterns: string[], nodes: OptionType[], rels: OptionType[]) => {
setSchemaTextPattern((prevPatterns: string[]) => {
const uniquePatterns = Array.from(new Set([...newPatterns, ...prevPatterns]));
// updateLocalStorage(userCredentials!!, 'selectedTuplePatterns', uniquePatterns);
return uniquePatterns;
});
setShowTextFromSchemaDialog({
Expand All @@ -354,7 +353,6 @@ const PageLayout: React.FC = () => {
const handleDbApply = (newPatterns: string[], nodes: OptionType[], rels: OptionType[]) => {
setDbPattern((prevPatterns: string[]) => {
const uniquePatterns = Array.from(new Set([...newPatterns, ...prevPatterns]));
// updateLocalStorage(userCredentials!!, 'selectedTuplePatterns', uniquePatterns);
return uniquePatterns;
});
setSchemaLoadDialog({
Expand All @@ -369,7 +367,6 @@ const PageLayout: React.FC = () => {
const handlePredinedApply = (newPatterns: string[], nodes: OptionType[], rels: OptionType[]) => {
setDbPattern((prevPatterns: string[]) => {
const uniquePatterns = Array.from(new Set([...newPatterns, ...prevPatterns]));
// updateLocalStorage(userCredentials!!, 'selectedTuplePatterns', uniquePatterns);
return uniquePatterns;
});
setPredefinedSchemaDialog({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -377,4 +377,4 @@
// <GraphViewModal open={openGraphView} setGraphViewOpen={setOpenGraphView} viewPoint={viewPoint} />
// </div>
// );
// }
// }
Loading