-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Expose "Copy link to post" menu item in Post Dropdown menu #6655
base: main
Are you sure you want to change the base?
Expose "Copy link to post" menu item in Post Dropdown menu #6655
Conversation
} | ||
} | ||
|
||
export function copyUrl(url: string) { | ||
setStringAsync(url) |
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.
question: setStringAsync
could fail. Should we make this function async and await the setStringAsync(url)
call to ensure we actually copy the url before showing the toast?
<Prompt.Basic | ||
control={copyPostUrlLoggedOutWarningPromptControl} | ||
title={_(msg`Note about sharing`)} | ||
description={_( | ||
msg`This post is only visible to logged-in users. It won't be visible to people who aren't logged in.`, | ||
)} | ||
onConfirm={onCopyPostUrl} | ||
confirmButtonCta={_(msg`Share anyway`)} | ||
/> |
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 duplicated the prompt for simplicity, but we might want to change the copy here. Copying a link might not always result in sharing, but it's most likely the case.
</Menu.ItemText> | ||
<Menu.ItemIcon icon={Share} position="right" /> | ||
<Menu.ItemText>{_(msg`Copy link to post`)}</Menu.ItemText> | ||
<Menu.ItemIcon icon={ChainLink} position="right" /> |
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.
question: I chose this icon because it's related to links, but Web used the Share
icon before. Do we want to keep using the Share
icon for web?
As an iOS user, this would be great to have as it simply makes copying the URL easier and faster. But of course more importantly, it seems like it would solve a big issue for some Android users. I hope the team are able to take a look at this soon and hopefully get it merged 🙏 |
Thank you for this! We're actually planning on going a different route and adding a dedicated share menu, which would include the option to copy to clipboard |
Some Android users are having problems copying post links using the native app because Bluesky currently relies on using the native share dialog to provide such functionality. However, not all Android flavors allow you to copy links from the native share dialog.
Here's an example I shared in the original issue from a user with a Xiaomi device running HyperOS:
Screenshot of the HyperOS share dialog
To solve this UX issue, this PR adds a new "Copy link to post" for all platforms.
While this isn't needed on iOS and some Android flavors, it reduces the amount of presses the user needs to make to copy the link to a publication from 3 to 2.
Fixes #5912.
Manual tests
Android
https://github.com/user-attachments/assets/82c9733a-055a-4fc3-8e58-8530c7496a88
Web
https://github.com/user-attachments/assets/8a89b0a3-28d0-42d2-a4bd-408f18eedd4e