Conversation
By doing this, we are also deregistering it for the deprecations.
| * @param {string} blockName The name of the block to be registered. | ||
| * @return {Array} New settings. | ||
| */ | ||
| function registerQuoteV2Attributes( blockSettings, blockName ) { |
There was a problem hiding this comment.
Had to remove the filter because it was affecting the deprecation, preventing it from having the value attribute to migrate. The result of this change is that when v2 is enabled, the value attribute will still be present.
We need to remove the attribute from the block.json when v2 becomes the default (see).
There was a problem hiding this comment.
We need to remove the attribute from the block.json when v2 becomes the default
I don't think we can remove it until the useMigrateOnLoad is removed.
| } ) { | ||
| const { citation } = attributes; | ||
|
|
||
| useMigrateOnLoad( attributes, clientId ); |
There was a problem hiding this comment.
This is using the same technique than the list v2 uses https://github.com/WordPress/gutenberg/pull/39799/files#diff-8ca208404bc35d0549ee68bfdb5c87a0d1fa101ddcfad1095d9a3c0e171b0272
|
Size Change: -55 B (0%) Total Size: 1.22 MB
ℹ️ View Unchanged
|
|
@youknowriad @ellatrix is there anything else to do here? |
youknowriad
left a comment
There was a problem hiding this comment.
I've noticed that any format (bold) in paragraphs is removed after conversion.
The same happens when transforming from pullquote to quote. |
| query: { | ||
| content: { | ||
| type: 'string', | ||
| source: 'text', |
There was a problem hiding this comment.
I've commited this here because it's the same fix I did for the migration. Thought it doesn't deserve a separate PR.
Co-authored-by: Riad Benguella <benguella@gmail.com>
|
@youknowriad the formats are now working. I've also pushed the same fix for the Pullquote to Quote transform in this PR (f3cac07). |
Co-authored-by: Riad Benguella <benguella@gmail.com>
Part of #15486
Related #25892
What?
This PR adds the migration from quote v1 to quote v2.
Why?
We need to support existing content.
How?
Testing Instructions
Verify that the deprecation works:
to-quote-v2.mp4
Verify that templates provided to CPT are migrated:
gutenberg.php:template-quote.mp4