Using ESM modules causes issues with the web extension: It complains
about use of "ImportScript" in a module. Something adds that into the
module, I need to properly investigate what and why. Let's revert this
till then.
This reverts commit cb66bc1650.
The refatoring code (wrap in eleemnt/remove element) needs some setup to
happen before the client is started. Add a little helper function and
call it.
* Extend the cspell word list
* Remove those extensions from individual source files
* white-list licenses and such as we should not meddle with those
* Fix spelling
This is used in slintpad to map relative image URLs to their real
download locations.
This has the side-effect of removing the service worker.
Fixes: #2905
This PR updates the logos and branding guideline of Slint to match the new website design. The new logos are a 1:1 replacement of the old logos except for the circular logo. In the new logo design, there isn't a separate circular logo, as the square logo with circular crop can be used. Further, the logo folder also contains logos in CMYK for use in printed materials. The PMS is just the color value in the naming and can be used where Pantome colors are required. The README has been updated to explain which logos to use when as well as the Slint "blue" color.
- the "preview" command don't contain a "design_mode" arg, but later
the generated js for the wasm checked that it is a boolean.
- The url comparison did not work when using the binary lsp and wasm
preview. Event though the URL string is the same, the object were not
exactly equals.
- Fix rust warnings in the wasm lsp build
The walkthrough:
* Creates a .slint file
* Explains Live Preview
* Shows Properties Editor
* Explains where to get help
No code change, this is all just added configuration/markdown/images.
Remove the Welcome page we had earlier (which does change some code).
Co-authored-by: Olivier Goffart <olivier@woboq.com>
Co-authored-by: Simon Hausmann <hausmann@gmail.com>
Generally, disable the fullscreen rendering. This selection mechanism
needs reworking, as one might want to use the live-preview in a setup
where weston, etc. are running side-by-side.
This could be made configurable in the future, i.e. choosing a backend
like linuxkms, or having the window state as property in Slint.
Attempt to detect when we are running in a codespace and force the
preview to render in wasm.
Remote view don't make sense as there is no graphical server where the
extension runs
Make sure to pass around the extensionUrl, not the extensioPath. The web
extension seems to need the full URL when actually deploying this. It
works file in web extension test mode either way.
Turn the instance variable into a Promise itself, where the first
promise that's assigned to it creates the component and shows
it, before resolving the promise with it.
Some associated helper functions that use this.#instance - which is now a Promise - are also async.
In some call sites it doesn't matter, in others an await was added.
With the following snippet there was a race:
```
if (instance === null) {
instance = await create();
await instance.show();
} else {
instance.create_with_existing_window(...);
}
```
When awaiting for the promise that show() returns to settle, we would re-enter
this function (due to a broken recursion guard, that's now removed).
When re-entering, create_with_existing_window() is called, which - in order to
access the slint::Window to re-use - must create the window adapter.
Since that didn't happen from within an event loop invocation, winit would panic.
Consequently, this patch set also makes create_with_existing_window() return
a promise, as well as hide() (for the sake of it).
The broken recursion guard is easy to fix (with a .finally() handler setting
the boolean back), but that would mean we end up not always rendering
the very latest sources. Plus, the same issue exists in wasm_preview.ts.
Now, in case of subsequent re-entrancy in this code, we end up creating
a bunch of create_with_exiting_window() promises, which will eventually
settle and then we go back to the original show() call that will show the canvas.
The interpreter now creates the window typically in show(), so similar
to commit a8fcb5acd6 make show() return a
promise and invoke show() from within the event loop.
Amends d98c6773e1