react-view icon indicating copy to clipboard operation
react-view copied to clipboard

Copy URL button does not seem to work

Open raunofreiberg opened this issue 5 years ago • 2 comments

I assume that the Copy URL button should work the same as it does in baseweb.design.

Although, out of the box, the code does not seem to be added as a parameter to the URL in the first place, hence the copy URL button has no effect.


I think this is the relevant logic: https://github.com/uber/baseweb/blob/b642d1bd81214dacb8ce05ad4aea1871e482a273/documentation-site/components/yard/index.tsx#L56.

Although, since react-view has no knowledge of a router and Storybook uses an iframe, I don't know if it's possible.

raunofreiberg avatar Jan 10 '20 14:01 raunofreiberg

Yea, I had hard times with Storybook and updating/persisting the URL (I guess the iframe also doesn't help). So the URL copy feature is currently useless there. Might be fixable, I gave up pretty quick.

tajo avatar Jan 10 '20 18:01 tajo

I could technically get it working by messing with the browser history, but just inside the iframe.

image

raunofreiberg avatar Jan 10 '20 20:01 raunofreiberg