Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
4122567
base setup
Kr0nox Oct 9, 2025
82b329b
help ui and startup
Kr0nox Oct 11, 2025
a35367a
labels
Kr0nox Oct 31, 2025
b717154
add some basic types
Kr0nox Oct 31, 2025
6b28c7d
Diagram loading from json
Kr0nox Oct 31, 2025
cd6c006
add editor mode module
Kr0nox Oct 31, 2025
7c39483
rendering
Kr0nox Nov 1, 2025
4e7a607
rendering
Kr0nox Nov 1, 2025
01894d4
Merge branch 'refactor-web' of https://github.com/DataFlowAnalysis/On…
Kr0nox Nov 4, 2025
c03f775
websocket handler
Kr0nox Nov 4, 2025
1cb2a28
copy old command palette
Kr0nox Nov 4, 2025
f8139a3
serialization base
Kr0nox Nov 4, 2025
25b0c7e
add fit to screen action
Kr0nox Nov 4, 2025
c8fd9c3
copy layouting and slightly adjust it
Kr0nox Nov 5, 2025
60feec2
saving basis
Kr0nox Nov 5, 2025
10954a8
add file name
Kr0nox Nov 7, 2025
492da26
simple settings implementation
Kr0nox Nov 14, 2025
d67b302
add theme switch
Kr0nox Nov 14, 2025
19e6aa3
add settings icon
Kr0nox Nov 14, 2025
d38f225
editable labels
Kr0nox Nov 17, 2025
f67a2a8
add tool palette
Kr0nox Nov 17, 2025
4101e43
add simple constraint menu
Kr0nox Nov 17, 2025
eb8851d
simple dsl language implementation
Kr0nox Nov 21, 2025
cceb1c5
update tokenization
Kr0nox Nov 26, 2025
084c6f3
analyze command
Kr0nox Nov 27, 2025
9a636ae
add constraint registry to save load
Kr0nox Nov 27, 2025
984f06d
add and remove labels
Kr0nox Nov 28, 2025
1a62326
better label type edtor refresh
Kr0nox Dec 1, 2025
fab4950
Merge branch 'refactor-web' of https://github.com/DataFlowAnalysis/On…
Kr0nox Dec 1, 2025
0ff8c59
assignment menu
Kr0nox Dec 2, 2025
77ecf62
clarify command name
Kr0nox Dec 2, 2025
948b789
node annotations
Kr0nox Dec 2, 2025
1f9eaa7
constraint selection
Kr0nox Dec 2, 2025
35b08f2
fix node creation
Kr0nox Dec 2, 2025
6a4cf26
add read only mode
Kr0nox Dec 2, 2025
8c72ba3
hide edge names
Kr0nox Dec 2, 2025
e3357ab
readonly features
Kr0nox Dec 2, 2025
5add22e
loading indicator
Kr0nox Dec 2, 2025
bff02d1
fix format
Kr0nox Dec 2, 2025
30f8c5f
fix build
Kr0nox Dec 2, 2025
1c1db68
rename labels
Kr0nox Dec 4, 2025
f24deb0
remove temporary docs
Kr0nox Dec 4, 2025
64ddb6c
update dependencies
Kr0nox Dec 4, 2025
dc0b0b2
Merge remote-tracking branch 'origin/main' into refactor-web
Kr0nox Dec 4, 2025
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
2 changes: 1 addition & 1 deletion frontend/webEditor/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
node_modules
dist
dist
1 change: 0 additions & 1 deletion frontend/webEditor/.husky/.gitignore

This file was deleted.

6 changes: 3 additions & 3 deletions frontend/webEditor/.husky/pre-commit
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
set -e

# Only run when WebEditor files are staged (optional guard)
if git diff --cached --name-only --diff-filter=ACMRT | grep -q '^Frontend/WebEditor/'; then
if git diff --cached --name-only --diff-filter=ACMRT | grep -q '^frontend/webEditor/'; then
REPO_ROOT="$(git rev-parse --show-toplevel)"
cd "$REPO_ROOT/Frontend/WebEditor"
cd "$REPO_ROOT/frontend/webEditor"
npx lint-staged
fi
fi
34 changes: 0 additions & 34 deletions frontend/webEditor/.vscode/launch.json

This file was deleted.

5 changes: 0 additions & 5 deletions frontend/webEditor/.vscode/settings.json

This file was deleted.

3,475 changes: 678 additions & 2,797 deletions frontend/webEditor/package-lock.json

Large diffs are not rendered by default.

20 changes: 10 additions & 10 deletions frontend/webEditor/package.json
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
{
"name": "data-flow-analysis-web-editor",
"version": "0.1.0",
"version": "0.0.0",
"private": true,
"repository": {
"type": "git",
"url": "https://github.com/DataFlowAnalysis/WebEditor.git"
"url": "https://github.com/DataFlowAnalysis/OnlineEditor.git"
},
"devDependencies": {
"@eslint/eslintrc": "^3.3.1",
"@eslint/js": "^9.35.0",
"@eslint/eslintrc": "^3.3.3",
"@eslint/js": "^9.39.1",
"@fortawesome/fontawesome-free": "^7.0.0",
"@vscode/codicons": "^0.0.39",
"eslint": "^9.32.0",
"@vscode/codicons": "^0.0.43",
"eslint": "^9.39.1",
"eslint-config-prettier": "^10.1.8",
"husky": "^9.1.7",
"inversify": "^6.2.2",
"lint-staged": "^16.1.6",
"lint-staged": "^16.2.7",
"monaco-editor": "^0.52.2",
"prettier": "^3.6.2",
"prettier": "^3.7.4",
"reflect-metadata": "^0.2.2",
"sprotty": "^1.4.0",
"sprotty-elk": "^1.4.0",
"sprotty-protocol": "^1.4.0",
"typescript": "^5.8.3",
"typescript-eslint": "^8.44.0",
"vite": "^7.1.7"
"typescript-eslint": "^8.48.1",
"vite": "^7.2.6"
},
"scripts": {
"dev": "vite",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,29 +1,3 @@
.ui-float {
position: absolute;
border-radius: 10px;
background-color: var(--color-primary);
}

/* Styling for keyboard symbols.
Copied from the example at https://developer.mozilla.org/en-US/docs/Web/HTML/Element/kbd
with adapted colors */
kbd {
background-color: var(--color-primary);
color: var(--color-foreground);

border-radius: 3px;
border: 1px solid var(--color-foreground);
box-shadow:
0 1px 1px var(--color-foreground),
0 2px 0 0 var(--color-background) inset;
display: inline-block;
font-size: 0.85em;
font-weight: 700;
line-height: 1;
padding: 2px 4px;
white-space: nowrap;
}

/* accordion */
.accordion-content {
display: grid;
Expand All @@ -47,7 +21,7 @@ kbd {
transition:
grid-template-rows 300ms ease,
/* ease-out animation: https://cubic-bezier.com/#0,.7,.4,1 */ /* mirrored version of the curve above */
grid-template-columns 300ms cubic-bezier(0, 0.7, 0.4, 1),
grid-template-columns 300ms cubic-bezier(0, 0.7, 0.4, 1),
padding-top 300ms ease;

/* space between accordion button and the content, otherwise they would be directly next to each other without any spacing */
Expand All @@ -68,26 +42,26 @@ kbd {
-webkit-user-select: none;
user-select: none;

/* Default orientation of the arrow: pointing down */
--arrow-scale: 1;
/* Default orientation of the chevron: pointing down */
--chevron-scale: 1;
}

.accordion-button.flip-arrow {
/* Default orientation of the arrow: pointing up */
--arrow-scale: -1;
.accordion-button.flip-chevron {
/* Default orientation of the chevron: pointing up */
--chevron-scale: -1;
}

.accordion-button.cevron-right {
.accordion-button.chevron-right {
/* space for the icon */
padding-right: 2em;
}

.accordion-button.cevron-left {
.accordion-button.chevron-left {
/* space for the icon */
padding-left: 2em;
}

.accordion-button.cevron-right::after {
.accordion-button.chevron-right::after {
content: "";
background-image: url("@fortawesome/fontawesome-free/svgs/solid/chevron-down.svg");
right: 1em;
Expand All @@ -103,10 +77,10 @@ kbd {

vertical-align: text-top;
transition: transform 500ms ease;
transform: scaleY(var(--arrow-scale));
transform: scaleY(var(--chevron-scale));
}

.accordion-button.cevron-left::before {
.accordion-button.chevron-left::before {
content: "";
background-image: url("@fortawesome/fontawesome-free/svgs/solid/chevron-down.svg");
left: 1em;
Expand All @@ -122,15 +96,15 @@ kbd {

vertical-align: text-top;
transition: transform 500ms ease;
transform: scaleY(var(--arrow-scale));
transform: scaleY(var(--chevron-scale));
}

.accordion-state:checked ~ label .accordion-button::after {
/* flip arrow in y direction */
transform: scaleY(calc(var(--arrow-scale) * -1));
/* flip chevron in y direction */
transform: scaleY(calc(var(--chevron-scale) * -1));
}

.accordion-state:checked ~ label .accordion-button::before {
/* flip arrow in y direction */
transform: scaleY(calc(var(--arrow-scale) * -1));
/* flip chevron in y direction */
transform: scaleY(calc(var(--chevron-scale) * -1));
}
63 changes: 63 additions & 0 deletions frontend/webEditor/src/accordionUiExtension/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
import { AbstractUIExtension } from "sprotty";
import { injectable } from "inversify";
import "./accordion.css";

/**
* Base class for an expandable accordion floating element
*/
@injectable()
export abstract class AccordionUiExtension extends AbstractUIExtension {
constructor(
private chevronPosition: "left" | "right",
private chevronOrientation: "up" | "down",
) {
super();
}

protected initializeContents(containerElement: HTMLElement): void {
containerElement.classList.add("ui-float");

// create hidden checkbox used for toggling
const checkbox = document.createElement("input");
checkbox.type = "checkbox";
const checkboxId = this.id() + "-checkbox";
checkbox.id = checkboxId;
checkbox.classList.add("accordion-state");
checkbox.hidden = true;

// create clickable label for the checkbox
const label = document.createElement("label");
label.htmlFor = checkboxId;
// create header inside label
const header = document.createElement("div");
header.classList.add(`chevron-${this.chevronPosition}`, "accordion-button");
if (this.chevronOrientation === "up") {
header.classList.add("flip-chevron");
}
this.initializeHeaderContent(header);
label.appendChild(header);

// create content holder and initialize it
const accordionContent = document.createElement("div");
accordionContent.classList.add("accordion-content");
const contentHolder = document.createElement("div");
this.initializeHidableContent(contentHolder);
accordionContent.appendChild(contentHolder);

containerElement.appendChild(checkbox);
containerElement.appendChild(label);
containerElement.appendChild(accordionContent);
}

/**
* Initializes the hidable content of the accordion element
* @param contentElement The containing element of the content
*/
protected abstract initializeHidableContent(contentElement: HTMLElement): void;

/**
* Initializes the header of the accordion element
* @param contentElement The containing element of the header
*/
protected abstract initializeHeaderContent(headerElement: HTMLElement): void;
}
6 changes: 6 additions & 0 deletions frontend/webEditor/src/annotation/DFDNodeAnnotation.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export interface DfdNodeAnnotation {
message: string;
color?: string;
icon?: string;
tfg?: number;
}
25 changes: 25 additions & 0 deletions frontend/webEditor/src/assets/commonStyling.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
.ui-float {
position: absolute;
border-radius: 10px;
background-color: var(--color-primary);
}

/* Styling for keyboard symbols.
Copied from the example at https://developer.mozilla.org/en-US/docs/Web/HTML/Element/kbd
with adapted colors */
kbd {
background-color: var(--color-primary);
color: var(--color-foreground);

border-radius: 3px;
border: 1px solid var(--color-foreground);
box-shadow:
0 1px 1px var(--color-foreground),
0 2px 0 0 var(--color-background) inset;
display: inline-block;
font-size: 0.85em;
font-weight: 700;
line-height: 1;
padding: 2px 4px;
white-space: nowrap;
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,20 @@ body {
and absolute top/left/bottom/right values. */
#sprotty {
position: relative;
height: 100vh;
width: 100vw;
/*temporary*/
font-family:
Helvetica Neue,
Helvetica,
Arial,
sans-serif;
padding: 0;
}

svg.sprotty-graph {
width: 100%;
height: 100vh;
height: 100%;
outline: none;
}

Expand Down
Loading