The Wayback Machine - https://web.archive.org/web/20220319193225/https://github.com/storybookjs/storybook/issues/15509
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

The "Copy Canvas Link" leaves out the base url and only gives the iframe information making it useless #15509

Open
TonyHoanTrinh opened this issue Jul 7, 2021 · 6 comments

Comments

@TonyHoanTrinh
Copy link

@TonyHoanTrinh TonyHoanTrinh commented Jul 7, 2021

Describe the bug
It appears the "Copy Canvas Link" on the top right side of the Canvas tab adds to the clipboard only part of the url, it only gives you the iframe part of the url but misses the main base url.

For example if I had my story on this url:
http://localhost:6006/?path=/story/example-button--large

And then I clicked on the "Copy Canvas Link" on the top right (The clipboard on the furthest right):
image

Then when you go over to a new tab and try to copy and paste what you just "Copied" you will get:
iframe.html?id=example-button--large&args=

When it should be instead
http://localhost:6006/iframe.html?id=example-button--large&args=&viewMode=story

You are essentially missing the base part of the url.

I'm not sure if this is intentional or not.

Is this a bug or is this something on my end? If so is there a working solution or a wide to "hide" the "Copy Canvas Link" option on the top right?

Can you easily see this by doing create-react-app new_project and then npx sb init. You can reproduce this issue.

Thanks!

@nishit-prasad
Copy link

@nishit-prasad nishit-prasad commented Jul 8, 2021

Hello I'm new and would like to take this up if it's available. This will get me started to explore more!

@shilman
Copy link
Member

@shilman shilman commented Jul 8, 2021

@nishit-prasad Thank you for helping make Storybook better! 🙏 Please check out how to contribute in our docs and feel free to ask questions in #contributing in our Discord.

@nishit-prasad
Copy link

@nishit-prasad nishit-prasad commented Jul 8, 2021

Sounds good! Thank you. In the meantime, can this be assigned to me?

@nishit-prasad
Copy link

@nishit-prasad nishit-prasad commented Jul 16, 2021

The PR is up and ready! 😄

@shilman shilman added the linear label Nov 17, 2021
@RabbitEarsDesign
Copy link

@RabbitEarsDesign RabbitEarsDesign commented Dec 6, 2021

Is this still outstanding? I am interested in looking into this fix if we still have not solved it yet.

@soso-15315
Copy link

@soso-15315 soso-15315 commented Feb 13, 2022

I haven't seen any activity for a while, so I made a pull request.
I am new to contributing, so please let me know if there is anything I missed.

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