Skip to content

Comments

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

Merged
jleibs merged 3 commits intomainfrom
jleibs/scene_names
Mar 21, 2023
Merged

Name space views after the space and indicate duplicate names#1653
jleibs merged 3 commits intomainfrom
jleibs/scene_names

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