better rendering of dialogs
This commit is contained in:
parent
c2dd27afa5
commit
3f9f2affd3
3 changed files with 26 additions and 17 deletions
|
|
@ -1,19 +1,21 @@
|
||||||
import logo from "../../artwork/logo.svg";
|
import logo from "../../artwork/logo.svg";
|
||||||
|
|
||||||
export function About() {
|
export function About(props: {setModal}) {
|
||||||
return <div style={{width: 500, padding: 4}}>
|
return <div style={{maxWidth: '500px', padding: 4}}>
|
||||||
<p><img src={logo}/></p>
|
<p><img src={logo} style={{maxWidth:'100%'}}/></p>
|
||||||
|
|
||||||
<p>StateBuddy is an <a target="_blank" href="https://deemz.org/git/research/statebuddy">open source</a> tool for <a target="_blank" href="https://dl.acm.org/doi/10.1016/0167-6423(87)90035-9">Statechart</a> editing, simulation, (omniscient) debugging and testing.</p>
|
<p>StateBuddy is an <a target="_blank" href="https://deemz.org/git/research/statebuddy">open source</a> tool for <a target="_blank" href="https://dl.acm.org/doi/10.1016/0167-6423(87)90035-9">Statechart</a> editing, simulation, (omniscient) debugging and testing.</p>
|
||||||
|
|
||||||
<p>It was originally created for teaching Statecharts to university students.</p>
|
<p>It was originally created for teaching Statecharts to university students.</p>
|
||||||
|
|
||||||
<p>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 <a target="_blank" href="https://dl.acm.org/doi/10.1145/3417990.3421401">CouchEdit</a>, which was in turn influenced by the very old tool <a target="_blank" href="https://en.wikipedia.org/wiki/I-Logix#History">StateMate</a>.</p>
|
<p>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 <a target="_blank" href="https://dl.acm.org/doi/10.1145/3417990.3421401">CouchEdit</a>, which was in turn influenced by the very old tool <a target="_blank" href="https://en.wikipedia.org/wiki/I-Logix#History">Statemate</a>.</p>
|
||||||
|
|
||||||
<p>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.</p>
|
<p>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.</p>
|
||||||
|
|
||||||
<p>No commercial use without my written permission.</p>
|
<p>No commercial use without my permission.</p>
|
||||||
|
|
||||||
<p>Contact: <a href="mailto:joeri.exelmans@gmail.com">joeri.exelmans@gmail.com</a></p>
|
<p>Contact: <a href="mailto:joeri.exelmans@gmail.com">joeri.exelmans@gmail.com</a></p>
|
||||||
|
|
||||||
|
<button onClick={() => props.setModal(null)}>OK</button>
|
||||||
</div>;
|
</div>;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -59,21 +59,28 @@ button.active {
|
||||||
color: black;
|
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 {
|
.modalInner {
|
||||||
position: relative;
|
position: relative;
|
||||||
top: 50%;
|
|
||||||
transform: translateY(-50%);
|
|
||||||
text-align: center;
|
text-align: center;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
background-color: white;
|
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) */
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -26,9 +26,9 @@ export function TextDialog(props: {setModal: Dispatch<SetStateAction<ReactElemen
|
||||||
error = e.message;
|
error = e.message;
|
||||||
}
|
}
|
||||||
|
|
||||||
return <div onKeyDown={onKeyDown} style={{padding: 4, width: 520}}>
|
return <div onKeyDown={onKeyDown} style={{padding: 4}}>
|
||||||
Text label:<br/>
|
Text label:<br/>
|
||||||
<textarea autoFocus style={{fontFamily: 'Roboto', width:500, height: 100}} onChange={e=>setText(e.target.value)}>{text}</textarea>
|
<textarea autoFocus style={{fontFamily: 'Roboto', width:'calc(100%-10px)', height: 60}} onChange={e=>setText(e.target.value)}>{text}</textarea>
|
||||||
<br/>
|
<br/>
|
||||||
<span style={{color: 'var(--error-color)'}}>{error}</span><br/>
|
<span style={{color: 'var(--error-color)'}}>{error}</span><br/>
|
||||||
<p><kbd>Enter</kbd> to confirm. <kbd>Esc</kbd> to cancel.
|
<p><kbd>Enter</kbd> to confirm. <kbd>Esc</kbd> to cancel.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue