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

Consider removing "Block Grammar" documentation page #51067

Closed
ndiego opened this issue May 29, 2023 · 3 comments · Fixed by #51106
Closed

Consider removing "Block Grammar" documentation page #51067

ndiego opened this issue May 29, 2023 · 3 comments · Fixed by #51106
Assignees
Labels
[Type] Developer Documentation Documentation for developers

Comments

@ndiego
Copy link
Member

ndiego commented May 29, 2023

What problem does this address?

The Block Grammar doc in the Block Editor Handbook contains code examples without any context. It's unclear what the doc is trying to convey, and it also has not been meaningfully updated since it was written in 2018.

What is your proposed solution?

In the interest of reducing the maintenance burden of the Block Editor Handbook and ensuring all pages are up-to-date and accurate, I recommend we remove this page.

However, if folks feel it is valuable, the page will need to be updated with a proper description and explanations for each code example. I am happy to create this PR, given the necessary direction.

As the original author @mcsf, I would love your insight here. Thanks! 🙏

@ndiego ndiego added the [Type] Developer Documentation Documentation for developers label May 29, 2023
@ndiego ndiego self-assigned this May 29, 2023
@mcsf
Copy link
Contributor

mcsf commented May 30, 2023

Hey, @ndiego.

The Block Grammar doc in the Block Editor Handbook contains code examples without any context. It's unclear what the doc is trying to convey, and it also has not been meaningfully updated since it was written in 2018.

I agree that it isn't clear at all, but for the record these aren't code examples :). They are production rules for Gutenberg's block-parsing grammar [Wikipedia]. The first rule represents what the parser is trying to parse: a list of blocks formatted with our special <!-- wp: syntax. All other rules are ultimately contained within the Block_List rule. This documentation page is automatically generated from our spec grammar.

This addition made sense back in 2018 when a few of us were looking for more performant parser implementations for Gutenberg: the document would act as a specification to which any contender would have to conform.

For additional context, see Overview of short-term parsing enhancements. Ultimately, we settled on a hand-coded parser in #8083. There hasn't been any need to further improve Gutenberg's parsing stack since then, so this page has long fulfilled this purpose and we can remove it. 👍

@ndiego
Copy link
Member Author

ndiego commented May 30, 2023

Awesome, thanks for the clarification and the historical context. I will create a PR for removal. 💪

@dmsnell
Copy link
Member

dmsnell commented Jun 2, 2023

it also has not been meaningfully updated since it was written in 2018.

sometimes software is finished 😉

@priethor priethor removed the [Status] In Progress Tracking issues with work in progress label Jul 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Developer Documentation Documentation for developers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants