-
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 Widgets: Replace store name string with exposed store definition #28044
Conversation
Size Change: -15 B (0%) Total Size: 1.3 MB
ℹ️ View Unchanged
|
@@ -24,6 +24,7 @@ import { | |||
POST_TYPE, | |||
WIDGET_AREA_ENTITY_TYPE, | |||
} from './utils'; | |||
import { store as editWidgetsStore } from '../store'; |
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.
Didn't we create a file that exports the constant with the name of the store to avoid cyclic dependencies between files in other packages for the store implementation?
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.
My bad, that's true. Fixing it.
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.
@gziolo done!
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.
I think you updated too much. I meant only all files inside edit-widgets/src/store/*
. It's perfectly fine to reference editWidgetsStore
imported from edit-wdigets/src/store/index/js
from files in edit-widgets/src/components/*
and the rest 😄
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.
Oh, I see... I thought that referencing the store inside its own package could also cause cyclic dependencies somehow... I'll fix it by tomorrow. Sorry for the confusion, I kinda did it in a hurry 😅...
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.
No worries. I really appreciate all your work done some far, you rock 🥇
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.
Looks good to me. There is one thing to check as pointed out in the comment.
2ec622e
to
e97fbe7
Compare
e97fbe7
to
eb9e5fd
Compare
Thank you for addressing all feedback 👍 |
Description
Addresses #27088. Replaces the store names (hardcoded strings) with the exposed
store
definitions.How has this been tested?
npm run test
.Types of changes
Code refactoring, non-breaking change.
Checklist: