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

Print slotted content within the assigned slot #2

Merged
merged 9 commits into from
Apr 4, 2024

Conversation

jwloka
Copy link
Member

@jwloka jwloka commented Apr 2, 2024

Some test snapshots make it hard to understand what content is slotted into a particular slot. This PR provides a new rendering option 'slottedContent'. Use value "reveal-contents" to show slotted content in its original and its assigned (slotted) position. Use value "map-contents" to move the slotted nodes into the assigned slot.

@jwloka jwloka requested review from meck93 and maur-o April 2, 2024 23:22
@jwloka jwloka self-assigned this Apr 2, 2024
@jwloka jwloka requested a review from JiiB April 3, 2024 11:10
"typescript": "^5.4.3"
},
"engines": {
"node": ">=20",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jwloka wir supporten nicht nur >= Node 20, oder?

Weil so, generieren wir den Verwendern immer eine Warning: https://docs.npmjs.com/cli/v10/configuring-npm/package-json#engines

Unless the user has set the [engine-strict config](https://docs.npmjs.com/cli/v10/using-npm/config#engine-strict) flag, this field is advisory only and will only produce warnings when your package is installed as a dependency.

slottedContent: "map-contents",
} as any);

expect(actual).toMatchInlineSnapshot(`""`);
Copy link
Member

@meck93 meck93 Apr 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Da ist wohl etwas zwischen den Commits kaputt gegangen.

Suggested change
expect(actual).toMatchInlineSnapshot(`""`);
expect(actual).toMatchInlineSnapshot(`"
<p>
EXPECTED
</p>
"`);

@meck93 meck93 merged commit 095fa14 into main Apr 4, 2024
@meck93 meck93 deleted the print-slotted-content branch April 4, 2024 05:59
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

Successfully merging this pull request may close these issues.

2 participants