lookbook-hq / lookbook

A UI development environment for Ruby on Rails apps ✨
https://lookbook.build
MIT License
913 stars 94 forks source link

Embed do not have the "copy contents" button #490

Closed bjufre closed 1 year ago

bjufre commented 1 year ago

Describe the bug

I'm building a custom documentation site for our design system, and in order to take advantage of Lookbook we're using previews with the source panel. And we're successful in adding them to the page with no issues. Except for the fact that the action/button for copying the contents is no added.

This is important for the easy adaptation of the design system within the company. I know it's not a huge stopper, but I think it makes things a little more convenient.

To Reproduce

Steps to reproduce the behavior:

  1. Create a preview
  2. Go to the normal Lookbook site
  3. Then add an embed somewhere of the same preview
  4. The copy button is not added in the embed (see images)

Expected behavior

The copy button is also added or at least there's the option to add it.

Screenshots

Lookbook page:

CleanShot 2023-06-22 at 07 32 47@2x

Embed:

CleanShot 2023-06-22 at 07 33 26@2x

Version numbers

Please complete the following information:

allmarkedup commented 1 year ago

Hey @bjufre - sorry for the slow reply! You are totally right, the embeds should definitely include the copy buttons. I haven't had a lot of time to spend on Lookbook recently but this should be a relatively quick thing to add so I'll try to get it done as soon as I get a chance.

Thanks for bringing it to my attention :)

bjufre commented 1 year ago

@allmarkedup thank you very muuuch!!

allmarkedup commented 1 year ago

Hey @bjufre - so sorry this has taken so long but I've just released v2.1.0 that includes the addition of a code copy button in embeds. So I'll close this down now but let me know if you run into any issues with it :)

bjufre commented 1 year ago

@allmarkedup thank you very much for the update! No worries I understand! 💪