-
Notifications
You must be signed in to change notification settings - Fork 537
Add share link button to time panel context menu #11186
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
Conversation
Web viewer built successfully.
Note: This comment is updated whenever you push a commit. |
7297e91
to
255c9d1
Compare
675341a
to
fc7f16d
Compare
255c9d1
to
fc7e5de
Compare
f302874
to
616ab1c
Compare
616ab1c
to
bdca0ac
Compare
There was a problem hiding this 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
/// 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> { |
There was a problem hiding this comment.
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"
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 🤔
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🥳
There was a problem hiding this 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), |
There was a problem hiding this comment.
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 { |
There was a problem hiding this comment.
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.
re_log_encoding = { workspace = true, features = [ | ||
"decoder", | ||
"encoder", | ||
"stream_from_http", | ||
] } |
There was a problem hiding this comment.
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
Related
What
Adds share buttons to timeline context menus (left click) as described in #10817