Commit graph

7643 commits

Author SHA1 Message Date
Simon Hausmann
c6510c23e6 doc: Remove Clip element mention from the docs
It's internal
2022-11-30 12:42:10 +01:00
Simon Hausmann
a1808a175c janitor: Don't use deprecated types 2022-11-30 11:43:41 +01:00
Simon Hausmann
14a954f57c janitor: Don't use deprecated types 2022-11-30 11:37:10 +01:00
Simon Hausmann
d28ebc46c5 janitor: Trigger rebuilds of SLINT_EMBEDD_RESOURCES changes
The compiler reads this variable, so we should rebuild if it changes.
2022-11-30 11:31:14 +01:00
Olivier Goffart
d468bbec05 ListView: Warn when we have other elements than just a for
This is not supported right now, the other elements will not be part of
the layout, and two `for` will be in the same listview, creating bad
situation with the scrollbar.

This is a warning since it would be a breaking change to make it an
error.

For example, we used a FocusScope in the StandardListView implementation so
I had to go trough one level of indirection

CC: #860
2022-11-30 11:17:22 +01:00
Simon Hausmann
ace4f92aad online editor: fix hello world re-appearing unexpectedly
After checking if the instance field is null, we await the promise that
would guarantee DOM attachment.  While we await, the browser processes
other microtasks, and we might end up in render() again. This time the
instance field is also null, but the ensure_attached_to_dom promise is
already resolved, so we would create the first slint component and the
associated window. Later we would return from the first await. At this
point the instance field is already set, so we should re-use the
existing window, but since we're not checking anymore, we'll go ahead
and create a second window on the same canvas element.

Fixes #1926
2022-11-29 17:18:16 +01:00
Olivier Goffart
151df7167d Fix visibility on drop shadow
`visible:false` would't hide the drop shadow

