Skip to content
New issue

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

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

Already on GitHub? # to your account

Make sure there is always an active tab #50

Merged
merged 3 commits into from
Feb 6, 2024

Conversation

emilk
Copy link
Member

@emilk emilk commented Feb 6, 2024

When dragging away an active tab, select a new active tab right away. This ensures things like active_tiles works right away, and don't need waiting for the next call to .ui().

Still, if there is no active tab on ui, call behavior.on_edit to inform the user that there has been a new selection.

@emilk emilk added the enhancement New feature or request label Feb 6, 2024
@emilk emilk merged commit c31aa96 into main Feb 6, 2024
8 checks passed
@emilk emilk deleted the emilk/make-sure-a-tab-is-active branch February 6, 2024 15:19
jleibs pushed a commit to rerun-io/rerun that referenced this pull request Feb 6, 2024
### What
* Closes #4996 (at least problem
1, which is the big one)

The problem was that we would remove the active tab on drag, and a new
active tab would be selected by egui_tiles _the next frame_, but never
written back to the blueprint.

This does a three-pronged fix, each single one should have been enough.

Two of the fixes are in rerun-io/egui_tiles#50:
* Report new tab selection to the behavior (would trigger a blueprint
write)
* Pick a new tab in the same frame

The third fix is adding a fallback in Rerun, in case of any future
mismatch between egui_tiles and blueprint.

### 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:
[app.rerun.io](https://app.rerun.io/pr/5063/index.html)
* Using examples from latest `main` build:
[app.rerun.io](https://app.rerun.io/pr/5063/index.html?manifest_url=https://app.rerun.io/version/main/examples_manifest.json)
* Using full set of examples from `nightly` build:
[app.rerun.io](https://app.rerun.io/pr/5063/index.html?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

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

Successfully merging this pull request may close these issues.

2 participants