Skip to content

AlignmentMatrixControl: do not use Composite store#64850

Merged
ciampo merged 2 commits into
trunkfrom
feat/stabilize-composite/alignment-matrix-control-no-store
Sep 2, 2024
Merged

AlignmentMatrixControl: do not use Composite store#64850
ciampo merged 2 commits into
trunkfrom
feat/stabilize-composite/alignment-matrix-control-no-store

Conversation

@ciampo

@ciampo ciampo commented Aug 27, 2024

Copy link
Copy Markdown
Contributor

What?

Requires #64832 to be merged first
Extracted from #64723

Refactor AlignmentMatrixControl so that it doesn't use the store from useCompositeStore to function.

Why?

See #63704 (comment)

How?

By controlling the activeId state via props.

Testing Instructions

Make sure that existing usages of AlignmentMatrixControl continue to work as expected.

In particular, make sure that the onChange callback is fired as expected, and that setting value and/or defaultValue props works like on trunk

@ciampo ciampo force-pushed the feat/stabilize-composite/alignment-matrix-control-no-store branch 2 times, most recently from eaeecba to 3ed5268 Compare August 31, 2024 09:19
@ciampo ciampo force-pushed the feat/stabilize-composite/alignment-matrix-control-no-store branch from 3ed5268 to 0170060 Compare August 31, 2024 09:23
@ciampo ciampo self-assigned this Aug 31, 2024
@ciampo ciampo requested a review from a team August 31, 2024 09:28
@ciampo ciampo added [Type] Enhancement A suggestion for improvement. [Package] Components /packages/components labels Aug 31, 2024
@ciampo ciampo marked this pull request as ready for review August 31, 2024 09:28
@ciampo ciampo requested a review from ajitbohra as a code owner August 31, 2024 09:28
@github-actions

github-actions Bot commented Aug 31, 2024

Copy link
Copy Markdown

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: ciampo <mciampini@git.wordpress.org>
Co-authored-by: tyxla <tyxla@git.wordpress.org>

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

@ciampo ciampo force-pushed the feat/stabilize-composite/alignment-matrix-control-no-store branch from 3ad9d44 to b01b194 Compare September 2, 2024 12:17

@tyxla tyxla left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Code LGTM 👍

Works well in storybook and when tested with the Cover block content alignment. ✅

🚀

@ciampo ciampo merged commit ade6863 into trunk Sep 2, 2024
@ciampo ciampo deleted the feat/stabilize-composite/alignment-matrix-control-no-store branch September 2, 2024 13:07
@github-actions github-actions Bot added this to the Gutenberg 19.2 milestone Sep 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Package] Components /packages/components [Type] Enhancement A suggestion for improvement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants