-
Notifications
You must be signed in to change notification settings - Fork 2.4k
feat: add copy sandbox link option on Sandbox Card #3886
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
|
Build for latest commit 9d1a58a is at https://pr3886.build.csb.dev/s/new. |
| export const DELETE_SANDBOX_DROP_KEY = 'delete'; | ||
| export const MAKE_TEMPLATE_DROP_KEY = 'makeTemplate'; | ||
|
|
||
| const copyToClipboard = (str: 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.
This is awesome! But we already have this function here:
| copyToClipboard: (str: string) => { |
You can call it from Overmind with effects.browser.copyToClipboard and passing the string
Let me know if you need any help
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.
Hey 👋
Thanks for the quick review, will make this change in some time.
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.
Cool! Thank you!
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.
As we have not refactored these Component yet so is there a way to access effects in Class Components? I was thinking to access the util by useOvermind hook but this won't work here.
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.
You are very right!
I will merge it!
Thank you!
What kind of change does this PR introduce?
Enhancement
What is the current behavior?
We cannot get/copy the sandbox link from the dashboard. Usecase: I wanted to share a link of old codesandbox so I searched on the dashboard and had to open the sandbox to get the link.
What is the new behavior?
Add an option to copy the link directly from Context Menu.
What steps did you take to test this? This is required before we can merge, make sure to test the flow you've updated.
Locally tested 4-5 sandboxes link by copying the link from the above option.
Checklist