Skip to content

Conversation

@Fredrhar
Copy link

@Fredrhar Fredrhar commented Nov 6, 2025

Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I have the right to submit it under the open source license indicated in the file; or

(b) The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate open source license and I have the right under that license to submit that work with modifications, whether created in whole or in part by me, under the same open source license (unless I am permitted to submit under a different license), as indicated in the file; or

(c) The contribution was provided directly to me by some other person who certified 1., 2. or 3. and I have not modified it.

(d) I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the open source license(s) involved.

I adhere to these requirements by adding a Signed-off-by line to commit messages, using the same name and email address that are used in my Github profile.

This is my commit message

Signed-off-by: Name-from-github-profile <[email protected]>

Example:

$ git commit -s -m 'This is my commit message'

export interface MacroProps {
name: string;
children: string | React.ReactNode;
children: string | ReactNode;
Copy link
Author

Choose a reason for hiding this comment

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

ReactNode is already directly imported

@@ -1,14 +1,15 @@
import React, {Suspense} from 'react';
import {Suspense, type ReactElement} from 'react';
Copy link
Author

Choose a reason for hiding this comment

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

Import type directly to stay in line with existing code convention

// need to display a placeholder if descriptor is empty as component is not initialized yet
if (descriptor && shouldShowPlaceholderView(meta)) {
// Server-side check
if (isComponentOutputEmptyOnServer(ComponentView)) {
Copy link
Author

Choose a reason for hiding this comment

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

Segregating checks to preserve RSC boundaries and avoid hydration mismatch

expect(rootEl.outerHTML).toEqual(`<div id="text-root">
<p>Some text before <a href="/base/url/no/some/link">the link</a> and some text after.</p>
<figure><a href="/base/url/no/some/image"><img src="/base/url/no/some/image.jpg" alt="Some image"></a><figcaption>Some caption</figcaption></figure>
<figure><a href="/base/url/no/some/image"><img alt="Some image" src="/base/url/no/some/image.jpg"></a><figcaption>Some caption</figcaption></figure>
Copy link
Author

Choose a reason for hiding this comment

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

Order of props is changed to pass tests

"@edge-runtime/jest-environment": "^4.0.0",
"@enonic-types/core": "^7.15.4",
"@enonic/eslint-config": "^2.1.0",
"@testing-library/dom": "^10.4.1",
Copy link
Author

Choose a reason for hiding this comment

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

Added dev dependencies to aid local development and testing

@Fredrhar
Copy link
Author

Fredrhar commented Nov 6, 2025

Closes #1006

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.

1 participant