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

Unable to Use isActive with Core/Group Block Variation #60794

Closed
jethin opened this issue Apr 16, 2024 · 3 comments
Closed

Unable to Use isActive with Core/Group Block Variation #60794

jethin opened this issue Apr 16, 2024 · 3 comments
Labels
[Block] Group Affects the Group Block (and row, stack and grid variants) [Feature] Block Variations Block variations, including introducing new variations and variations as a feature [Type] Enhancement A suggestion for improvement.

Comments

@jethin
Copy link

jethin commented Apr 16, 2024

Issue

I've created a block variation for the core group block and would like to use the "isActive" property so the editor will recognize it. However, it appears that all of the attributes that would trigger isActive -- primarily the layout attributes -- are used by the core group block's own variations. Thus, "isActive" isn't triggered for my block as it has already been assigned to a core group variation earlier in the stack. I would like my block variation to be able to use the default group block layout attributes.

Proposed Solution

It would be great if there was another, more flexible attribute which could be used to 1) trigger "isActive" on group blocks and 2) filter the return value for my block variation. In my case I believe using the "className" string attribute would work well.

[Note: I'm not really a Github user and is my first feature post here -- apologies if I've screwed this up.]

@jethin jethin added the [Type] Enhancement A suggestion for improvement. label Apr 16, 2024
@jethin jethin changed the title Unable to Use isActive with Group Block Variation Unable to Use isActive with Core Group Block Variation Apr 16, 2024
@jethin jethin changed the title Unable to Use isActive with Core Group Block Variation Unable to Use isActive with Core/Group Block Variation Apr 16, 2024
@talldan
Copy link
Contributor

talldan commented Apr 17, 2024

@jethin Thanks for reporting the issue. Would you be able to provide some code snippets to demonstrate how it's not working for you right now?

edit: I'm now wondering if it's the same issue as this one - Group block variations not recognized as active.

@talldan talldan added [Block] Group Affects the Group Block (and row, stack and grid variants) [Feature] Block Variations Block variations, including introducing new variations and variations as a feature labels Apr 17, 2024
@jethin
Copy link
Author

jethin commented Apr 17, 2024

You're right @talldan, it's the same issue as in the thread you cited. I'll plan to close this thread soon and +1 on the other. Thanks for your help -- much appreciated.

@colorful-tones
Copy link
Member

You're right @talldan, it's the same issue as in the thread you cited. I'll plan to close this thread soon and +1 on the other. Thanks for your help -- much appreciated.

Closing this out, as it seems you’ve followed up on the other issue.

@colorful-tones colorful-tones closed this as not planned Won't fix, can't repro, duplicate, stale Apr 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Group Affects the Group Block (and row, stack and grid variants) [Feature] Block Variations Block variations, including introducing new variations and variations as a feature [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

3 participants