Skip to content

Add context menu button to copy partition name#11378

Merged
Wumpf merged 2 commits intomainfrom
isse/copy-partition-name
Sep 30, 2025
Merged

Add context menu button to copy partition name#11378
Wumpf merged 2 commits intomainfrom
isse/copy-partition-name

Conversation

@IsseW
Copy link
Member

@IsseW IsseW commented Sep 30, 2025

Related

Closes RR-2412

What

Adds context menu button to partitions and datasets to copy their names. And adds the same context menu as partitions have to loading partitions.

@IsseW IsseW added ui concerns graphical user interface 📺 re_viewer affects re_viewer itself include in changelog labels Sep 30, 2025
@github-actions
Copy link

github-actions bot commented Sep 30, 2025

Web viewer built successfully.

Result Commit Link Manifest
91c7872 https://rerun.io/viewer/pr/11378 +nightly +main

Note: This comment is updated whenever you push a commit.

Copy link
Member

@Wumpf Wumpf left a comment

Choose a reason for hiding this comment

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

lgtm!

let url = ViewerOpenUrl::from_data_source(receiver).and_then(|url| url.sharable_url(None));
if ui
.add_enabled(url.is_ok(), egui::Button::new("Copy link to partition"))
.on_disabled_hover_text("Can't copy a link to this partition")
Copy link
Member

Choose a reason for hiding this comment

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

Should we print a reason? 🤔
I forget whether that was a well printable error or not

Copy link
Member Author

Choose a reason for hiding this comment

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

We probably can, I'll try it

Comment on lines +410 to +413
if ui.button("Copy dataset name").clicked() {
re_log::info!("Copied {name:?} to clipboard");
ui.ctx().copy_text(name.clone());
}
Copy link
Member

@Wumpf Wumpf Sep 30, 2025

Choose a reason for hiding this comment

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

I literally ran into it now that I needed to copy a dataset id rather than name and I couldn't do it from the web build linked by this PR.
That risk making it cluttery, but can we please also add that here?

@Wumpf
Copy link
Member

Wumpf commented Sep 30, 2025

partially offtopic to this PR, but we're strangle inconsistent of what type of URL we copy where. So for instanace this button
image
gives me without viewer URL

But these give me it with it
image
image

Tbh I'm not even sure which ones I expect where :/
We've recently err'ed on the side of adding viewer URLs because (unless they're totally wrong) they're usually more flexible than not 🤔. Maybe that should just be our policy for everything that isn't obviously a WYSIWYG text copy

- Copy with viewer url on dataset title copy button.
- Show reason why a link can't be copied on hover.
- Add copy dataset id button.
@Wumpf
Copy link
Member

Wumpf commented Sep 30, 2025

thanks!

@IsseW
Copy link
Member Author

IsseW commented Sep 30, 2025

We've recently err'ed on the side of adding viewer URLs because (unless they're totally wrong) they're usually more flexible than not 🤔. Maybe that should just be our policy for everything that isn't obviously a WYSIWYG text copy

I think it's more that recently we've started adding viewer url if we're on web. But we should have this be consistent. Changed it to be the same in the title now.

@Wumpf Wumpf merged commit 7668141 into main Sep 30, 2025
40 checks passed
@Wumpf Wumpf deleted the isse/copy-partition-name branch September 30, 2025 12:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

include in changelog 📺 re_viewer affects re_viewer itself ui concerns graphical user interface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants