Skip to content

Commit

Permalink
Rename "Online Editor" to "SlintPad"
Browse files Browse the repository at this point in the history
  • Loading branch information
tronical committed Mar 29, 2023
1 parent 538dddf commit 5c3aa0f
Show file tree
Hide file tree
Showing 12 changed files with 34 additions and 36 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ We have a few tools to help with the development of .slint files:
- A [**slint-viewer**](./tools/viewer) tool which displays the .slint files. The
`--auto-reload` argument makes it easy to preview your UI while you are
working on it (when using the LSP preview is not possible).
- An [**online editor**](https://slint-ui.com/editor) to try out .slint syntax
- [**SlintPad**](https://slint-ui.com/editor), an online editor to try out .slint syntax
without installing anything ([sources](./tools/online_editor)).
- An [**updater**](./tools/updater) to convert the .slint files from
previous versions to newer versions.
Expand Down
14 changes: 7 additions & 7 deletions examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ These examples demonstrate the main features of Slint and how to use them in dif

A fictional user interface for the touch screen of a printer

| `.slint` Design | Rust Source | C++ Source | Node Source | Online wasm Preview | Open in code editor |
| `.slint` Design | Rust Source | C++ Source | Node Source | Online wasm Preview | Open in SlintPad |
| --- | --- | --- | --- | --- | --- |
| [`ui.slint`](./printerdemo/ui/printerdemo.slint) | [`main.rs`](./printerdemo/rust/main.rs) | [`main.cpp`](./printerdemo/cpp/main.cpp) | [`main.js`](./printerdemo/node/main.js) | [Online simulation](https://slint-ui.com/snapshots/master/demos/printerdemo/) | [Preview in Online Code Editor](https://slint-ui.com/snapshots/master/editor?load_url=https://raw.githubusercontent.com/slint-ui/slint/master/examples/printerdemo/ui/printerdemo.slint) |

Expand All @@ -16,7 +16,7 @@ A fictional user interface for the touch screen of a printer

A simple application showing the different widgets

| `.slint` Design | Rust Source | C++ Source | Online wasm Preview | Open in code editor |
| `.slint` Design | Rust Source | C++ Source | Online wasm Preview | Open in SlintPad |
| --- | --- | --- | --- | --- |
| [`gallery.slint`](./gallery/gallery.slint) | [`main.rs`](./gallery/main.rs) | [`main.cpp`](./gallery/main.cpp) | [Online simulation](https://slint-ui.com/snapshots/master/demos/gallery/) | [Preview in Online Code Editor](https://slint-ui.com/snapshots/master/editor?load_url=https://raw.githubusercontent.com/slint-ui/slint/master/examples/gallery/gallery.slint) |

Expand All @@ -26,7 +26,7 @@ A simple application showing the different widgets

A simple todo mvc application

| `.slint` Design | Rust Source | C++ Source | NodeJS | Online wasm Preview | Open in code editor |
| `.slint` Design | Rust Source | C++ Source | NodeJS | Online wasm Preview | Open in SlintPad |
| --- | --- | --- | --- | --- | --- |
| [`todo.slint`](./todo/ui/todo.slint) | [`main.rs`](./todo/rust/main.rs) | [`main.cpp`](./todo/cpp/main.cpp) | [`main.js`](./todo/node/main.js) | [Online simulation](https://slint-ui.com/snapshots/master/demos/todo/) | [Preview in Online Code Editor](https://slint-ui.com/snapshots/master/editor?load_url=https://raw.githubusercontent.com/slint-ui/slint/master/examples/todo/ui/todo.slint) |

Expand All @@ -38,7 +38,7 @@ A custom carousel widget that can be controlled by touch, mouse and keyboard

The example can be run on desktop, wasm and mcu platforms

| `.slint` Design | Rust Source | C++ Source | Node Source | Online wasm Preview | Open in code editor |
| `.slint` Design | Rust Source | C++ Source | Node Source | Online wasm Preview | Open in SlintPad |
| --- | --- | --- | --- | --- | --- |
| [`ui.slint`](./carousel/ui/carousel_demo.slint) | [`main.rs`](./carousel/rust/main.rs) | [`main.cpp`](./carousel/cpp/main.cpp) | [`main.js`](./carousel/node/main.js) | [Online simulation](https://slint-ui.com/snapshots/master/demos/carousel/) | [Preview in Online Code Editor](https://slint-ui.com/snapshots/master/editor?load_url=https://raw.githubusercontent.com/slint-ui/slint/master/examples/carousel/ui/carousel_demo.slint) |

Expand All @@ -48,7 +48,7 @@ The example can be run on desktop, wasm and mcu platforms

Puzzle game based on a Flutter example. See [Readme](./slide_puzzle)

| `.slint` Design | Rust Source | Online wasm Preview | Open in code editor |
| `.slint` Design | Rust Source | Online wasm Preview | Open in SlintPad |
| --- | --- | --- | --- |
| [`slide_puzzle.slint`](./slide_puzzle/slide_puzzle.slint) | [`main.rs`](./todo/rust/main.rs) | [Online simulation](https://slint-ui.com/snapshots/master/demos/slide_puzzle/) | [Preview in Online Code Editor](https://slint-ui.com/snapshots/master/editor?load_url=https://raw.githubusercontent.com/slint-ui/slint/master/examples/slide_puzzle/slide_puzzle.slint) |

Expand All @@ -61,7 +61,7 @@ A basic memory game used as an example the tutorial:
* [Memory Game Tutorial (Rust)](https://slint-ui.com/docs/tutorial/rust)
* [Memory Game Tutorial (C++)](https://slint-ui.com/docs/tutorial/cpp)

| `.slint` Design | Rust Source | C++ Source | Online wasm Preview | Open in code editor |
| `.slint` Design | Rust Source | C++ Source | Online wasm Preview | Open in SlintPad |
| --- | --- | --- | --- | --- |
| [`memory.slint`](./memory/memory.slint) | [`main.rs`](./memory/main.rs) | [`memory.cpp`](./memory/memory.cpp) | [Online simulation](https://slint-ui.com/snapshots/master/demos/memory/) | [Preview in Online Code Editor](https://slint-ui.com/snapshots/master/editor?load_url=https://raw.githubusercontent.com/slint-ui/slint/master/examples/memory/memory.slint) |

Expand All @@ -71,7 +71,7 @@ A clone of one demo from the [QSkinny framework](https://qskinny.github.io/).

Also show how a way to dynamically load widgets with the interpreter from C++.

| `.slint` Design | C++ Source | Online wasm Preview | Open in code editor |
| `.slint` Design | C++ Source | Online wasm Preview | Open in SlintPad |
| --- | --- | --- | --- |
| [`main.slint`](./iot-dashboard/main.slint) | [`main.cpp`](./iot-dashboard/main.cpp) | [Online preview](https://slint-ui.com/snapshots/master/editor/preview.html?load_url=https://raw.githubusercontent.com/slint-ui/slint/master/examples/iot-dashboard/main.slint) | [Preview in Online Code Editor](https://slint-ui.com/snapshots/master/editor?load_url=https://raw.githubusercontent.com/slint-ui/slint/master/examples/iot-dashboard/main.slint) |

Expand Down
6 changes: 3 additions & 3 deletions examples/carousel/rust/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
height: 100vh !important;
}
}

</style>
</head>

Expand All @@ -46,9 +47,8 @@ <h1 class="hide-in-mobile-landscape">Carousel example</h1>
<p class="hide-in-mobile-landscape links">
<a href="https://github.com/slint-ui/slint/blob/master/examples/carousel/ui/carousel_demo.slint">
View Source Code on GitHub</a> -
<a
href="https://slint-ui.com/editor?load_demo=examples/carousel/ui/carousel_demo.slint">
Edit in the online code editor
<a href="https://slint-ui.com/editor?load_demo=examples/carousel/ui/carousel_demo.slint">
Open in SlintPad
</a>
</p>
<script type="module">
Expand Down
2 changes: 1 addition & 1 deletion examples/energy-monitor/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ <h1 class="hide-in-mobile-landscape">Energy Monitor Demo</h1>
<a href="https://github.com/slint-ui/slint/blob/master/examples/energy-monitor/ui/desktop_main.slint">
View Source Code on GitHub</a> -
<a href="https://slint-ui.com/editor?load_demo=examples/energy-monitor/ui/desktop_main.slint">
Edit in the online code editor
Open in SlintPad
</a>
</p>
<script type="module">
Expand Down
7 changes: 3 additions & 4 deletions examples/gallery/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,8 @@ <h1>Slint Gallery</h1>
<p class="links">
<a href="https://github.com/slint-ui/slint/blob/master/examples/gallery/gallery.slint">
View Source Code on GitHub</a> -
<a
href="https://slint-ui.com/editor?load_demo=examples/gallery/gallery.slint">
Edit in the online code editor
<a href="https://slint-ui.com/editor?load_demo=examples/gallery/gallery.slint">
Open in SlintPad
</a>
</p>
<script type="module">
Expand Down Expand Up @@ -90,4 +89,4 @@ <h1>Slint Gallery</h1>
</script>
</body>

</html>
</html>
6 changes: 3 additions & 3 deletions examples/printerdemo/rust/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
height: 100vh !important;
}
}

</style>
</head>

Expand All @@ -48,9 +49,8 @@ <h1 class="hide-in-mobile-landscape">Printer Demo</h1>
<p class="hide-in-mobile-landscape links">
<a href="https://github.com/slint-ui/slint/blob/master/examples/printerdemo/ui/printerdemo.slint">
View Source Code on GitHub</a> -
<a
href="https://slint-ui.com/editor?load_demo=examples/printerdemo/ui/printerdemo.slint">
Edit in the online code editor
<a href="https://slint-ui.com/editor?load_demo=examples/printerdemo/ui/printerdemo.slint">
Open in SlintPad
</a>
</p>
<script type="module">
Expand Down
6 changes: 3 additions & 3 deletions examples/printerdemo_old/rust/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
height: 100vh !important;
}
}

</style>
</head>

Expand All @@ -48,9 +49,8 @@ <h1 class="hide-in-mobile-landscape">Old Printer Demo</h1>
<p class="hide-in-mobile-landscape links">
<a href="https://github.com/slint-ui/slint/blob/master/examples/printerdemo_old/ui/printerdemo.slint">
View Source Code on GitHub</a> -
<a
href="https://slint-ui.com/editor?load_demo=examples/printerdemo_old/ui/printerdemo.slint">
Edit in the online code editor
<a href="https://slint-ui.com/editor?load_demo=examples/printerdemo_old/ui/printerdemo.slint">
Open in SlintPad
</a>
</p>
<script type="module">
Expand Down
6 changes: 3 additions & 3 deletions examples/slide_puzzle/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
grid-template-columns: auto;
grid-template-rows: max-content auto max-content;
}

</style>

<body>
Expand All @@ -44,9 +45,8 @@
<p class="links">
<a href="https://github.com/slint-ui/slint/blob/master/examples/slide_puzzle/">
View Source Code on GitHub</a> -
<a
href="https://slint-ui.com/editor?load_demo=examples/slide_puzzle/slide_puzzle.slint">
Edit in the online code editor
<a href="https://slint-ui.com/editor?load_demo=examples/slide_puzzle/slide_puzzle.slint">
Open in SlintPad
</a>
</p>
</div>
Expand Down
5 changes: 2 additions & 3 deletions examples/todo/rust/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,8 @@
<p class="links">
<a href="https://github.com/slint-ui/slint/blob/master/examples/todo/">
View Source Code on GitHub</a> -
<a
href="https://slint-ui.com/editor?load_demo=examples/todo/ui/todo.slint">
Edit in the online code editor
<a href="https://slint-ui.com/editor?load_demo=examples/todo/ui/todo.slint">
Open in SlintPad
</a>
</p>
<script type="module">
Expand Down
8 changes: 4 additions & 4 deletions tools/online_editor/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Slint Online Editor
# SlintPad

This directory contains the frontend code for the online code editor
which is hosted in https://slint-ui.com/editor (last stable) and
https://slint-ui.com/snapshots/master/editor (nightly)
This directory contains the frontend code for SlintPad, the online code editor
which is hosted on https://slint-ui.com/editor (last stable) and
https://slint-ui.com/snapshots/master/editor (nightly).

To try it out locally type this in this directory:

Expand Down
2 changes: 1 addition & 1 deletion tools/online_editor/cypress/e2e/smoke_test.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ describe("Smoke test", () => {
// Other UI elements
cy.get(".edit-area").get(".monaco-editor-background");
cy.get(".content.welcome").contains(
"Welcome to the Slint Online Editor",
"Welcome to SlintPad",
);

// Menu bar:
Expand Down
6 changes: 3 additions & 3 deletions tools/online_editor/src/welcome_widget.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export class WelcomeWidget extends Widget {
content.innerHTML = `
<div>
<center>
<h1>Welcome to the Slint Online Editor</h1>
<h1>Welcome to SlintPad</h1>
<a href="https://slint-ui.com/" target="_blank"><img src="https://slint-ui.com/logo/slint-logo-simple-light.svg"></a>
</center>
Expand All @@ -23,11 +23,11 @@ export class WelcomeWidget extends Widget {
interfaces. This language is easy to learn, to read and write, and provides a powerful way to describe
graphical elements. For more details, check out the <a href="https://slint-ui.com/docs/slint" target="_blank">Slint Language Documentation</a>.</p>
<p>Use this Online Editor to quickly try out Slint code snippets, with auto-completion, code navigation, and live-preview.</p>
<p>Use SlintPad to quickly try out Slint code snippets, with auto-completion, code navigation, and live-preview.</p>
<p>The same features are also available in the <a href="https://marketplace.visualstudio.com/items?itemName=Slint.slint" target="_blank">Visual Studio Code extension</a>,
which runs in your local VS code installation as well as in the <a href="https://vscode.dev/" target="_blank">Visual Studio Code for the Web</a>.</p>
<p>This Online Editor is licensed under the GNU GPLv3. The source code is located in our <a href="https://github.com/slint-ui/slint/tree/master/tools/online_editor" target="_blank">GitHub repository</a>.
<p>SlintPad is licensed under the GNU GPLv3. The source code is located in our <a href="https://github.com/slint-ui/slint/tree/master/tools/online_editor" target="_blank">GitHub repository</a>.
</div>
`;
node.appendChild(content);
Expand Down

0 comments on commit 5c3aa0f

Please sign in to comment.