Skip to content

Conversation

IsseW
Copy link
Member

@IsseW IsseW commented Sep 11, 2025

Related

What

Adds share buttons to timeline context menus (left click) as described in #10817

  • Look into adding keybind and keybind in ui (leave for future PR)

@IsseW IsseW added 📺 re_viewer affects re_viewer itself do-not-merge Do not merge this PR include in changelog labels Sep 11, 2025
Copy link

github-actions bot commented Sep 11, 2025

Web viewer built successfully.

Result Commit Link Manifest
7ab45b0 https://rerun.io/viewer/pr/11186 +nightly +main

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

@IsseW IsseW force-pushed the isse/time-context-menu-links branch from 7297e91 to 255c9d1 Compare September 11, 2025 16:29
@IsseW IsseW force-pushed the isse/time-context-menu-links branch from 255c9d1 to fc7e5de Compare September 11, 2025 16:40
@Wumpf Wumpf self-requested a review September 12, 2025 11:34
@IsseW IsseW force-pushed the isse/time-context-menu-links branch from f302874 to 616ab1c Compare September 12, 2025 11:59
Base automatically changed from isse/url-context to main September 12, 2025 12:28
@IsseW IsseW force-pushed the isse/time-context-menu-links branch from 616ab1c to bdca0ac Compare September 12, 2025 12:38
@IsseW IsseW added ui concerns graphical user interface and removed do-not-merge Do not merge this PR labels Sep 12, 2025
@IsseW IsseW mentioned this pull request Sep 8, 2025
1 task
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.

huh some serious devil in the details here!
can we try to make this work without the feature flags? (see comment) 🤔
otherwise lgtm

Comment on lines 23 to 29
/// Information about what this url can do, can be used to hide UI for
/// sharing when we know it won't work.
///
/// This should be kept up to date with what `ViewerOpenUrl::new` does
// TODO(isse): I don't really like how this has to be kept up to date manually with
// `ViewerOpenUrl`, would be nice to consolidate.
pub fn features(&self, store_hub: &crate::StoreHub) -> Option<UrlFeatures> {
Copy link
Member

Choose a reason for hiding this comment

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

I get how you arrived here but I very much concur that this is nasty to maintain.
Alternative suggestion: Where this is used right now we can just create the url with all the needed context and then see if the data we put in "sticks"

Copy link
Member Author

Choose a reason for hiding this comment

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

I think maybe better to just always show them for now tbh. The problem with creating the url and why I created this structure to begin with was to try avoid moving ViewerOpenUrl to a lower crate. And the time panel does not have access to it.

Copy link
Member

Choose a reason for hiding this comment

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

ohhh didn't realize this was in re_viewer_context. That complicates things 🤔

Copy link
Member Author

Choose a reason for hiding this comment

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

Moved ViewerOpenUrl to re_viewer_context now, and I think it's much nicer

Copy link
Member

Choose a reason for hiding this comment

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

🥳

@Wumpf Wumpf self-requested a review September 15, 2025 07:59
@Wumpf
Copy link
Member

Wumpf commented Sep 16, 2025

I thiiiink this is a known bug in egui to do a line wrap here when it shouldn't, but worth a quick poke

image

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.

played around with it and feature works like a charm now. Thanks for all the refactoring and disentanglement, looks waaaaay better now; also very muhc not sad about saying bye to UrlContext again 😄

/// Copies the given url to the clipboard.
///
/// On web this adds the viewer url as the base url.
CopyViewerUrl(String),
Copy link
Member

Choose a reason for hiding this comment

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

good workaround/disentanglement/clarification!

/// Origin used to show the examples ui in the redap browser.
///
/// Not actually a valid origin.
pub static EXAMPLES_ORIGIN: LazyLock<re_uri::Origin> = LazyLock::new(|| re_uri::Origin {
Copy link
Member

Choose a reason for hiding this comment

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

much better place for this, agreed.

Comment on lines +33 to +37
re_log_encoding = { workspace = true, features = [
"decoder",
"encoder",
"stream_from_http",
] }
Copy link
Member

Choose a reason for hiding this comment

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

a bit unfortunate to have this and re_data_source come in here now (no idea if they were already transitive dependencies), but willing to pay that price for the refactors in this PR

@IsseW
Copy link
Member Author

IsseW commented Sep 16, 2025

I thiiiink this is a known bug in egui to do a line wrap here when it shouldn't, but worth a quick poke
image

Yeah I've looked at that, and tried to set the context menu to a fixed size.

But that happens specifically if you first open the context menu with the shorter text, i.e "Copy link to timestamp" and then open the longer one. If you do it the other way around it doesn't wrap.

Maybe I could somehow reset egui memory of the size before it opens, but feels really hacky :/

@IsseW IsseW merged commit 1470937 into main Sep 16, 2025
40 checks passed
@IsseW IsseW deleted the isse/time-context-menu-links branch September 16, 2025 08:34
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