Automattic / Automattic/wp-post-grammar

Everything should be a block?

Open
#7 0 comments 0 reactions 0 assignees View on GitHub
question
Dominant language
JavaScript
Stars
27
Forks
3
PR merge metrics
No merged PRs in 30d

Description

Hey! I have not found a better place to give some feedback about the parser. Let me know if I should move these to another place (P2 or anything else).

My question/suggestion is whether we should consider everything as a block and drop the `type=text`

Should we replace:

```js
{
"type": "text",
"value": "\n\n### Text\n"
}
```

By something like

```js
{
"type": "WP_Block",
"blockType": "text",
"attrs": {},
"startText": "",
"endText": "",
"content": "\n\n### Text\n"
}
```

My reasoning here is whether we should have a difference between texts and block texts.
A good side effect if we parse them in the exact same way is the simplification of the Block Editor UI.

Contributor guide

No contributing guide indexed for this repository

Research direction

No files, tests, or parser entry points are named in the issue. Review the parser's current representations for text and blocks, then decide whether a unified block shape should be specified; done means recording an agreed direction or closing the proposal with a clear rationale.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.