* Closes https://github.com/rerun-io/rerun/issues/11301
This fixes a bug where a menu could get stuck, not closing at all, when
the currently open submenu stops being shown.
I also added a way to reproduce this to the demo, as well as a test
ensuring that there is no race condition in the fix.
This adds a new workflow `update_kittest_snapshots.yml` that can be
triggered through the [kitdiff](https://github.com/rerun-io/kitdiff) ui
when viewing a ci artefact.
Also adds a link to kitdiff to view the pr changes to each commit (via
the preview build comment)
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This was initially a PR to add kitdiff, but this now lives in it's own
crate: https://github.com/rerun-io/kitdiff
I needed to make the image loaders public, this way it's possible to
compose image loaders together (which allowed me to create a image diff
loader that uses two other image loaders). But you can't use the
`ctx.try_load_image` since that would deadlock, so you have to store a
reference to the other loader in the wrapping loader.
This adds a new `Plugin` trait and new `input_hook` and `output_hook`
plugin fns. Having a `Plugin` trait should make it easier to store state
in the plugin and improve discoverability of possible plugin hooks.
The old `on_begin_pass` and `on_end_pass` have been ported to use the
new plugin trait, should we deprecate them?
* follow up to #7514
That PR changed the tooltip to preserve the wrapping, which made the
tooltip kind of useless. With this PR the wrapping is reset for the
tooltip.
This adds a new mode, `UPDATE_SNAPSHOTS=force`, which will lower the
threshold to zero, overwriting every image that is not _exactly_ the
same.
Most comparisons has a threshold because different GPUs render slightly
differently. However, setting that threshold accurately can be hard.
Sometimes a test will pass locally, but fail on CI. In those cases you
want to force an update of the failing test. You can use
`UPDATE_SNAPSHOTS=force` for that.
And sometimes a small change _should_ update all images, but the change
is so tiny that it falls under the threshold. Still, you want to make a
point of showing that these images have changes. You can use
`UPDATE_SNAPSHOTS=force` for that.
<!--
Please read the "Making a PR" section of
[`CONTRIBUTING.md`](https://github.com/emilk/egui/blob/main/CONTRIBUTING.md)
before opening a Pull Request!
* Keep your PR:s small and focused.
* The PR title is what ends up in the changelog, so make it descriptive!
* If applicable, add a screenshot or gif.
* If it is a non-trivial addition, consider adding a demo for it to
`egui_demo_lib`, or a new example.
* Do NOT open PR:s from your `master` branch, as that makes it hard for
maintainers to test and add commits to your PR.
* Remember to run `cargo fmt` and `cargo clippy`.
* Open the PR as a draft until you have self-reviewed it and run
`./scripts/check.sh`.
* When you have addressed a PR comment, mark it as resolved.
Please be patient! I will review your PR, but my time is limited!
-->
* Closes <https://github.com/emilk/egui/issues/7466>
* [x] I have followed the instructions in the PR template
* I have ran `./scripts/check.sh` and it has no fails
* I have run `cargo fmt` and `cargo clippy`
Added the deprecated tag to ImageButton struct
Removed the `WidgetType::ImageButton` variant. ImageButton will use
`WidgetType::Button` for its WidgetInfo
*This is my first PR ever, please let me know if I did something wrong
so I can change it*
---------
Co-authored-by: Nicolas <bircni@icloud.com>
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
Co-authored-by: Lucas Meurer <hi@lucasmerlin.me>