WIP(markdown/ext): use html style for columns#4003
WIP(markdown/ext): use html style for columns#4003gfanton wants to merge 4 commits intognolang:masterfrom
Conversation
🛠 PR Checks Summary🔴 Changes related to gnoweb must be reviewed by its codeowners Manual Checks (for Reviewers):
Read More🤖 This bot helps streamline PR reviews by verifying automated checks and providing guidance for contributors and reviewers. ✅ Automated Checks (for Contributors):🟢 Maintainers must be able to edit this pull request (more info) ☑️ Contributor Actions:
☑️ Reviewer Actions:
📚 Resources:Debug
|
Codecov ReportAttention: Patch coverage is
📢 Thoughts on this report? Let us know! |
|
While this syntax is acceptable, it only makes sense if we support nested columns or per-column customization. However, I believe we should not support nested columns, at least not in If we start implementing other components similar to this one and embedding them together, we risk creating something that is hard to read. By trying to balance HTML flexibility and Markdown readability, we may end up with a solution that is neither flexible nor readable. To me, the best solution or compromise would be to have only one separator like this, with no nested columns. <gno-columns>
## Title 1
content 1
|||
## Title 2
content 2
</gno-columns>This syntax is readable and simple; there is no ambiguity about what constitutes a column. While it is less flexible, it should be sufficient in |
|
Personally, I completely agree with your second proposal. It seems to me that the philosophy behind the With this in mind, I think that using only a separator to define a new column would be cleaner than using a sub-pair of HTML tags. This would reduce the number of tags, reduce the number of corner cases on the parsing side and make the raw markdown more readable without being less explicit. The only tradeoff of this solution is that we could only have one level of column, but I have the feeling that this will be sufficient for 99% of the users. So, maybe it is better to choose to have a more readable raw markdown every time we encounter a block using columns (which will happen very often I guess) than to make it difficult to read to add a feature that will probably almost never be used. I'm just nitpicking on one point: I would prefer to use a tag like <gno-columns>
## Title 1
content 1
|||
## Title 2
content 2
</gno-columns><gno-columns>
## Title 1
content 1
<gno-columns-sep/>
## Title 2
content 2
</gno-columns> |
6845e59 to
cf46f0b
Compare
|
I agree that the code could end up being very hard to read. Additionally, from a UI perspective, we’re quite limited in terms of available space within the Markdown renderer (around 990px), which makes creating and using scoped columns rather constrained. This could become a really nice feature with a wider wrapper (something we might have later) but for now, it would likely result in very narrow nested columns (or none at all if we apply some CSS min-width safeguards), which limits the usefulness of scoped columns at this stage. |
This is an alternative PR for the column syntax discussed in #4003. It implements columns as follow: ```md <gno-columns> ## Title 1 content 1 ||| ## Title 2 content 2 ||| ## Title 3 content 3 </gno-columns> ``` ### TODO: - [x] update markdown docs --------- Co-authored-by: Leon Hudak <33522493+leohhhn@users.noreply.github.com>
This is an alternative PR for the column syntax discussed in gnolang#4003. It implements columns as follow: ```md <gno-columns> ## Title 1 content 1 ||| ## Title 2 content 2 ||| ## Title 3 content 3 </gno-columns> ``` ### TODO: - [x] update markdown docs --------- Co-authored-by: Leon Hudak <33522493+leohhhn@users.noreply.github.com>

From recent internal discussions, this PR replaces the current markdown columns extension syntax with HTML-style syntax.
This PR is almost done; it requires some cleanup and a few more tests.
I am waiting for a pre-review for syntax validation before continuing.