-
Notifications
You must be signed in to change notification settings - Fork 24
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
Expose the internal u64 part of TileId #40
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jleibs
force-pushed
the
jleibs/expose_tile_id
branch
from
December 19, 2023 16:54
f0c5263
to
dcdcde1
Compare
4 tasks
jleibs
added a commit
to rerun-io/rerun
that referenced
this pull request
Dec 21, 2023
### What - Resolves: #4285 - Depends on egui_tiles PR: rerun-io/egui_tiles#40 **Best reviewed commit-by-commit** This introduces a new blueprint archetype for Containers. Although eventually we want to do direct modification of the blueprint via the same sort of `set_` pattern, I decided it would make for easier starting point / sanity check to re-implement an equivalent "end-of-frame" sync. This now only runs when some form of manual edit has happened to the blueprint. A simplfication pass also keeps us from storing the trivial tabs back into the store, making the ContainerBlueprint structure a better authoritative view of our layout for things like the Tree UI. Since it's still somewhat unstable, the new behavior is guarded by a new experimental flag that can be enabled / disabled. ### Important Details When building up the TileTree from the blueprint we use TileIds that are a function of the BlueprintId for the containing tile. This simplifies construction since we know from our `IncludedContents` component exactly which tiles the inserted content will map to, even if it hasn't been inserted yet. When mapping the tile back to the blueprint store, we still need to scan all of the tiles to figure out what content ids they should map to. If the tile-id matches a known cotntainer-id from the blueprint, then we update the corresponding container, preserving the id. We also do some simplification during this pass and "trivial tabs" instead get mapped directly to their space-views so they don't need to show up in the blueprint container. ### Known issues - Grid holes aren't tracked because egui_tiles doesn't expose these through a public API. ### 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/4580/index.html) * Using examples from latest `main` build: [app.rerun.io](https://app.rerun.io/pr/4580/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/4580/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/4580) - [Docs preview](https://rerun.io/preview/68e28bbea937694f026734f69893c24f1be6692b/docs) <!--DOCS-PREVIEW--> - [Examples preview](https://rerun.io/preview/68e28bbea937694f026734f69893c24f1be6692b/examples) <!--EXAMPLES-PREVIEW--> - [Recent benchmark results](https://build.rerun.io/graphs/crates.html) - [Wasm size tracking](https://build.rerun.io/graphs/sizes.html)
Wumpf
pushed a commit
to rerun-io/rerun
that referenced
this pull request
Dec 22, 2023
### What - Resolves: #4285 - Depends on egui_tiles PR: rerun-io/egui_tiles#40 **Best reviewed commit-by-commit** This introduces a new blueprint archetype for Containers. Although eventually we want to do direct modification of the blueprint via the same sort of `set_` pattern, I decided it would make for easier starting point / sanity check to re-implement an equivalent "end-of-frame" sync. This now only runs when some form of manual edit has happened to the blueprint. A simplfication pass also keeps us from storing the trivial tabs back into the store, making the ContainerBlueprint structure a better authoritative view of our layout for things like the Tree UI. Since it's still somewhat unstable, the new behavior is guarded by a new experimental flag that can be enabled / disabled. ### Important Details When building up the TileTree from the blueprint we use TileIds that are a function of the BlueprintId for the containing tile. This simplifies construction since we know from our `IncludedContents` component exactly which tiles the inserted content will map to, even if it hasn't been inserted yet. When mapping the tile back to the blueprint store, we still need to scan all of the tiles to figure out what content ids they should map to. If the tile-id matches a known cotntainer-id from the blueprint, then we update the corresponding container, preserving the id. We also do some simplification during this pass and "trivial tabs" instead get mapped directly to their space-views so they don't need to show up in the blueprint container. ### Known issues - Grid holes aren't tracked because egui_tiles doesn't expose these through a public API. ### 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/4580/index.html) * Using examples from latest `main` build: [app.rerun.io](https://app.rerun.io/pr/4580/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/4580/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/4580) - [Docs preview](https://rerun.io/preview/68e28bbea937694f026734f69893c24f1be6692b/docs) <!--DOCS-PREVIEW--> - [Examples preview](https://rerun.io/preview/68e28bbea937694f026734f69893c24f1be6692b/examples) <!--EXAMPLES-PREVIEW--> - [Recent benchmark results](https://build.rerun.io/graphs/crates.html) - [Wasm size tracking](https://build.rerun.io/graphs/sizes.html)
emilk
approved these changes
Dec 30, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This makes it significantly easier to map to and from other externally managed ids.
Also, uncovered and resolved a related issue to inserting arbitrary ids into a new tree by checking for collisions on insert.