Tobias Hunger
3c9dca6daf
janitor: Update pre-commit config
2023-11-07 14:59:36 +01:00
Simon Hausmann
a5c3692fbc
Add progress-indicator accessible role
2023-11-07 13:37:12 +01:00
Olivier Goffart
f4591d4771
Gallery: don't hinerit from layout
...
it has performences implication as if you inherit from a layout it is always inlined
Since this component is used many times, it makes a difference
2023-11-07 12:03:06 +01:00
Olivier Goffart
2f6410515c
Assign value to ImageInnner enum
...
To make sure there are no binary incompatibilities when features are missing
2023-11-07 12:01:38 +01:00
Simon Hausmann
33048000b6
Bump napi dependencies
2023-11-07 11:50:49 +01:00
Simon Hausmann
8dcab7fc71
Fix build with current napi
2023-11-07 11:45:44 +01:00
Olivier Goffart
34ea148c48
Fluent combobox: always put the first item on top
...
Currently it's always the second, but that's not great.
Ideally it should be the current active element, but that's hard to
compute
This becomes extra-relevent when our preview UI has a combobox on the
top and that it is clipped to the window by winit
Fixes https://github.com/slint-ui/slint/issues/3345
2023-11-07 11:12:27 +01:00
Tobias Hunger
6206504dca
lsp: Do not use a spinner and show errors
...
... as the UI thread is blocked. Print a status text instead.
Also show errors (if any).
Fixes : #3858
2023-11-07 10:57:54 +01:00
Tobias Hunger
517d8cb58d
slintpad/vscode: Reduce interactions with canvas
...
Remove the outline and the touch action via styling.
2023-11-07 10:57:54 +01:00
Simon Hausmann
1a064e09a8
Node.js tutoria: Don't mention a main function
...
No such function exists
2023-11-07 09:04:32 +01:00
Simon Hausmann
7576ea71f2
Node.js tutoria: Use await when calling run()
...
As it happens, the run() call is the last call in the app, so it also works without
await. But the moment somebody
adds code after run(), they'd be surprised
that it gets called
"before" run. So await for good measure.
2023-11-07 09:04:32 +01:00
Simon Hausmann
ee096f4386
Fix Node.js tutorial's package.json
...
Require 1.3.0, as the sources use API from that version.
2023-11-07 09:04:32 +01:00
Simon Hausmann
2acaa222d0
Provide some "bare-bones" documentation for component libraries ( #3865 )
...
Sadly, this makes it a bit more obvious that this feature is practically only
available to Rust devs using build.rs
at the moment.
Co-authored-by: Olivier Goffart <olivier.goffart@slint.dev>
2023-11-06 18:33:03 +01:00
Simon Hausmann
432103d38f
Node.js: Seal modules and component instances
2023-11-06 18:32:01 +01:00
Simon Hausmann
849b583b77
doc: update the tutorial README to mention the node tutorial
2023-11-06 17:39:13 +01:00
Simon Hausmann
e248093236
Fix missing import in SlintPad hello World
...
Amends 49feb994bc
2023-11-06 16:17:42 +01:00
Simon Hausmann
49feb994bc
Fix hello world in slintpad with dark mode
...
Use AboutSlint, as that adapts to the theme. Discussed in coffee break :-)
Fixes #3853
2023-11-06 14:34:35 +01:00
Tobias Hunger
fa7fe55faf
lsp: Update UI for release
...
Disable the "Design Mode" button for now as selectionis not great and
add a label before the Style ComboBox.
2023-11-06 13:15:34 +01:00
Simon Hausmann
7b61e455eb
Initial implementation of a Slint event loop sitting on top of Node.js
...
At the moment this is implemented using polling.
cc #2477
2023-11-06 11:37:45 +01:00
Simon Hausmann
ee9f1a52a8
winit: Make it possible to resume the event loop while maintaining state
...
This way if for example the application quits the event loop while
pressed is true, and then resumes shortly afterwards, we maintain the
pressed state correctly.
2023-11-06 11:37:45 +01:00
Simon Hausmann
5a8dbfc623
Combine animation button and duration into one row
...
This way the animate-all button is not over-sized.
2023-11-06 10:55:00 +01:00
Simon Hausmann
7378f0122c
Polish easing curve animation button
...
Avoid shouting exclamation mark in labels.
2023-11-06 10:55:00 +01:00
Simon Hausmann
fd1c987c65
Add spaces surrounding curly braces
...
Minor formatting nit :)
2023-11-06 10:55:00 +01:00
Olivier Goffart
a4a1a4754e
Slintpad: fix "property" tab position
2023-11-06 10:52:03 +01:00
Olivier Goffart
582855f634
Energy monitor: restore wasm canvas size to demo's preferred size
2023-11-06 08:26:03 +01:00
Simon Hausmann
3a9288003d
Re-enable accesskit ( #3833 )
...
Port to the latest accesskit and accesskit_winit:
- NodeId is now a u64 instead of u128, so trim the component/item encoding.
- Adjust to some enum renamings.
- TreeUpdate now always requires a focus node, which we set to the root.
- Fixed focus handling on macOS: Report FocusIn to the accesskit
adapter, so that it can update its internal host_is_focused state
correctly.
2023-11-05 09:04:05 +01:00
Update Translations Bot
8becbeb292
Update Translations: extract strings
2023-11-04 03:04:04 +00:00
Tobias Hunger
ca36c1b7d5
lsp: Add native style into preview and default to it
2023-11-03 22:14:20 +01:00
Tobias Hunger
a19cfd06b2
lsp: Make preview the authorative source for style usage
2023-11-03 22:14:20 +01:00
Tobias Hunger
7c38e08347
lsp: Do not panic when showing a document to the user
2023-11-03 22:14:20 +01:00
Tobias Hunger
5bf5b7b02d
lsp: Clean up PreviewApi
...
request_state went the wrong way around wrt. communication flow, so
remove and deduplicate it.
2023-11-03 22:14:20 +01:00
Tobias Hunger
fbb6d70ff9
lsp: Improve design mode handling
...
* Make sure design mode stays enabled when refreshing the preview. This
stops the strange click-throughs from happening
* Keep highlighting enabled while in Design Mode
2023-11-03 22:14:20 +01:00
Tobias Hunger
d1a26fe425
lsp: Default to native style is available and nothing else is set
2023-11-03 22:14:20 +01:00
Tobias Hunger
8886d858d3
lsp: Rename StartedLoop
2023-11-03 22:14:20 +01:00
Tobias Hunger
703cc4c10f
slintpad: Open preview on project change automatically
2023-11-03 22:14:20 +01:00
Tobias Hunger
8981a215ea
slintpad: Do not fail to re-open a project
...
We do not need the modelRef dance: We use one editor that is properly
configured already.
2023-11-03 22:14:20 +01:00
Tobias Hunger
a0a4414b6b
lsp: Remember that to preview in WASM mode
2023-11-03 22:14:20 +01:00
Tobias Hunger
737d09f4dd
lsp: Make conversion of diagnostics more robust
...
... especially when in WASM.
2023-11-03 22:14:20 +01:00
Tobias Hunger
b17d566349
lsp: Derive more Debug implementations
2023-11-03 22:14:20 +01:00
Tobias Hunger
df085fd319
vscode: Fix wasm preview
...
... not getting the default style and not taking all available space to
render.
2023-11-03 22:14:20 +01:00
Tobias Hunger
5e257e2654
LSP: Fix highlighting of top-level item
2023-11-03 22:14:20 +01:00
Tobias Hunger
6262bd19ca
vscode: Use configured style as default when opening preview UI
...
Ignore any later changes (till we open a the UI again), the Preview UI
style selector handles that.
2023-11-03 22:14:20 +01:00
Tobias Hunger
9093f74bef
LSP: Remove compiler env var line from build.rs
2023-11-03 22:14:20 +01:00
Tobias Hunger
c3cabc8751
lsp: Build preview UI with Design Mode text and default style
2023-11-03 22:14:20 +01:00
Tobias Hunger
4246168b2a
Add style combobox to preview UI
...
... and remove code supporting style selection from slintpad and vscode.
2023-11-03 22:14:20 +01:00
Tobias Hunger
e5bfddf73f
lsp: Improve preview UI
...
A big thank you to @FloVanGH !
2023-11-03 22:14:20 +01:00
Tobias Hunger
cf9bbe8171
slintpad: Update dependencies
...
This unbreaks the typical "the lngauge server uses a different version
of vscode-jsonrpc than the languageclient", which leads to the typical
"byName" messages in the console...
Try to be strict with the versioning: We need the *exact* versions of
everything as even patch-level changes do lead to breakage: The monaco
and vscode packages are *very* tightly coupled.
2023-11-03 22:14:20 +01:00
Tobias Hunger
3626fece0b
Make preview UI work with VSCode
2023-11-03 22:14:20 +01:00
Tobias Hunger
ada7d6179d
slintpad: Remove service worker again
...
Now that the compiler does the resource URL mapping, we do not urgently
need the service worker anymore.
Closes : #2905
2023-11-03 22:14:20 +01:00
Tobias Hunger
d53cebd3e1
lsp: Get signalled by the preview
2023-11-03 22:14:20 +01:00