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

Generated output suffers from "divception" #59

Open
Merlin04 opened this issue Nov 21, 2022 · 1 comment
Open

Generated output suffers from "divception" #59

Merlin04 opened this issue Nov 21, 2022 · 1 comment

Comments

@Merlin04
Copy link

Just found Plasmic and it looks really cool, the exact sort of thing I was looking for for my personal website. However, I took a look at the generated output (on the homepage) and it seems to create an excessive number of div elements ("divception") for a given element.

The "sign up" button, which would ideally be a single a tag:
screenshot of div elements
screenshot of button

The div with a couple headers and a button at the top of the page, which would ideally be a single div tag with h1, p, and a tags as children:
image
image

This is also causing Pagespeed Insights to complain:
image

This greatly increases network payload and makes layout harder to debug for no benefit to the user - I'm not sure I feel comfortable using Plasmic until this is resolved. Maybe as a stopgap solution some sort of html cleaner could be put in front of the output, if that exists?

@yang
Copy link
Contributor

yang commented Dec 2, 2022

Thanks for the kind words and for sharing this feedback!

We're definitely thinking about how to tighten up the output. Some of the challenges here are around keeping an intuitive layout and styling system within the visual editor at the same time. For instance, we insert extra div wrappers in order to simulate cross-browser-compatible flex gap. And supporting slots where the text you pass in must be style-able means an extra div for that as well.

All that said, we think there are solutions here. However, in terms of timeline, we're trying to tackle things in descending priority order—there are a few other optimization work that come a bit higher on the list, but this is definitely on the roadmap.

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

2 participants