-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Deprecate data-wp-ignore directive with warning message #70945
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
Conversation
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 If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
👋 Thanks for your first Pull Request and for helping build the future of Gutenberg and WordPress, @Sahil1617! In case you missed it, we'd love to have you join us in our Slack community. If you want to learn more about WordPress development in general, check out the Core Handbook full of helpful information. |
Hi! 👋 Could someone from the team please help add the appropriate Thanks! |
Hi @Sahil1617, I think the PR has marked wrong issue. |
Hi @USERSATOSHI Thanks again for the catch! |
Co-authored-by: David Arenas <darensr@gmail.com>
@Sahil1617, could you also add an entry in the CHANGELOG.md file of the Interactivity API package? 🙏 You can take a look at the docs if you don't know how to do so. |
Hi @DAreRodz, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested and works fine. Thanks @Sahil1617! 🙂
) * Deprecate data-wp-ignore directive with warning message * Update packages/interactivity/src/directives.tsx Co-authored-by: David Arenas <darensr@gmail.com> * Add deprecation note for data-wp-ignore directive in CHANGELOG --------- Co-authored-by: Sahil1617 <sahiljadhav1617@git.wordpress.org> Co-authored-by: DAreRodz <darerodz@git.wordpress.org> Co-authored-by: USERSATOSHI <tusharbharti@git.wordpress.org>
What?
Closes #70881
This PR adds a deprecation warning to the
data-wp-ignore
directive. The directive is being deprecated due to issues with context inheritance and navigation handling, and is likely to be removed in a future release.Why?
The
data-wp-ignore
directive breaks context inheritance and complicates client-side navigation. While it's designed to prevent hydration of a specific region, it introduces bugs in the current implementation. The deprecation warning informs developers early.How?
Added a
warn()
call inside the directive to log a deprecation message:Testing Instructions
The "data-wp-ignore" directive is deprecated and will be removed in a future WordPress release.
Screenshots
Before

After
