-
Notifications
You must be signed in to change notification settings - Fork 385
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
Fix odd behavior when transforming Text to List block #2365
Conversation
@swissspidy Do you have any ideas here how to still keep the transformations but include the attributes from the Text block? I was originally thinking of Also tried to change the prefixed list transformations to include getting attributes but unfortunately the origin block isn't passed in as a param to Right now this PR removes the prefixed transformations for list so that it doesn't convert automatically, however, not sure if there's an easy way how to keep that, too. Would be great if the transformation filter would be applied in case of automatic transformations, too. Maybe it would make sense to resolve this upstream instead (Edit: by adding this filter for automatic transformation, too). But perhaps you have another simple solution in mind that I missed. Alternatively, we could remove the transformations for now. Thoughts? |
…_jumping_after_transform
The list block doesn't allow font/color changes so probably, for now, it's better to just remove the automated prefixed transformations, otherwise, the user won't have a choice to customize numbered/bulleted sentences since they'd automatically convert to a list instead. |
Not really at this moment. 😕
Opening an issue or even PR upstream would be good 👍
Hmm because the list blocks only has transforms form and to the default paragraph block, maybe we should add some transforms to our custom text block. Specifically, these two: https://github.com/WordPress/gutenberg/blob/f2cafbd39ed0e905980e6ed2d151e0747aa72151/packages/block-library/src/list/transforms.js#L37-L59 Could be something for a separate issue / PR where we could review all blocks and their transforms. Thoughts? |
Good point, we're not using the paragraph block anyway so we could replace these transformations. Makes sense in a separate PR, this one is for the bug fix specifically. |
Cool, created #2380 for that. |
Fixes #2304.
This PR removes the prefixed transformation from the list block, not allowing the Text block to convert into a list block automatically.