Repository navigation
Conversation
makeCreatePlasmicElement interpolates every optional attribute (data-plasmic-root, data-plasmic-for-node, trigger props) as an empty string when it doesn't apply, leaving empty lines in the element. The CLI used to hide them because prettier removed blank lines between JSX attributes, but prettier 3.9 keeps one (prettier/prettier#19161), so since @plasmicapp/cli 0.1.380 every synced non-root element gets an empty line after data-plasmic-override. Only join the attributes that are present.
|
@Zayooo00 is attempting to deploy a commit to the Plasmic Team on Vercel. A member of the Team first needs to authorize it. |
Contributor
|
Thanks! Merged in 7dd858a |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Since @plasmicapp/cli 0.1.380 every non-root element in synced code gets an empty line after
data-plasmic-override.makeCreatePlasmicElementinterpolatesdata-plasmic-root,data-plasmic-for-nodeand the trigger props as empty strings when they don't apply, so the raw output always had empty lines there. Prettier used to drop them, but 3.9 keeps one blank line between JSX attributes on purpose (prettier/prettier#19161), and the CLI bundles 3.9 since 0.1.380, so they now show up in every sync diff.This only joins the attributes that are present. The output is otherwise the same: the snapshot updates only remove empty lines. I added a test that formats a generated module with prettier and checks there's no blank line after
data-plasmic-override. It fails on master.