|
@@ -1,45 +1,32 @@
|
|
|
-import * as React from "react";
|
|
|
-import * as Icons from "@tabler/icons";
|
|
|
-import {
|
|
|
- Title,
|
|
|
- Text,
|
|
|
- Grid,
|
|
|
- Button,
|
|
|
- SimpleGrid,
|
|
|
- Group,
|
|
|
- Center,
|
|
|
- ScrollArea,
|
|
|
- Card,
|
|
|
- CloseButton,
|
|
|
- Divider,
|
|
|
- Space, Image,
|
|
|
-} from "@mantine/core";
|
|
|
-
|
|
|
-import {PrimitiveRegistry} from "../onion/primitive_delta";
|
|
|
-import {PrimitiveValue} from "../onion/types";
|
|
|
-import {mockUuid} from "../onion/test_helpers";
|
|
|
-import {GrContactInfo} from "react-icons/all";
|
|
|
-import {Actionblock, Resultblock} from "./blocks";
|
|
|
+import * as React from 'react';
|
|
|
+import * as Icons from '@tabler/icons';
|
|
|
+import {Button, Divider, Group, Image, SimpleGrid, Space, Text, Title,} from '@mantine/core';
|
|
|
+
|
|
|
+import {PrimitiveRegistry} from '../onion/primitive_delta';
|
|
|
+import {PrimitiveValue} from '../onion/types';
|
|
|
+import {mockUuid} from '../onion/test_helpers';
|
|
|
+import {Actionblock, Resultblock} from './blocks';
|
|
|
import pdImage from './assets/pd.svg';
|
|
|
+import {newVersionedModel, undoButtonHelpText, VersionedModelState,} from './versioned_model';
|
|
|
+import {makeInfoHoverCardIcon} from './help_icons';
|
|
|
|
|
|
export const demo_PD_description =
|
|
|
<>
|
|
|
<Title order={4}>
|
|
|
- Primitive deltas
|
|
|
+ Primitive Deltas
|
|
|
</Title>
|
|
|
{ /*
|
|
|
TODO: elaborate more on the structure of the state graph.
|
|
|
*/ }
|
|
|
<Text>
|
|
|
- On the right side you will see three canvases "State", "History", and "Deltas(L0)".
|
|
|
+ On the right side, you see three canvases "State", "History", and "Deltas(L0)".
|
|
|
</Text>
|
|
|
<Text>
|
|
|
- "State" shows the state graph, which represents the state of our model. If you now e.g. click with the right
|
|
|
- mouse button on a free area in the canvas, then this action is converted into a "Delta". The set of deltas
|
|
|
+ "State" shows the state graph, which represents the state of our model. If you click with the right
|
|
|
+ mouse button on a free area in the canvas, this action is converted into a "Delta". The set of one or many Deltas
|
|
|
is then in turn applied to the state graph, resulting in the visualization of a new node. The following image visualizes this.
|
|
|
</Text>
|
|
|
<Image src={pdImage}/>
|
|
|
- <Space h="10px"/>
|
|
|
<Actionblock>
|
|
|
1. Click with your right mouse button into the "State" canvas!
|
|
|
</Actionblock>
|
|
@@ -56,7 +43,7 @@ export const demo_PD_description =
|
|
|
2. Hover with your mouse over the circle with an (i) inside the "State" canvas!
|
|
|
</Actionblock>
|
|
|
<Resultblock>
|
|
|
- A tooltip with information about possible interactions of this canvas is shown.
|
|
|
+ A tooltip with information about possible interactions with this canvas is shown.
|
|
|
</Resultblock>
|
|
|
<Actionblock>
|
|
|
3. Create an edge to a value by right-dragging from the created node into the canvas!
|
|
@@ -64,8 +51,10 @@ export const demo_PD_description =
|
|
|
<Resultblock>
|
|
|
The generated delta "EDG(..)" depends on the creation (NEW(0)) of the node from which the edge originates.
|
|
|
</Resultblock>
|
|
|
- This detailed recording of each action allows to easily detect conflicts between two versions or to merge
|
|
|
- conflict-free versions.
|
|
|
+ <Space h="10px"/>
|
|
|
+ <Text>This detailed recording of each action allows to easily detect conflicts between two versions or to merge
|
|
|
+ conflict-free versions.</Text>
|
|
|
+ <Space h="10px"/>
|
|
|
<Actionblock>
|
|
|
4. Press the button "Undo" once!
|
|
|
</Actionblock>
|
|
@@ -73,7 +62,7 @@ export const demo_PD_description =
|
|
|
The version before creating the edge is selected in the "History" canvas.
|
|
|
</Resultblock>
|
|
|
<Resultblock>
|
|
|
- In the "Delta"-view the set of Deltas that are associated with the currently selected version is drawn with
|
|
|
+ In the "Delta"-view, the set of Deltas that are associated with the currently selected version are drawn with
|
|
|
a bold border.
|
|
|
</Resultblock>
|
|
|
<Actionblock>
|
|
@@ -96,17 +85,9 @@ export const demo_PD_description =
|
|
|
<Resultblock>
|
|
|
In the History, you can now choose between two "Restore" actions, but they cannot be applied simultaneously due to the conflict.
|
|
|
</Resultblock>
|
|
|
- <Space h="20px"/>
|
|
|
</>;
|
|
|
|
|
|
|
|
|
-import {
|
|
|
- newVersionedModel,
|
|
|
- VersionedModelState,
|
|
|
- undoButtonHelpText,
|
|
|
-} from "./versioned_model";
|
|
|
-import {makeInfoHoverCardIcon} from "./help_icons";
|
|
|
-
|
|
|
export function getDemoPD() {
|
|
|
const primitiveRegistry = new PrimitiveRegistry();
|
|
|
const generateUUID = mockUuid();
|