spectrum-web-components icon indicating copy to clipboard operation
spectrum-web-components copied to clipboard

[Feat]: Upgrade docs copy/paste for import inclusions

Open Westbrook opened this issue 1 year ago • 2 comments

Code of conduct

  • [X] I agree to follow this project's code of conduct.

Impacted component(s)

Docs

Description of the requested feature

As referenced in #2291

Can we update the copy/paste functionality in the docs site to include import statements both for the element being documented and any other top level elements used that would otherwise not be imported directly in the element.

Mockups or screenshots

No response

Implementation notes or ideas

No response

Westbrook avatar Aug 07 '23 12:08 Westbrook

What if we added a second button that includes the imports referenced in the HTML fragment?

najikahalsema avatar Sep 19 '23 15:09 najikahalsema

Also leverage function() { navigator.clipboard.writeText(el.innerText); } as needed to include text formatting in the copy.

Westbrook avatar Nov 02 '23 18:11 Westbrook

fixed via #4598

najikahalsema avatar Aug 07 '24 16:08 najikahalsema