-
Notifications
You must be signed in to change notification settings - Fork 373
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
Add support for $origin in EntityPathExpressions #5288
Labels
🟦 blueprint
The data that defines our UI
Comments
This was referenced Feb 26, 2024
5 tasks
jleibs
added a commit
that referenced
this issue
Mar 15, 2024
…5517) ### What - Initial implementation of: #5288 - Builds on top of: #5516 This is a very dumb first stab at doing variable substitution. - Rather than parse the string to extract potential `$vars` it uses the input environment and blindly tries to substitute all the vars it knows about (currently only `origin`). - The biggest downside of this is we get no feedback when a variable fails to substitute. - There's just enough future complexity handling edge-cases (e.g. mismatched `{`, variable-termination, nested substitutions, etc.) that it might be worth pulling in a proper utility library, though I don't know if there's an obvious rust ecosystem choice here. Working through this uncovered some complexities regarding what we store in different parts of the blueprint. For example, if we do the full substitution immediately when construction the EntityPathFilter, then we can't use that Filter to re-create the query with the variable substitutions. Additionally, we need to know about these substitutions all the way back when evaluating whether we want to keep RecommendedSpaceViews because we need the substitutions applied to do the overlap-checking. I suspect the direction we might want to go in is to split EntityPathFilter into a non-substituted representation, from which we can create a version that executes the substitutions, but I'm not yet sure what the storage should look like. For example, do we just create full `EntityPath`s that contain EntityPathParts with "$origin" in them and then run the substitution on the EntityPath? ### 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/5517/index.html) * Using examples from latest `main` build: [app.rerun.io](https://app.rerun.io/pr/5517/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/5517/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 * [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/5517) - [Docs preview](https://rerun.io/preview/82c517d5786790176b78fdfbff4a5e261a25f7f0/docs) <!--DOCS-PREVIEW--> - [Examples preview](https://rerun.io/preview/82c517d5786790176b78fdfbff4a5e261a25f7f0/examples) <!--EXAMPLES-PREVIEW--> - [Recent benchmark results](https://build.rerun.io/graphs/crates.html) - [Wasm size tracking](https://build.rerun.io/graphs/sizes.html)
Resolved by #5517 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
As described in #4899 we now want to add support for a special expansion $origin in the context of EntityPathExpressions.
The value of $origin should come from the containing SpaceView. This substitution needs to happen during evaluation so that as the space-view's origin is modified, the query is evaluated with the new context.
The text was updated successfully, but these errors were encountered: