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

Open
wants to merge 2 commits into
base: trunk
Choose a base branch
from

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 🙇

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