Skip to content

Conversation

@jyash97
Copy link
Contributor

@jyash97 jyash97 commented Apr 13, 2020

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.

image

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

  • Testing
  • Ready to be merged
  • Added myself to contributors table

@jyash97 jyash97 changed the title feat: add copy sandbox link on Sandbox Card from Dashboard feat: add copy sandbox link option on Sandbox Card Apr 13, 2020
@lbogdan
Copy link
Contributor

lbogdan commented Apr 13, 2020

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) => {
Copy link
Contributor

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

Copy link
Contributor Author

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.

Copy link
Contributor

Choose a reason for hiding this comment

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

Cool! Thank you!

Copy link
Contributor Author

@jyash97 jyash97 Apr 13, 2020

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.

Copy link
Contributor

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!

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants