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

Get screenshot of the component #30

Open
atinux opened this issue Jul 21, 2022 · 5 comments
Open

Get screenshot of the component #30

atinux opened this issue Jul 21, 2022 · 5 comments

Comments

@atinux
Copy link
Member

atinux commented Jul 21, 2022

Using data64, this could be an option disabled by default.

Would love to explore the best way to do this @farnabaz @kevinmarrec

Copy link
Member Author

atinux commented Jul 26, 2022

I think it would be possible once nuxt/framework#5689 land, can you confirm @danielroe @pi0 ?

@pi0
Copy link
Contributor

pi0 commented Jul 26, 2022

Components prefixed wth .island and .server are possible to be individually rendered with linked PR with a specific endpoint.

@danielroe
Copy link
Contributor

danielroe commented Jul 26, 2022

Yes. Currently the PR returns a result like:

{
  "rendered": [ { "html": "<pre data-v-a0337c84> Route: /foo </pre>" } ],
  "scripts": "<script type=\"module\" src=\"/_nuxt/entry.65591c03.mjs\" crossorigin></script><script type=\"module\" src=\"/_nuxt/RouteComponent.96ab4d69.mjs\" crossorigin></script>",
  "styles": "<link rel=\"stylesheet\" href=\"/_nuxt/entry.4e0f8d43.css\"><link rel=\"stylesheet\" href=\"/_nuxt/RouteComponent.2df1bd45.css\">"
}

(API may change as the PR is refined.)

This allows for a completely independent HTML document to be constructed which renders that component only, including all needed CSS. (scripts should be ignored in this context.)

Copy link
Contributor

Tahul commented Nov 27, 2022

Who should we assign @atinux ?

Copy link
Member Author

atinux commented Dec 5, 2022

We can start without screenshots for now on Studio, let's keep it for now and do not assigne anyone.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants