Skip to content
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

Remove onActionPerformed & onActionStart from the ActionModal API #61659

Merged
merged 1 commit into from
May 15, 2024

Conversation

oandregal
Copy link
Member

@oandregal oandregal commented May 14, 2024

Follow-up to https://github.com/WordPress/gutenberg/pull/60805/files#r1599815188

What?

Removes onActionPerformed and onActionStart from the ActionModal API.

Why?

Those are properties available at the action, so it's not necessary to pass them to the modal as well.

Copy link

github-actions bot commented May 14, 2024

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: oandregal <[email protected]>
Co-authored-by: youknowriad <[email protected]>
Co-authored-by: mcsf <[email protected]>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@oandregal oandregal self-assigned this May 14, 2024
@oandregal oandregal added [Type] Code Quality Issues or PRs that relate to code quality [Feature] DataViews Work surrounding upgrading and evolving views in the site editor and beyond labels May 14, 2024
/**
* The callback to execute when the action is triggered.
*/
onActionStart: ( ( items: Item[] ) => void ) | undefined;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these properties specific to modal actions or should they be moved to ActionBase

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense. Given the names I think they can be supported in any type of action but since it follows our current implementation, it's fine to keep like that for now.

Copy link
Contributor

@mcsf mcsf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you :)

@oandregal oandregal merged commit 73150a4 into trunk May 15, 2024
69 of 72 checks passed
@oandregal oandregal deleted the update/list-view-actions branch May 15, 2024 08:01
@github-actions github-actions bot added this to the Gutenberg 18.4 milestone May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] DataViews Work surrounding upgrading and evolving views in the site editor and beyond [Type] Code Quality Issues or PRs that relate to code quality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants