From 3f9f2affd371c11fa8e55d52744483e56bc39e02 Mon Sep 17 00:00:00 2001 From: Joeri Exelmans Date: Sun, 19 Oct 2025 22:43:58 +0200 Subject: [PATCH] better rendering of dialogs --- src/App/About.tsx | 12 +++++++----- src/App/App.css | 27 +++++++++++++++++---------- src/App/TextDialog.tsx | 4 ++-- 3 files changed, 26 insertions(+), 17 deletions(-) diff --git a/src/App/About.tsx b/src/App/About.tsx index 9241f53..a3826d4 100644 --- a/src/App/About.tsx +++ b/src/App/About.tsx @@ -1,19 +1,21 @@ import logo from "../../artwork/logo.svg"; -export function About() { - return
-

+export function About(props: {setModal}) { + return
+

StateBuddy is an open source tool for Statechart editing, simulation, (omniscient) debugging and testing.

It was originally created for teaching Statecharts to university students.

-

The main novelty is in the way you deal with the visual concrete syntax: You just draw boxes, arrows and text. Connectedness or insideness are continuously figured out by a parser, but they do not influence what you can do with the shapes, which IMO is much more intuitive than editors that try to "help" you. This idea comes from CouchEdit, which was in turn influenced by the very old tool StateMate.

+

The main novelty is in the way you deal with the visual concrete syntax: You just draw boxes, arrows and text. Connectedness or insideness are continuously figured out by a parser, but they do not influence what you can do with the shapes, which IMO is much more intuitive than editors that try to "help" you. This idea comes from CouchEdit, which was in turn influenced by the very old tool Statemate.

Unique to StateBuddy is that sides of boxes, and endpoints of arrows can be independently selected for many boxes/arrows simultaneously, making editing even more powerful while remaining highly intuitive to both novice and expert users.

-

No commercial use without my written permission.

+

No commercial use without my permission.

Contact: joeri.exelmans@gmail.com

+ +
; } diff --git a/src/App/App.css b/src/App/App.css index e040401..0f2957d 100644 --- a/src/App/App.css +++ b/src/App/App.css @@ -59,21 +59,28 @@ button.active { color: black; } +.modalOuter { + position: absolute; + width: 100%; + height: 100%; + + display: flex; + justify-content: center; + align-items: center; + + text-align: center; + + background-color: rgba(200,200,200,0.7); + /* backdrop-filter: blur(2px) */ +} + .modalInner { position: relative; - top: 50%; - transform: translateY(-50%); text-align: center; display: inline-block; background-color: white; + max-height: 100vh; + overflow: auto; } -.modalOuter { - width: 100%; - height: 100%; - position:absolute; - text-align: center; - background-color: rgba(200,200,200,0.7); - /* backdrop-filter: blur(2px) */ -} diff --git a/src/App/TextDialog.tsx b/src/App/TextDialog.tsx index 132aadd..082073f 100644 --- a/src/App/TextDialog.tsx +++ b/src/App/TextDialog.tsx @@ -26,9 +26,9 @@ export function TextDialog(props: {setModal: Dispatch + return
Text label:
- +
{error}

Enter to confirm. Esc to cancel.