-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Edit Navigation: Replace remaining store name string with constant #27281
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. |
@@ -74,7 +75,7 @@ export function getWidgetToClientIdMapping() { | |||
export function getNavigationPostForMenu( menuId ) { | |||
return { | |||
type: 'SELECT', | |||
registryName: 'core/edit-navigation', |
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's probably just a mistake. edit-widgets
's store is originally copied from edit-navigation
, seems like we just forgot to delete this.
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.
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 |
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.
LGTM :) Awesome job! 💯
Description
Addresses #27182 and #27088. Replaces the remaining references to the
core/edit-navigation
store name (hardcoded string) with the exported value from the constants file. I also exported the constant value in theedit-navigation
package 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: