... so that we have one that controls the embedding operation and one
that we can turn into a dynamic tree node where the actual embedding
happens.
Mark the placeholder Element as `is_component_placeholder` and make sure to not
optimize out that object in a later pass.
Adapt Element creation to account for the new
`is_component_placeholder`.
* component_factory: Add documentation
What was there was not useful, this is a bit better I think:-)
Co-authored-by: Olivier Goffart <olivier@woboq.com>
Co-authored-by: Simon Hausmann <simon.hausmann@slint-ui.com>
Add a ComponentFactory type which will eventually be used as a property
value in Slint. The idea is to copy around this type and to create
components from it that we can embed.
We do not want to hand raw components around as those are reference counted
and might end up being embedded into several places, which would break out
tree of components.
Ignore the case when the file is not in the documents this normally
shouldn't happen since we iterate from it, but could optentially happen
if a file was removed for example.
but file that don't parse seems strange
This might have been related to #2719
cc #3160
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
Copying the Rust enum instead of using cbindgen because we would need to
create a new header just for it for bublic types generated in the
platform namespace. I've also put it in the SoftwareRenderer class since
the equivalent enum is in the software_renderer module in Rust.
Use default values, choices and nested replacements where those make
sense. Use `$0` to place the cursor once done and add some line
breaking.
Remove the transitions (not mentioned in the docs anymore) snippet, add
a `when` snippet for use in states.
This should in principle not be allowed, it should be relative to the
file itself.
Make it a warning, and at least, don't duplicate the globals
Fixes#2719
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.