diff --git a/README.md b/README.md
index 9ef82b12..e7dc628f 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,5 @@
@@ -10,14 +10,14 @@
React + Django based web portal for editing RSForm schemas.
This readme file is used mostly to document project dependencies
-# Contributing notes
+# ❤️ Contributing notes
!BEFORE PUSHING INTO MAIN!
- use Test config in VSCode to run tests before pushing commits / requests
- cd rsconcept/frontend & npm run build
-# Frontend stack & Tooling [Vite + React + Typescript]
+# ✨ Frontend stack & Tooling [Vite + React + Typescript]
npm install
@@ -78,7 +78,7 @@ This readme file is used mostly to document project dependencies
-# Backend stack & Tooling [Django + PostgreSQL/SQLite]
+# ✨ Backend stack & Tooling [Django + PostgreSQL/SQLite]
- [ConceptCore](https://github.com/IRBorisov/ConceptCore)
@@ -115,7 +115,7 @@ This readme file is used mostly to document project dependencies
-# DevOps
+# ✨ DevOps
- Docker compose
- PowerShell
@@ -124,7 +124,7 @@ This readme file is used mostly to document project dependencies
# Developer Notes
-## Local build (Windows 10+)
+## 🔭 Local build (Windows 10+)
- this is main developers build
- Install Python 3.12, NodeJS, VSCode, Docker Desktop
@@ -132,7 +132,7 @@ This readme file is used mostly to document project dependencies
- run rsconcept/backend/LocalEnvSetup.ps1
- use VSCode configs in root folder to start development
-## Development build
+## 🔭 Development build
- this build does not use HTTPS and nginx for networking
- backend and frontend debugging is supported
@@ -146,7 +146,7 @@ This readme file is used mostly to document project dependencies
- provide TLS certificate (can be self-signed) 'nginx/cert/local-cert.pem' and 'nginx/cert/local-key.pem'
- run via 'docker compose -f "docker-compose-prod-local.yml" up --build -d'
-## Production build
+## 📦 Production build
- provide proper pyconcept wheel (ConceptCore) at 'rsconcept/backend/import/\*.whl'
- provide secrets: 'secrets/db_password.txt', 'django_key.txt', 'email_host.txt', 'email_password.txt', 'email_user.txt'
diff --git a/rsconcept/frontend/src/pages/RSFormPage/EditorTermGraph/EditorTermGraph.tsx b/rsconcept/frontend/src/pages/RSFormPage/EditorTermGraph/EditorTermGraph.tsx
index 60310e8f..e98954f7 100644
--- a/rsconcept/frontend/src/pages/RSFormPage/EditorTermGraph/EditorTermGraph.tsx
+++ b/rsconcept/frontend/src/pages/RSFormPage/EditorTermGraph/EditorTermGraph.tsx
@@ -2,11 +2,11 @@
import clsx from 'clsx';
import { AnimatePresence } from 'framer-motion';
-import { useCallback, useLayoutEffect, useMemo, useState } from 'react';
+import { useCallback, useLayoutEffect, useMemo, useRef, useState } from 'react';
import InfoConstituenta from '@/components/info/InfoConstituenta';
import SelectedCounter from '@/components/info/SelectedCounter';
-import { GraphEdge, GraphLayout, GraphNode } from '@/components/ui/GraphUI';
+import { GraphCanvasRef, GraphEdge, GraphLayout, GraphNode } from '@/components/ui/GraphUI';
import Overlay from '@/components/ui/Overlay';
import { useConceptOptions } from '@/context/OptionsContext';
import DlgGraphParams from '@/dialogs/DlgGraphParams';
@@ -51,6 +51,7 @@ function EditorTermGraph({ onOpenEdit }: EditorTermGraphProps) {
const [showParamsDialog, setShowParamsDialog] = useState(false);
const filtered = useGraphFilter(controller.schema, filterParams);
+ const graphRef = useRef(null);
const [hidden, setHidden] = useState([]);
const [layout, setLayout] = useLocalStorage(storage.rsgraphLayout, 'treeTd2d');
@@ -176,6 +177,7 @@ function EditorTermGraph({ onOpenEdit }: EditorTermGraphProps) {
const graph = useMemo(
() => (
),
[
+ graphRef,
edges,
nodes,
controller.selected,
diff --git a/rsconcept/frontend/src/pages/RSFormPage/EditorTermGraph/TermGraph.tsx b/rsconcept/frontend/src/pages/RSFormPage/EditorTermGraph/TermGraph.tsx
index 02c4a358..cb73d606 100644
--- a/rsconcept/frontend/src/pages/RSFormPage/EditorTermGraph/TermGraph.tsx
+++ b/rsconcept/frontend/src/pages/RSFormPage/EditorTermGraph/TermGraph.tsx
@@ -1,6 +1,6 @@
'use client';
-import { useCallback, useLayoutEffect, useMemo, useRef } from 'react';
+import { RefObject, useCallback, useLayoutEffect, useMemo } from 'react';
import GraphUI, { GraphCanvasRef, GraphEdge, GraphLayout, GraphNode, useSelection } from '@/components/ui/GraphUI';
import { useConceptOptions } from '@/context/OptionsContext';
@@ -9,6 +9,7 @@ import { graphDarkT, graphLightT } from '@/styling/color';
import { PARAMETER, resources } from '@/utils/constants';
interface TermGraphProps {
+ graphRef: RefObject;
nodes: GraphNode[];
edges: GraphEdge[];
selectedIDs: ConstituentaID[];
@@ -26,6 +27,7 @@ interface TermGraphProps {
}
function TermGraph({
+ graphRef,
nodes,
edges,
selectedIDs,
@@ -39,7 +41,6 @@ function TermGraph({
onDeselect
}: TermGraphProps) {
const { calculateHeight, darkMode } = useConceptOptions();
- const graphRef = useRef(null);
const { selections, setSelections } = useSelection({
ref: graphRef,
@@ -81,7 +82,7 @@ function TermGraph({
useLayoutEffect(() => {
graphRef.current?.resetControls(true);
graphRef.current?.centerGraph();
- }, [toggleResetView]);
+ }, [toggleResetView, graphRef]);
useLayoutEffect(() => {
const newSelections = nodes.filter(node => selectedIDs.includes(Number(node.id))).map(node => node.id);
diff --git a/rsconcept/frontend/src/pages/RSFormPage/RSEditContext.tsx b/rsconcept/frontend/src/pages/RSFormPage/RSEditContext.tsx
index 0f78325d..804c0f89 100644
--- a/rsconcept/frontend/src/pages/RSFormPage/RSEditContext.tsx
+++ b/rsconcept/frontend/src/pages/RSFormPage/RSEditContext.tsx
@@ -62,7 +62,7 @@ interface IRSEditContext {
toggleSelect: (target: ConstituentaID) => void;
deselectAll: () => void;
- viewVersion: (version?: number) => void;
+ viewVersion: (version?: number, newTab?: boolean) => void;
createVersion: () => void;
editVersions: () => void;
@@ -163,7 +163,7 @@ export const RSEditState = ({
);
const viewVersion = useCallback(
- (version?: number) => router.push(urls.schema(model.schemaID, version)),
+ (version?: number, newTab?: boolean) => router.push(urls.schema(model.schemaID, version), newTab),
[router, model]
);
diff --git a/rsconcept/frontend/src/pages/RSFormPage/RSTabsMenu.tsx b/rsconcept/frontend/src/pages/RSFormPage/RSTabsMenu.tsx
index a4dfcf8a..91a54621 100644
--- a/rsconcept/frontend/src/pages/RSFormPage/RSTabsMenu.tsx
+++ b/rsconcept/frontend/src/pages/RSFormPage/RSTabsMenu.tsx
@@ -251,7 +251,7 @@ function RSTabsMenu({ onDestroy }: RSTabsMenuProps) {
hideTitle={accessMenu.isOpen}
className='h-full px-2'
icon={}
- onClick={() => controller.viewVersion(undefined)}
+ onClick={event => controller.viewVersion(undefined, event.ctrlKey)}
/>
) : null}