-
-
Notifications
You must be signed in to change notification settings - Fork 7.6k
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
chore: add type to bulk action actions #20256
chore: add type to bulk action actions #20256
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
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.
Merci!!
@@ -138,7 +138,6 @@ const BulkActionAction = (action: Action) => { | |||
break; | |||
case 'dialog': | |||
case 'modal': { | |||
if (action.actionType === 'delete') trackUsage('willBulkDeleteEntries'); |
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 changed type
to actionType
because I needed to do this 😥 and I polluted it. Thanks for the changes!!
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.
You could add this to the action call of delete
before the API request is sent?
a4e2e61
into
fix/bulk-actions-migration
* fix: added bulk actions * chore: migrate bulk publish & unpublish to v5 * chore: change findLocales type to accept arrays * chore: fix lint error * chore: migrate bulkDelete to v5 (#20161) * chore: migrate bulkDelete to v5 * chore: change findLocales type to accept strings array * fix: docs prettier styles * chore: remove console.log * enhancement: migrate countManyDraftRelations to v5 * feat: bulk delete with locale selection option * fix: bulk unpublish working without locale support * test: e2e tests updated * fix: documents api change, deleteMany tags updated, test skipped * chore: renaming * test: reverting e2e tests for delete action changes * fix: reverting publish action changes * fix: hide add to release as its not ready to be migrated * fix: error message updated * fix: tests updated for useDocumentAction * fix: updated request params * fix: reverting wrong commit message Co-authored-by: Josh <37798644+joshuaellis@users.noreply.github.com> * fix: comments updated * chore: renaming * chore: add type to bulk action actions (#20256) * chore: actionType renamed to just type * fix: dont show unpublish button on contentTypes without draft and publish * fix: set a fixed width for FieldActionWrapper on UID input --------- Co-authored-by: Fernando Chavez <fernando.chavez@strapi.io> Co-authored-by: Josh <37798644+joshuaellis@users.noreply.github.com>
* fix: added bulk actions * chore: migrate bulk publish & unpublish to v5 * chore: change findLocales type to accept arrays * chore: fix lint error * chore: migrate bulkDelete to v5 (#20161) * chore: migrate bulkDelete to v5 * chore: change findLocales type to accept strings array * fix: docs prettier styles * chore: remove console.log * enhancement: migrate countManyDraftRelations to v5 * feat: bulk delete with locale selection option * fix: bulk unpublish working without locale support * test: e2e tests updated * fix: documents api change, deleteMany tags updated, test skipped * chore: renaming * test: reverting e2e tests for delete action changes * feat: publish action changes * fix: reverting publish action changes * fix: hide add to release as its not ready to be migrated * fix: error message updated * fix: tests updated for useDocumentAction * fix: updated request params * fix: publish action added * fix: publish action changes with documentId * fix: reverting wrong commit message Co-authored-by: Josh <37798644+joshuaellis@users.noreply.github.com> * fix: comments updated * chore: renaming * chore: add type to bulk action actions (#20256) * chore: actionType renamed to just type * fix: added missing import * test: fixed * fix(content-manager): edit entry button on bulk publish modal * fix: validationError message type is not as expected * fix: ts error * only fetch entries when modal is opened * fix(content-releases): use status to show the published instead of publishedAt --------- Co-authored-by: Fernando Chavez <fernando.chavez@strapi.io> Co-authored-by: Josh <37798644+joshuaellis@users.noreply.github.com>
* fix: added bulk actions * chore: migrate bulk publish & unpublish to v5 * chore: change findLocales type to accept arrays * chore: fix lint error * chore: migrate bulkDelete to v5 (#20161) * chore: migrate bulkDelete to v5 * chore: change findLocales type to accept strings array * fix: docs prettier styles * chore: remove console.log * enhancement: migrate countManyDraftRelations to v5 * feat: bulk delete with locale selection option * fix: bulk unpublish working without locale support * test: e2e tests updated * fix: documents api change, deleteMany tags updated, test skipped * chore: renaming * test: reverting e2e tests for delete action changes * feat: publish action changes * fix: reverting publish action changes * fix: hide add to release as its not ready to be migrated * fix: error message updated * fix: tests updated for useDocumentAction * fix: updated request params * fix: publish action added * fix: publish action changes with documentId * fix: reverting wrong commit message Co-authored-by: Josh <37798644+joshuaellis@users.noreply.github.com> * fix: comments updated * chore: renaming * chore: add type to bulk action actions (#20256) * chore: actionType renamed to just type * fix: added missing import * test: fixed * fix(content-manager): edit entry button on bulk publish modal * fix: validationError message type is not as expected * fix: ts error * only fetch entries when modal is opened * fix(content-releases): use status to show the published instead of publishedAt * fix: alignment fix, update selectedEntries to reflect count, reset selectedEntries on locale change * fix: fixed type error --------- Co-authored-by: Fernando Chavez <fernando.chavez@strapi.io> Co-authored-by: Josh <37798644+joshuaellis@users.noreply.github.com>
What does it do?
type
to the action signature (no the description interface)Why is it needed?
publish
ordelete
or swap them out, similar to how document actions work