-
Notifications
You must be signed in to change notification settings - Fork 4.7k
[ CoreData Entities ] add support for delete operations #21557
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
Merged
Merged
Changes from all commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
617e738
reset, delete nav menu items
draganescu fdceaa2
fixing a bad merge
draganescu 1f8878b
no invalidateCache and refactored according to review
draganescu f4b6a83
revert change to getMergedItemIds
draganescu e062c55
refactor according to self review
draganescu aa147ac
deletes query items, adds tests for new entity methods
draganescu 315c77b
refactored for properly deleteing entity ids from querries
draganescu d6bbb3f
updates tests
draganescu 4ef424d
moved the REMOVE_ITEMS reducer to receive all query keys
draganescu 24888af
removes the need to send query on delete
draganescu 9744cf3
updates some comments
draganescu 8f836b6
refactoring according to review
draganescu b657b19
do not clear cache on delete
draganescu c166e51
fixes test after reming superfluous actions from deleteEntityRecord
draganescu 360cbaa
makes a proper POJO for removing items from queries and invalidates t…
draganescu f87a8a6
fix changelog and add deleteQueryParams to deleteRecord
draganescu c7606a0
fixes test
draganescu 98ea4a8
Rename deleteQueryParams to query for consistency
draganescu d55f893
Use the new deleteEntityRecord to delete menus (#22428)
draganescu 5abdf63
fixes query param's type for consistency
draganescu eeded0c
comment linting, removed useless catch logic for deleteEntityRecord, …
draganescu 1995e69
try implement error handling for delete
draganescu b26e2e1
fixed the intentional typo and the unintentional one
draganescu be5b985
updates and fixes according to review
draganescu 8586489
rename remove items' action id collection
draganescu ad3c7e7
makes notices unique in menu editor
draganescu 3a6e36b
Update packages/core-data/src/queried-data/actions.js
draganescu 28f5b11
fixes bugs introduced by renaming items to itemsIds in the remove ite…
draganescu a34ee64
lint
draganescu 9a8d813
moves noticeId creation inside effect
draganescu 59bb45c
updated according to review
draganescu 8051532
lint
draganescu 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
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| /** | ||
| * Internal dependencies | ||
| */ | ||
| import { removeItems } from '../actions'; | ||
|
|
||
| describe( 'removeItems', () => { | ||
| it( 'builds an action object', () => { | ||
| const postIds = [ 1, 2, 3 ]; | ||
| expect( removeItems( 'postType', 'post', postIds ) ).toEqual( { | ||
| type: 'REMOVE_ITEMS', | ||
| itemIds: postIds, | ||
| kind: 'postType', | ||
| name: 'post', | ||
| invalidateCache: false, | ||
| } ); | ||
| } ); | ||
| } ); |
This file contains hidden or 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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.