The DocumentCache is used to generate a WorkspaceEdit from.
Then we validate that the WorkspaceEdit is referencing
the source file versions in the DocumentCache, without
any chance to update the DocumentCache in between.
That is useless, so get rid of this comparision again.
Instead of having all style duplicated and re-using a base, we just hack
into the funciton that queries the dark/light theme based on the style
suffix known at compile time.
This removes one of the problem that happens when trying to work on the
widget style with the extension, as it relies on include path hacks
And use that in the lsp/ui implementation instead of comments.
This is only a parser support for now, the name is otherwise unused.
Hence I rather keep that experimental.
Theyre are no more shared files, so move the files
into vscode and set up a syntax check over there.
That was not possible before as the typescript
compiler would error out on the shared files being
outside its root directory.
Now that the properties are only used in the live preview,
we can simplify the code a bit.
This gets rid of some sanity checks in the code path as well,
which in turn should fix#5696.
Fixes: #5696
These commands are not needed anymore since we integrated
the property editor into the live preview.
Move the properties code out of `common` and into `preview`
for good measure.
We were trying to convert a node to a wrong kind of node.
Then of course it didn't have the expected children
In debug mode you'd have
```
assertion `left == right` failed
left: SubElement
right: Component
```
from the debug_assert! in `$Node::from`
I changed the call to `.into` to a call to `$Node::new` that return an
option.
Also made the debug_assert into an assert and added track_caller so such
problem are easier to debug in the future. (Retrospectively, we probably
shouldn't have derived From for $Node)
Fix#5642
The change contains no tests because the is_recursive_inclusion function
is currently not tested and would need some effort to create a test
... when deciding whether or not we are dropping into a layout or not.
Components that take @children (like a GroupBox) were misrecognized before.
This is a bit tricky as the optimized Elements do not allow to find out whether
something had a child insertion point. So I need to convert over to the
unoptimized Element found in my `document_cache`.
Unfortunately there the lowering pass for the layouts has not been done yet,
so my "normal" approach to figuring out whether something is a layout or not
does not work anymore:-/
I ended up duplicating the logic of the layout lowering step: Match specific
type names for Builtin types. That's not nice and should be cleaned up at
some point.
* Resizing the key field works again (using an invisible hand-crafted splitter)
* The color of the active/inactive `f(x)` icon was inversed as suggested by
Daniel.