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

Name space views after the space and indicate duplicate names #1653

Merged
merged 3 commits into from
Mar 21, 2023

Conversation

jleibs
Copy link
Member

@jleibs jleibs commented Mar 21, 2023

Resolves: #1220

Consider this (admittedly silly) code:

import rerun as rr
import numpy as np

rr.init("space_test", spawn=True)
rr.log_points("space_a/points", positions=np.random.rand(10, 3))
rr.log_points("space_b/space_a/points", positions=np.random.rand(10, 3))
rr.log_points("space_c/points", positions=np.random.rand(10, 3))
rr.log_unknown_transform("space_b/space_a")

Before:
image

After:
image

Additionally hitting "clone view" now generally does the right thing.
image

Checklist

@jleibs jleibs added the ui concerns graphical user interface label Mar 21, 2023
@jleibs jleibs marked this pull request as ready for review March 21, 2023 14:49
@emilk emilk self-requested a review March 21, 2023 15:01
.last()
.map_or_else(|| "/".to_owned(), |part| part.to_string())
} else if let Some(name) = space_path.iter().last() {
let display_name = if let Some(name) = space_path.iter().last() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With this PR we now sometimes get more things named after root (/):

image

…but I still think that this PR is an improvement.

But it would be good to add a comment here for why this is the better choice, so we don't regress here.

@jleibs jleibs merged commit f40752a into main Mar 21, 2023
@jleibs jleibs deleted the jleibs/scene_names branch March 21, 2023 19:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ui concerns graphical user interface
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Creating a new scene should never use the same name as an existing scene
2 participants