Edit Navigation: Replace remaining store name string with constant#27281
Conversation
|
Well, I tried using the same branch. Apparently, all the commits from the previous PR are also being shown in the commit section, even though only one of them is new, compared to |
ec28181 to
ff73e73
Compare
|
The E2E tests have failed again, same as #27178: I made an empty commit to trigger the pipelines, and it ran without any errors. |
| export function getNavigationPostForMenu( menuId ) { | ||
| return { | ||
| type: 'SELECT', | ||
| registryName: 'core/edit-navigation', |
There was a problem hiding this comment.
Let's leave it as a hardcoded string and revert the change in this line. We shouldn't expose new constants from @wordpress/edit-navigation. It is probably something complex that we better ignore in this PR.
@adamziel and @noisysocks, aren't edit-widgets and edit-navigation two packages that target two different pages? I'm curious how it works since @wordpress/edit-widgets doesn't depend on @wordpress/edit-navigation as you can learn from the package.json file changes proposed in this PR.
There was a problem hiding this comment.
It's probably just a mistake. edit-widgets's store is originally copied from edit-navigation, seems like we just forgot to delete this.
gziolo
left a comment
There was a problem hiding this comment.
Let's remove the bits that expose STORE_NAME for @wordpress/edit-widgets package and this PR will be good to go. Thank you for looking into it.
|
OK, sorry about the |
Description
Addresses #27182 and #27088. Replaces the remaining references to the
core/edit-navigationstore name (hardcoded string) with the exported value from the constants file. I also exported the constant value in theedit-navigationpackage so that other packages can use it when necessary. If that is not the best way to do it, please let me know. 😸How has this been tested?
npm run test, no additional test was done.Screenshots
Types of changes
Code refactoring, non-breaking change.
Checklist: