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

Tests: The column block fixture uses a "columns" closing tag instead of "column" #59145

Closed
carolinan opened this issue Feb 18, 2024 · 6 comments · Fixed by #63007
Closed

Tests: The column block fixture uses a "columns" closing tag instead of "column" #59145

carolinan opened this issue Feb 18, 2024 · 6 comments · Fixed by #63007
Assignees
Labels
[Block] Columns Affects the Columns Block [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended

Comments

@carolinan
Copy link
Contributor

Description

The column block fixture is closed with <!-- /wp:columns --> not <!-- /wp:column -->

<!-- wp:column -->
<div class="wp-block-column">
	<!-- wp:paragraph -->
	<p>Column One, Paragraph One</p>
	<!-- /wp:paragraph -->
	<!-- wp:paragraph -->
	<p>Column One, Paragraph Two</p>
	<!-- /wp:paragraph -->
</div>
<!-- /wp:columns -->

Is this intentional?

Step-by-step reproduction instructions

See the linked file above

Screenshots, screen recording, code snippet

No response

Environment info

No response

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

@carolinan carolinan added the [Type] Bug An existing feature does not function as intended label Feb 18, 2024
@jordesign jordesign added the [Block] Columns Affects the Columns Block label Feb 18, 2024
@t-hamano
Copy link
Contributor

I believe this is a simple typo 😅

@talldan
Copy link
Contributor

talldan commented Feb 19, 2024

Wow. Should it be failing if it's wrong? 😅

@t-hamano
Copy link
Contributor

Maybe the block parser or something isn't accurate and we might need to look into the root cause.
For example, if I update the closing comment of a paragraph block, the block will still render. However, if you update the content, the closing comment will be corrected automatically 🤔

b3c8d51acf17038baeb6af3ac4cba789.mp4
@talldan
Copy link
Contributor

talldan commented Feb 19, 2024

Maybe the block parser or something isn't accurate and we might need to look into the root cause.

Good point. I seem to recall there is some leniency in how closing tags are parsed. Perhaps it being the only block in the markup helps too.

@carolinan
Copy link
Contributor Author

What is the correct way of solving it?

This is still causing me a little bit of trouble because I use the fixtures as examples of the block markup in my block reference plugin, and I have visitors reporting that the code is wrong. I understand this is not what the fixture is intended for, but I would rather not have to implement a one-off solution for this single bug in one fixture.
Here is the example page where the code example is displayed https://fullsiteediting.com/blocks/column/

@talldan talldan self-assigned this Jul 1, 2024
@talldan
Copy link
Contributor

talldan commented Jul 1, 2024

This file can be updated, and then the related files re-generated. There's some instructions in the README.md within that folder explaining how those tests can be updated.

I'll throw together a quick PR that updates it.

@github-actions github-actions bot added the [Status] In Progress Tracking issues with work in progress label Jul 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Columns Affects the Columns Block [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended
4 participants