Skip to content
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

Implement copy-screenshot-to-clipboard on Web #8607

Merged
merged 7 commits into from
Jan 8, 2025
Merged

Conversation

emilk
Copy link
Member

@emilk emilk commented Jan 7, 2025

@emilk emilk added 🕸️ web regarding running the viewer in a browser 📺 re_viewer affects re_viewer itself include in changelog labels Jan 7, 2025
@emilk emilk marked this pull request as draft January 7, 2025 19:58
Copy link

github-actions bot commented Jan 7, 2025

Web viewer built successfully. If applicable, you should also test it:

  • I have tested the web viewer
Result Commit Link Manifest
5d5350c https://rerun.io/viewer/pr/8607 +nightly +main

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

@emilk emilk marked this pull request as ready for review January 7, 2025 20:14
Copy link
Member

@abey79 abey79 left a comment

Choose a reason for hiding this comment

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

Seems that this PR broke meshes in Safari/GL. At least that's what I'm seeing with the web build, which I dont see in other PR.

image

edit: nvm, it's #8577

edit2: nvm, it's some more downcast typos

Copy link
Member

@abey79 abey79 left a comment

Choose a reason for hiding this comment

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

This doesn't seem to work on Safari:

image

Copy link
Member

@abey79 abey79 left a comment

Choose a reason for hiding this comment

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

code lgtm, but as noted doesn't work on safari

@emilk
Copy link
Member Author

emilk commented Jan 8, 2025

I am guessing safari isn't working because there is a frame-delay between the click and the screenshot being captured, and safari doesn't allow copying unless it in a direct response to a user action…

Maybe I'll just remove the button on safari.

@abey79
Copy link
Member

abey79 commented Jan 8, 2025

We've had the same problem back then for copying text and eventually solved it. Any chance we can use the same strategy?

@emilk
Copy link
Member Author

emilk commented Jan 8, 2025

The solution was to run egui on-click, which works if the copy-action then happens on click.

In this case, the click results in a deferred screenshot capture that appears next frame, and so Safari says "whoa there, why are you trying to access the clipboard when there was no user action to trigger it?"

@emilk emilk merged commit 4b8a487 into main Jan 8, 2025
31 checks passed
@emilk emilk deleted the emilk/remove-arboard branch January 8, 2025 15:26
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 🕸️ web regarding running the viewer in a browser
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Space-view screenshotting on Web
2 participants