Fixes: #1460
2022-11-29 17:00:52 +01:00
Tobias Hunger
01a9309895 lsp: Do not error out on requests returning an empty response
It is perfectly valid for Requests to return `()`.
2022-11-29 10:54:59 +01:00
Simon Hausmann
b48c5a4cdb
Specify target platform for esbuild calls for vs code extension (#1924)
This patch has no effect on the currently generated output (apart from a
dummy few lines in out/extension.js), but may help to avoid issues in
the future like we had last week, where esbuild processed an import from
"vscode-languageclient" and due to browser mode it picked the browser
version of the languageclient for out/extension.js that's running in the
node environment.
2022-11-29 09:42:54 +01:00
Olivier Goffart
017e203653 LSP: don't query configuration if the client don't advertize we can do it 2022-11-28 15:59:53 +01:00
Olivier Goffart
261e612555 Janitor: dependencies update 2022-11-28 15:59:45 +01:00
Olivier Goffart
eee2a3d012 Fix two ways binding between globals
The previous code did not remove two ways binding that were between two
globals. Now we do the remove_aliases pass over the whole document at
once which allos to simplify aliases between globals.
2022-11-28 14:39:47 +01:00
Olivier Goffart
70efe0c573 Revert "Prepare for release: add Cargo.lock and set the version number in the docs"
This reverts commit 0e3c43f332.

Release was released
2022-11-28 14:13:26 +01:00
ogoffart
fb02b4118b Bump version number to 0.3.3 2022-11-28 13:11:11 +00:00
Simon Hausmann
7ebc84a0cb Fix accidental scrollbar in doc preview in C++ docs
Remove accidental padding on the "buttons" (that was from an earlier attempt
at styling the links as buttons).
2022-11-28 13:21:07 +01:00
Simon Hausmann
affdda2ce2 doc: Fix no-auto-preview with C++ docs
We need to explicitly match the divs that have now no-auto-preview in their class name
2022-11-28 13:11:59 +01:00
Olivier Goffart
0e3c43f332 Prepare for release: add Cargo.lock and set the version number in the docs 2022-11-28 11:55:48 +01:00
Olivier Goffart
ed1911cc89 Update version number in docs 2022-11-28 11:55:48 +01:00
Simon Hausmann
0bd21f4e56
Use click-to-play for preview of examples and recipes (#1919)
By using a persistent WebGL context for reach (small) preview, we hit
the browser imposed limits on the number of GL contexts quickly.  This
change add support to pt out of the automatic enabling of the preview
via no-auto-preview, that's selected for recipes.
2022-11-28 11:49:53 +01:00
Olivier Goffart
6bed0e00bb Docs: recipes: Add some no-preview tags
For things that involve native code.
That helps showing the page on chromium as it would otherwise run out of
GPU contexts
2022-11-28 10:54:30 +01:00
Olivier Goffart
fea2f8df37 Docs: fix the no-preview tag
That tag is added in a bunch of places, but was not working (the preview
was still shown)
2022-11-28 10:54:30 +01:00
Simon Hausmann
6a879669d7 Some edits to the ChangeLog
- re-order the ChangedSection by "impact"
- Add missing periods.
- For the element highlight, explain when a highlight is shown.
- Elaborate on some entries.
2022-11-28 10:50:32 +01:00
Aurindam Jana
71524434b0 Update FAQ TOC 2022-11-28 01:54:39 +01:00
Aurindam Jana
b482113a12
Update FAQ with more info on support and pricing. 2022-11-28 01:49:37 +01:00
Tobias Hunger
69f91f4e75 Revert "Prospective fix for the failing nightly build"
This is just unnecessary, so remove it again.

This reverts commit 4d5ee598dc.
2022-11-26 19:45:56 +01:00
Tobias Hunger
9845f47d8e Revert "Dont add vscode-languageclient in the externals"
This reverts commit e940c4316d.
2022-11-26 19:45:56 +01:00
Tobias Hunger
e9d28f00e3 tools: Unshare some code
Do not interact with the language server directly in vscode, but use
vscode.commands.executeCommand(...) instead. The online_editor will of
course need to continue to interact with the language server directy, so
this unshares a bit of code. It is not too much and straight forward
code, so that is not too bad.
2022-11-26 18:26:37 +01:00
Olivier Goffart
e940c4316d Dont add vscode-languageclient in the externals 2022-11-26 14:16:34 +01:00
Olivier Goffart
4d5ee598dc Prospective fix for the failling nightly build 2022-11-26 12:16:20 +01:00
Olivier Goffart
ad5b7be836
Recipes: Translation example 2022-11-25 17:38:40 +01:00
Tobias Hunger
6abbaf2df4 Revert "vscode extension: Fix local build"
This reverts commit 22b54b72f0.
2022-11-25 17:34:32 +01:00
Tobias Hunger
b949689e35 Revert "tools: Put code shared between online editor and vscode in NPM package"
This caused trouble with both the online editor as well as the VSCode
extension when built in CI.

This reverts commit c8b434021e.
2022-11-25 17:34:32 +01:00
Simon Hausmann
3802eabf7e
Add more docs about selecting the style with the lsp, vs code and slint viewer (#1911) 2022-11-25 16:36:08 +01:00
Simon Hausmann
4308ed921d
Add documentation about the available widget styles and how to select them (#1910) 2022-11-25 14:53:20 +01:00
Olivier Goffart
c4f90dfa2a
Receipes: TableView 2022-11-25 14:26:22 +01:00
Olivier Goffart
7e5aafcf9d Add test for the transitions new syntax
.. that i forgot to `git add` when doing the transition change
2022-11-25 12:52:00 +01:00
Olivier Goffart
22b54b72f0 vscode extension: Fix local build 2022-11-25 08:47:56 +01:00
Tobias Hunger
0672e02115
Tools: Retry getting properties on error (#1907)
* Tools: trigger updates for properties view more often

So far you had to move the cursor to refresh the properties view after
start-up. This is no longer necessary.
2022-11-24 19:40:19 +01:00
Olivier Goffart
a14eb859a3 Crater: don't use the cache, and remove reposotory that doesn't exist 2022-11-24 17:43:18 +01:00
Tobias Hunger
83b64eaecb
vscode: Have welcome pages in property view
Add a way to have welcome pages to the properties view. Make the
properties view reflect changes in the IDE better.
2022-11-24 16:49:54 +01:00
Olivier Goffart
b6e29daa9c CI: add url to crater 2022-11-24 15:52:49 +01:00
Simon Hausmann
f2c5184bf2 Fix embedding of images referenced in globals
When doing builds that require image embedding (such as for WASM), it's crucial
to also visit the globals (after they've been collected) to catch all image references.
2022-11-24 15:04:25 +01:00
Olivier Goffart
b165cdb160 Flickable should not accept mouse release event if it was not flicking
We need to continue propagating the release event to other element (eg
other flickable)

Fix the flickable flicking even though the mouse is released if there are
several Flickable in the component.
2022-11-24 14:55:46 +01:00
Simon Hausmann
885fcc1ac8 Express material design typographic tokens in relative-font-size
The spec at https://m3.material.io/styles/typography/type-scale-tokens defines
label-large, label-medium, etc.
relative to 16px.
2022-11-24 13:56:31 +01:00
Tobias Hunger
c8b434021e tools: Put code shared between online editor and vscode in NPM package
Put the shared code into an NPM package. This makes especially vscode
much happier as it does not need to build code outside its project root
anymore:-)
2022-11-24 12:57:47 +01:00
Olivier Goffart
c26b01f4f7 janitor: Replace deprecated property in docs 2022-11-24 12:06:16 +01:00
Simon Hausmann
247772104a Move WindowEvent, PointerEventButton and Key to the platform module
For `Key` this is a move, as it is a new type. For `WindowEvent` and `PointerEventButton` deprecated aliases
are provided.
2022-11-24 11:34:28 +01:00
Simon Hausmann
d8a1f2cf01 Introduce a rem unit in the type system
This allows specifying font sizes relative to the Window's
default-font-size, similar to CSS rem.
2022-11-24 11:33:38 +01:00
Simon Hausmann
75ccd897ed Document PointerEventButton
This is public API.
2022-11-24 10:43:11 +01:00
Simon Hausmann
0dbde222f2 Improve docs for the init callback
Elaborate on the order of invocation and state of properties with regards to
initialized bindings.
2022-11-24 10:24:54 +01:00