-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Refactor the initialization of the editor, require only a post ID #6384
Merged
Merged
Changes from 1 commit
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
7f0177a
Refactor the initialization of the editor, require only a post ID ins…
youknowriad 059cde3
Fix phpcs tests
youknowriad 28be8f0
Load dynamically entities by kind
youknowriad d37783d
Fix selector hasEntitiesByKind
youknowriad aef4ada
Remove useless posts reducer
youknowriad b69f5c1
Move LoadKindEntities to the entities file
youknowriad 5b1076e
Add unit tests
youknowriad f2d4a87
Fix unit tests
youknowriad 7127cc0
Fix custom post types preloading
youknowriad 2eb7f16
Avoid generating a new reducer on each call if the config didn't change
youknowriad d29c910
Rename `defaultPost => `overridePost` to clarify its meaning
youknowriad 66b44bd
Fix unit tests
youknowriad 8a067ed
Fix unit tests after rebase
youknowriad 91f36ab
Adding await when calling async generators
youknowriad 48425b2
Switch initializeEditor arguments
youknowriad 5f2b411
Fix unit tests
youknowriad e743830
Returning the _links from the preloaded endpoints
youknowriad ab1e150
Code style fixes
youknowriad File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Rename
defaultPost =>
overridePost` to clarify its meaning
- Loading branch information
commit d29c9102e9ab55011855b556264ac8d3e50c1377
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
In a potential future where
postId
becomes optional, would we want to support calling this as simply...i.e. with
postType
before the optionalpostId
Asides:
id
is pretty useless now. It was originally intended for separate instances of an editor, which we don't really support. Maybe it should just be dropped.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'll keep the
id
for now. I'm not certain if we'll support multi-instances at some point but prefer to keep it for now.An object argument: I don't know 🤷♂️, It may feel like a component though and maybe keeping it as clarify the distinction?