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

Forms: switch namespace from jetpack/contact-form to jetpack/form #40824

Open
simison opened this issue Jan 2, 2025 · 1 comment
Open

Forms: switch namespace from jetpack/contact-form to jetpack/form #40824

simison opened this issue Jan 2, 2025 · 1 comment
Labels
[Block] Contact Form Form block (also see Contact Form label) [Feature] Contact Form [Feature] Forms Blocks Blocks designed to streamline user input and engagement, such as contact, newsletter sign-ups, etc. [Type] Task

Comments

@simison
Copy link
Member

simison commented Jan 2, 2025

Internal reference p1HpG7-l0G-p2

I’d like to have a nicer namespace and switch from jetpack/contact-form to jetpack/form.

Discussion Jan 2025 (internal ref p1737635493924209-slack-C086RGTJT1D ):

When we load a post, we get the html (post_content) and parse it through the core API ( in @wordpress/blocks). This is where some other operations take place, like block invalidation etc..

So if a block is called some name and we wan't to change it to another name (let's say new name) we would need to make sure the parsing of the content doesn't invalidate the blocks already in posts with the some name name and instead handle it gracefully and update it with our new name. That handling takes place before the final parsing, so by changing the name we don't end up with invalid blocks.

This handling is actually needed in at least another place, which is the template prop of blocks.

So, unless there is another way that I'm not aware of (I don't think so though..), in order to rename 3rd party blocks we would need to have a filter somewhere related to convertLegacyBlockNameAndAttributes to add more blocks to convert.

Copy link
Contributor

github-actions bot commented Jan 2, 2025

This issue could use some more labels, to help prioritize and categorize our work. Could you please add at least a [Type], a [Feature], and a [Pri] label?

@simison simison added [Feature] Contact Form [Block] Contact Form Form block (also see Contact Form label) [Feature] Forms Blocks Blocks designed to streamline user input and engagement, such as contact, newsletter sign-ups, etc. labels Jan 2, 2025
@simison simison changed the title Forms: switch namespace from jetpack/contact-form to jetpack/form Forms: switch namespace from jetpack/contact-form to jetpack/form Jan 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Contact Form Form block (also see Contact Form label) [Feature] Contact Form [Feature] Forms Blocks Blocks designed to streamline user input and engagement, such as contact, newsletter sign-ups, etc. [Type] Task
Projects
None yet
Development

No branches or pull requests

2 participants