Commit graph

53 commits

Author SHA1 Message Date
MusicalNinjaDad
2a81357c03
slint-build: Add option to create CompilerConfiguration with_debug_info (#8489)
Some checks are pending
CI / build_and_test (ubuntu-22.04, nightly) (push) Blocked by required conditions
CI / node_test (macos-14) (push) Blocked by required conditions
CI / node_test (ubuntu-22.04) (push) Blocked by required conditions
CI / node_test (windows-2022) (push) Blocked by required conditions
CI / python_test (macos-14) (push) Blocked by required conditions
CI / python_test (ubuntu-22.04) (push) Blocked by required conditions
CI / python_test (windows-2022) (push) Blocked by required conditions
CI / cpp_test_driver (macos-13) (push) Blocked by required conditions
CI / cpp_test_driver (ubuntu-22.04) (push) Blocked by required conditions
CI / cpp_test_driver (windows-2022) (push) Blocked by required conditions
CI / cpp_cmake (macos-14, 1.82) (push) Blocked by required conditions
CI / cpp_cmake (ubuntu-22.04, stable) (push) Blocked by required conditions
CI / cpp_cmake (windows-2022, nightly) (push) Blocked by required conditions
CI / cpp_package_test (push) Blocked by required conditions
CI / vsce_build_test (push) Blocked by required conditions
CI / mcu (pico-st7789, thumbv6m-none-eabi) (push) Blocked by required conditions
CI / mcu (pico2-st7789, thumbv8m.main-none-eabihf) (push) Blocked by required conditions
CI / mcu (stm32h735g, thumbv7em-none-eabihf) (push) Blocked by required conditions
CI / mcu-embassy (push) Blocked by required conditions
CI / ffi_32bit_build (push) Blocked by required conditions
CI / docs (push) Blocked by required conditions
CI / wasm (push) Blocked by required conditions
CI / wasm_demo (push) Blocked by required conditions
CI / tree-sitter (push) Blocked by required conditions
CI / updater_test (0.3.0) (push) Blocked by required conditions
CI / fmt_test (push) Blocked by required conditions
CI / esp-idf-quick (push) Blocked by required conditions
CI / android (push) Blocked by required conditions
CI / miri (push) Blocked by required conditions
CI / test-figma-inspector (push) Blocked by required conditions
2025-05-21 08:17:09 +02:00
Simon Hausmann
b098bccc32 Propagate default font properties into PopupWindow 2025-04-24 09:18:45 +02:00
Arnold Loubriat
cc91de2d38 Add the accessible-read-only property 2025-02-19 09:16:41 +01:00
Simon Hausmann
479bee7c87 Add support for exposing PopupWindow instances in the element tree when active 2025-02-10 13:57:55 +01:00
Yuri Astrakhan
bcb2953f00 Auto-fixed clippy::unnecessary_map_or
This is a hacky approach, but does help a lot with the tedious fixes.

See https://rust-lang.github.io/rust-clippy/master/index.html#/unnecessary_map_or

```
__CARGO_FIX_YOLO=1 cargo clippy --fix  --all-targets --workspace --exclude gstreamer-player --exclude i-slint-backend-linuxkms --exclude uefi-demo --exclude ffmpeg -- -A clippy::all -W clippy::unnecessary_map_or

cargo fmt --all
```
2025-02-07 09:02:31 +01:00
Arnold Loubriat
358e42a8d5 Add the accessible-action-expand action 2025-02-03 20:32:45 +01:00
Arnold Loubriat
f30f953ffd Add the accessible-expanded property 2025-02-03 20:32:45 +01:00
Arnold Loubriat
53fd7b12e4 Add the accessible-expandable property 2025-02-03 20:32:45 +01:00
Tasuku Suzuki
346d1c2df3 Fix typos
Ran `typos .` and fixed all typos that do make sense.
https://crates.io/crates/typos
2025-01-13 08:35:20 +01:00
Olivier Goffart
a3dad45f0b Accessibility: rename a few properties after API review:
- Rename `accessible-selectable` and `accessible-selected` to `accessible-item-{selectable,selected}`.
   Because the property is for items in list rather than eg Text
 - Rename `accessible-position-in-set` to `accessible-item-index`.
 - Rename `accessible-size-of-set` to `accessible-item-count` and move
   the property to the container element rather than the item itself
2024-12-07 08:25:42 +01:00
Arnold Loubriat
97219c21bf Add the accessible-size-of-set property 2024-10-30 15:54:01 +08:00
Arnold Loubriat
67166fcc2d Add the accessible-position-in-set property 2024-10-30 15:54:01 +08:00
DataTriny
2de3b9d455 Add the accessible-enabled property 2024-10-25 10:20:09 +02:00
Arnold Loubriat
19f09950c2 Changelog: Add accessible-selectable and accessible-selected properties 2024-10-16 15:38:46 +02:00
Simon Hausmann
b2873a3d17 ui-testing: Add support for reading the computed opacity of elements
This is useful when the UI shows for example labels that appear and the screenshot for referenceing is meant to be taken when the opacity animation is complete and the value is (near) 1.0.
2024-09-19 11:28:18 +02:00
Olivier Goffart
43c7f57b0f spawn_local: initialize the platform if not initialized before the call
Take the opportunity to refactor a bit the way the global platform or
context is accessed

Fixes: #5871
2024-08-21 13:26:04 +02:00
Simon Hausmann
cadfd9e104 Testing: Fix querying for elements by id when using _
The compiler normalizes `the_element` to `the-element`, so we also need to normalize that behind our API.
2024-08-05 10:32:21 +02:00
Simon Hausmann
52f8249189 testing: Minor rename after a quick round of API review
- ElementHandle::match_descendants() becomes ElementHandle::query_descendants() to emphasize that this creates a query.
- Added ElementQuery::from_root() to remove the need to use the ElementRoot trait.
2024-07-15 11:30:34 +02:00
Simon Hausmann
790ae9c1bb Remove last use of ElementHandle::visit_elements from Rust testing API 2024-07-15 11:30:34 +02:00
Simon Hausmann
1c2a8f2d2f Replace uses of ElementHandle::visit_elements with matches 2024-07-15 11:30:34 +02:00
Simon Hausmann
b67fcce4a3 Add a new descendants api as well as deeper element queries to ElementHandle 2024-07-15 11:30:34 +02:00
Simon Hausmann
7f05b8aa39 Changed ElementHandle click API to a single_click and double_click function taking the button
That way one can also simulate double right click, for example. This is a little less convenient, more generic, but a reasonable compromise (perhaps :-)
2024-06-28 13:56:51 +02:00
Simon Hausmann
b45945a234
Add support for async unit testing and element handle click events (#5499)
This patch adds async click functions to ElementHandle and adds timer support to the testing backend's event loop.
2024-06-27 17:05:58 +02:00
Arnold Loubriat
ce2db77e88
Add the accessible-placeholder-text property (#5464) 2024-06-26 12:59:22 +02:00
Simon Hausmann
319fa0381c
Doc: Fix stray backtick 2024-06-13 06:33:30 +02:00
Simon Hausmann
0347aae66b Add ElementHandle::accessible_role()
This allows querying for elements by their role/type.
2024-06-11 08:02:10 -07:00
Olivier Goffart
318c80b4f2 testing: only visit items that are visible and not fully clipped 2024-06-07 15:08:44 +02:00
Olivier Goffart
a780dd4905 Testing: Fix duplicated accessibility element
This fix the C++ todo test that wasn't run because of a typo

When an element is optimized in another one, only the first one should
report the accessible properties. (because element with accessible
properties cannot be optimized so they are always the first)
2024-06-07 13:18:12 +02:00
Olivier Goffart
e9deb00332 Testing API: Have a public rust visitor function 2024-06-06 16:12:53 +02:00
Simon Hausmann
28cff6628d Add a test for looking up elements by id that are conditional 2024-06-05 09:51:13 -07:00
Simon Hausmann
15b517a554 Emit a warning to stderr (debug_log) when using the ElementHandle API but there's no debug info present 2024-06-05 01:29:58 -07:00
Simon Hausmann
622991a627 Fix ElementHandle::find_by_element_id docs
Describe what an id is and provide an example.
2024-06-05 01:29:58 -07:00
Simon Hausmann
1a8ce3c659 Add support for optimized rectangles in ElementHandle
Keep merging elements, but remember the boundaries in the debug info, separated by a slash.

Also fixed tests that rely on accessible-label being set only once. For example

```
Button { text: "foo"; }
```

will certainly have "foo" as accessible-label on `Button`, but its internal `Text` element has
an implicit "accessible-label" set to the same
value.

So don't rely on that for now but search by id instead.
2024-06-05 01:29:58 -07:00
Simon Hausmann
a752851d0f Expose element type names and ids in Rust and C++ 2024-06-05 01:29:58 -07:00
Simon Hausmann
4eef2d4936 WIP: Add find_by_element_type_name 2024-06-05 01:29:58 -07:00
Olivier Goffart
43a336b534 C++ part of element_ids
Simplify a bit the llr generation so that there is less code duplication
between Rust and C++
2024-06-05 01:29:58 -07:00
Simon Hausmann
73b5136f98 WIP: Search by qualified element id 2024-06-05 01:29:58 -07:00
Aurindam Jana
3523e86359
Simplify commercial license (#3063)
Base the commercial license on the Royalty-free license adding clauses pertaining to the fees.
2024-05-31 14:06:17 +02:00
Aurindam Jana
9a3aa265d5
Update Royalty-free license (#5257)
Add clarification that Application may not expose Slint APIs.
2024-05-31 10:53:19 +02:00
Simon Hausmann
fbc441c372 Fix invoke_accessible_increment/decrement_action docs
They invoke a callback, not change a property.
2024-05-27 18:52:16 +02:00
Montel Laurent
f63523f708
Add increase/decrease support test (#5224) 2024-05-14 10:40:12 +02:00
Montel Laurent
c37c9d4f26
Testing: Add minimum/maximum support (#5192) 2024-05-10 16:18:02 +02:00
Montel Laurent
f8f3316dc1
Allow to check checkable support (#5186) 2024-05-07 13:44:14 +02:00
Tobias Hunger
2e3b00e38e janitor: Fix some clippy warnings pre-release
Nothing that should be controversial, but the
`internal/compiler/builtin_macros.rs` could point to a thinko in the original
commit.
2024-05-06 16:47:14 +02:00
Olivier Goffart
15f09c9224 Testing: expose the description and the checked accessible property
also rename default_action to accessible_default_action
2024-04-26 15:09:37 +02:00
Simon Hausmann
0e854db0d0 Add some API docs to i-slint-backend-testing 2024-04-26 14:04:04 +02:00
Simon Hausmann
87e6da2131 Make ElementHandle::set_accessible_value easier to use
Take an impl Into<SharedString> so that it can be called with a string literal.
2024-04-24 10:39:03 +02:00
Simon Hausmann
d8c1096149 Testing: Change ElementReference to be weak
We don't want testing variables to affect the life-cycle of elements in the UI.
2024-04-24 10:39:03 +02:00
Olivier Goffart
475ced0a62 C++ testing API: Intreoduce the ElementHandle 2024-04-22 11:28:12 +02:00
Olivier Goffart
64404ceca2 accessibility: return an Option for accessible string values
So we can know whether the item had the property set at all or not
2024-04-19 11:23:26 +02:00