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

Editor: children prop to accept ReactNode #68839

Merged
merged 2 commits into from
Jan 27, 2025

Conversation

im3dabasia
Copy link
Contributor

Closes: #68835

What?

Updated the children prop type in PostTypeSupportCheck to accept ReactNode instead of ReactElement, making it more flexible and preventing unnecessary typecasting.

Copy link

github-actions bot commented Jan 22, 2025

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: im3dabasia <[email protected]>
Co-authored-by: Mamaduka <[email protected]>
Co-authored-by: CGastrell <[email protected]>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@Mamaduka
Copy link
Member

@im3dabasia, like I noted here. It might be better to audit all children props in the editor package and fix them in one go.

@Mamaduka Mamaduka added [Type] Code Quality Issues or PRs that relate to code quality [Package] Editor /packages/editor labels Jan 22, 2025
@im3dabasia im3dabasia changed the title Components: PostTypeSupportCheck children prop to accept ReactNode Editor: children prop to accept ReactNode Jan 24, 2025
@im3dabasia
Copy link
Contributor Author

Hey @Mamaduka ,

When you have a moment, please review my PR.

Thank you 🙇

Copy link
Member

@Mamaduka Mamaduka left a comment

Choose a reason for hiding this comment

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

Thank you, @im3dabasia!

Rebasing on top of the latest trunk, should resolve the failing e2e test issue.

@im3dabasia
Copy link
Contributor Author

im3dabasia commented Jan 27, 2025

@Mamaduka, thank you for the approval.

I have rebased the PR, and the previously failing E2E tests have now passed. Kindly merge it into trunk at your convenience.

@Mamaduka Mamaduka enabled auto-merge (squash) January 27, 2025 09:07
@Mamaduka Mamaduka merged commit a32e879 into WordPress:trunk Jan 27, 2025
62 checks passed
@github-actions github-actions bot added this to the Gutenberg 20.2 milestone Jan 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Package] Editor /packages/editor [Type] Code Quality Issues or PRs that relate to code quality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PostTypeSupportCheck is too strict regarding children
2 participants