Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request attention when Rerun Viewer is sent new recording in background #5780

Merged
merged 1 commit into from
Apr 7, 2024

Conversation

emilk
Copy link
Member

@emilk emilk commented Apr 4, 2024

What

If the Rerun Viewer does not have focus and the user sends it a new recording or blueprint, the viewer will now gently request attention once. On macOS it looks like this (notice the Rerun icon in the bottom left):

request-attention.mp4

This does NOT happen if the Rerun Viewer window already has focus (is on top).

On native this uses:

On web this does nothing.

Testing

  • Linux
  • macOS
  • Windows

Checklist

  • I have read and agree to Contributor Guide and the Code of Conduct
  • I've included a screenshot or gif (if applicable)
  • I have tested the web demo (if applicable):
  • The PR title and labels are set such as to maximize their usefulness for the next release's CHANGELOG
  • If applicable, add a new check to the release checklist!

@emilk emilk added 📺 re_viewer affects re_viewer itself include in changelog labels Apr 4, 2024
@jleibs
Copy link
Member

jleibs commented Apr 5, 2024

Confirmed this works on wayland.

@Wumpf
Copy link
Member

Wumpf commented Apr 7, 2024

works on windows 11. Keeps blinking as expected but it's very subtle

focus.mp4

@Wumpf
Copy link
Member

Wumpf commented Apr 7, 2024

looking a bit closer it's kind weird though: there's an extra flashing after the icon/app is brought in focus

weird.focus.mp4

I haven't seen the focus feature used much in other applications so I don't know if that's normal

@emilk
Copy link
Member Author

emilk commented Apr 7, 2024

@Wumpf Sounds like it is good enough to merge?

@Wumpf
Copy link
Member

Wumpf commented Apr 7, 2024

trying to find out how other apps do this, hold on

@Wumpf
Copy link
Member

Wumpf commented Apr 7, 2024

took me ages to find an application that uses window flashing - most messenger apps don't do that, they change the icon to contain a marker. Buuut Element chat does turns out and it looks exactly like Rerun now so I'll assume the Windows gods want this kind of flashing.
Good enough to merge!

@Wumpf Wumpf merged commit 079490b into main Apr 7, 2024
38 of 42 checks passed
@Wumpf Wumpf deleted the emilk/request-attention branch April 7, 2024 17:49
emilk added a commit that referenced this pull request Apr 7, 2024
…nd (#5780)

### What
If the Rerun Viewer does _not_ have focus and the user sends it a new
recording or blueprint, the viewer will now gently request attention
_once_. On macOS it looks like this (notice the Rerun icon in the bottom
left):


https://github.com/rerun-io/rerun/assets/1148717/b7f8696c-c674-4db5-ad5d-08c1cc837de0

This does NOT happen if the Rerun Viewer window already has focus (is on
top).

On native this uses:
* https://docs.rs/winit/latest/winit/window/enum.UserAttentionType.html

On web this does nothing.

### Testing
* [x] Linux
* [x] macOS
* [x] Windows

### Checklist
* [x] I have read and agree to [Contributor
Guide](https://github.com/rerun-io/rerun/blob/main/CONTRIBUTING.md) and
the [Code of
Conduct](https://github.com/rerun-io/rerun/blob/main/CODE_OF_CONDUCT.md)
* [x] I've included a screenshot or gif (if applicable)
* [x] I have tested the web demo (if applicable):
* Using newly built examples:
[rerun.io/viewer](https://rerun.io/viewer/pr/5780)
* Using examples from latest `main` build:
[rerun.io/viewer](https://rerun.io/viewer/pr/5780?manifest_url=https://app.rerun.io/version/main/examples_manifest.json)
* Using full set of examples from `nightly` build:
[rerun.io/viewer](https://rerun.io/viewer/pr/5780?manifest_url=https://app.rerun.io/version/nightly/examples_manifest.json)
* [x] The PR title and labels are set such as to maximize their
usefulness for the next release's CHANGELOG
* [x] If applicable, add a new check to the [release
checklist](https://github.com/rerun-io/rerun/blob/main/tests/python/release_checklist)!

- [PR Build Summary](https://build.rerun.io/pr/5780)
- [Docs
preview](https://rerun.io/preview/31cdad871a470b3dab022f8b774f91cc73745457/docs)
<!--DOCS-PREVIEW-->
- [Examples
preview](https://rerun.io/preview/31cdad871a470b3dab022f8b774f91cc73745457/examples)
<!--EXAMPLES-PREVIEW-->
- [Recent benchmark results](https://build.rerun.io/graphs/crates.html)
- [Wasm size tracking](https://build.rerun.io/graphs/sizes.html)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants