Skip to content

Add OutputCommand for copying text and opening URL:s - #5532

Merged
emilk merged 2 commits into
masterfrom
emilk/output-cmd
Dec 29, 2024
Merged

emilk merged 2 commits into
masterfrom
emilk/output-cmd

Conversation

@emilk

@emilk emilk commented Dec 29, 2024

Copy link
Copy Markdown
Owner

Add OutputCommand for copying text and opening URL:s

* Part of #5424
* Adds `egui::OutputComm
* Part of https://github.com/emilk/egui/issues/5424and`
* Adds `PlatformOutput::commands`
* Deprecates `PlatformOutput::open_url`
* Deprecates `PlatformOutput::copied_text`
@emilk emilk added the egui label Dec 29, 2024
@github-actions

Copy link
Copy Markdown

Preview available at https://egui-pr-preview.github.io/pr/5532-emilkoutput-cmd
Note that it might take a couple seconds for the update to show up after the preview_build workflow has completed.

@emilk
emilk merged commit e2c7e9e into master Dec 29, 2024
@emilk
emilk deleted the emilk/output-cmd branch December 29, 2024 10:59
@Wumpf

Wumpf commented Jan 3, 2025

Copy link
Copy Markdown
Collaborator

@emilk this makes the usage in Rerun a bit tricky here:
https://github.com/rerun-io/rerun/blob/97f816d5e782651b6f3047d35f375b4eb1a305db/crates/viewer/re_viewer/src/app_state.rs#L661

We intercept all clicked urls and check whether they should redirect to an entity. Not sure how we can preserve this functionality. Seems like this would require installing a sort of user provided command handler :/

(There's also a different spot where we enforce all links to be opened in tabs, but that seems less important)

@Wumpf Wumpf mentioned this pull request Jan 3, 2025
4 tasks
@emilk

emilk commented Jan 6, 2025

Copy link
Copy Markdown
Owner Author

@Wumpf instead of inpspecting/mutating PlatformOutput::open_url, just inspect/mutate PlatformOutput::commands?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants