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

Notice Callout blocks should allow transforming between types #642

Open
dd32 opened this issue Jul 23, 2024 · 4 comments
Open

Notice Callout blocks should allow transforming between types #642

dd32 opened this issue Jul 23, 2024 · 4 comments

Comments

@dd32
Copy link
Member

dd32 commented Jul 23, 2024

Currently when you insert a callout block, you can't convert it to the other types of blocks without inserting a new block and copy-pasting the content between them.

It should be possible to insert a Alert block and convert/transform it to a Warning Block, or an Info block, etc.

Screenshot 2024-07-23 at 2 51 38 PM
@dd32
Copy link
Member Author

dd32 commented Jul 23, 2024

It turns out that you can convert from a Tip to the various sub-types, just not between the sub-types:
Screenshot 2024-07-23 at 3 20 25 PM

@afragen
Copy link
Member

afragen commented Jul 23, 2024

I have pulled the callout blocks into a plugin and not being able to transform between callout blocks is the reason I haven’t submitted it to the dot org repository.

https://github.com/afragen/handbook-callout-blocks

@ryelle
Copy link
Contributor

ryelle commented Jul 23, 2024

So… there are two different blocks on handbooks sites — the shared notice block from mu-plugins and the handbook's callout block, and you're using both in your screenshots. In the first screenshot, that's the Callout block, which doesn't support transforms. The second screenshot is the Notice block, which does support transforms.

notice-vs-callout.mp4

There's an issue to merge the Callouts into the Notice block, #336, as the Notice uses the redesign styles (color & icons), but Notice might need to be updated to allow more content types.

@dd32
Copy link
Member Author

dd32 commented Jul 24, 2024

Oh my... Two blocks that look more or less the same (Handbook is prettier IMHO 😄).. I was writing a post on a Make P2 and didn't even realise there was two different types of blocks available.

I guess these are for different purposes, but probably need to be merged in some form..? or maybe just allow converting between both...?

Maybe we can just migrate https://github.com/WordPress/wordpress.org/tree/trunk/wordpress.org/public_html/wp-content/plugins/handbook/scripts/src to be within this blocks set at the same time.. or.. something.. :) I don't know the best route forward here.. or If I should just try adding transforms to those blocks and ignoring this..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants