Repository navigation
Update DataViews usage to use /wp entrypoint - #989
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. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #989 +/- ##
==========================================
Coverage 74.57% 74.57%
Complexity 3132 3132
==========================================
Files 132 132
Lines 12213 12213
==========================================
Hits 9108 9108
Misses 3105 3105
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
youknowriad
left a comment
There was a problem hiding this comment.
Approving but a check from folks working on this project more actively might be good.
|
There's a remaining lint error on "Path access on WordPress dependencies is not allowed". Lines 98 to 103 in 0833eec This specific restricted syntax may have been inherited originally from Gutenberg and was meant to prevent access to specific files in packages. These days, Gutenberg packages use subpath exports, which strictly prevents (at a Node.js/bundler level) any access to paths not listed in the exports. For this reason, the equivalent rule was removed in Gutenberg in WordPress/gutenberg#72978 and I'd recommend doing the same in this project. |
Looks like this was originally brought in via #172 and reading through that, seems those rules were pulled from other WordPress repos (I image Gutenberg was definitely an inspiration there). If that rule is no longer valid/needed, I'm fine with us removing that here |
See discussion: WordPress#989 (comment)
|
Thanks for taking a look @dkotter ! I removed the restricted syntax pattern in 890b912 . For what it's worth, the import in † Although my personal opinion is that we should still define those |
What?
Updates imports of
@wordpress/dataviewsto use its/wpentrypoint.Alternative to #984
Why?
Fixes broken AI settings page when running Gutenberg 23.9.0 or newer.
This is the documented recommendation for using DataViews in plugins built using
@wordpress/scripts:Source: https://github.com/WordPress/gutenberg/tree/trunk/packages/dataviews
The reason this is recommended is also the reason I'm proposing this update now: Since not using the
/wpentrypoint causes DataViews to use shared WordPress scripts (instead of bundling those dependencies), DataViews' internal references to APIs could become unreliable if it depends on newer or removed APIs. See also #984Use of AI Tools
See AI disclosure in #984, though in this pull request I did not use any AI for updating the imports.
Testing Instructions
Repeat Testing Instructions from #984
Screenshots or screencast
Changelog Entry
cc @youknowriad @ntsekouras @oandregal