lookbook-hq / lookbook

A UI development environment for Ruby on Rails apps ✨

Home Page:https://lookbook.build

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Embed do not have the "copy contents" button

bjufre opened this issue · comments

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:

  • Lookbook: v2.0.4
  • ViewComponent: 3.1.0
  • Rails: 7
  • Ruby: 2.7.8

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 :)

@allmarkedup thank you very muuuch!!

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 :)

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