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

Refactor architecture diagram to use mermaid flowchart syntax #858

Closed
wants to merge 1 commit into from

Conversation

cychitivav
Copy link

@cychitivav cychitivav commented Sep 12, 2024

Initial checklist

  • I read the support docs
  • I read the contributing guide
  • I agree to follow the code of conduct
  • I searched issues and couldn’t find anything (or linked relevant results below)
  • If applicable, I’ve added docs and tests

Description of changes

Refactored the architecture diagram using Mermaid flowchart syntax to improve readability and enhance the visual representation for a clearer understanding of the project structure, improving professionalism despite losing the URLs of links between blocks.

@github-actions github-actions bot added the 👋 phase/new Post is being triaged automatically label Sep 12, 2024

This comment has been minimized.

@codecov-commenter
Copy link

codecov-commenter commented Sep 12, 2024

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (2245c64) to head (42d5d7c).
Report is 19 commits behind head on main.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #858   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            3         3           
  Lines         1354      1402   +48     
  Branches       113       114    +1     
=========================================
+ Hits          1354      1402   +48     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@remcohaszing remcohaszing left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like it. Except that the AST types are now no longer links.

@wooorm
Copy link
Member

wooorm commented Sep 12, 2024

Looks really tiny to me.
I kinda like ASCII art for programming.

@cychitivav
Copy link
Author

cychitivav commented Sep 12, 2024

I like it. Except that the AST types are now no longer links.

Yes, I noticed that, but I couldn't find any information on how to add URLs to the links within the Mermaid diagrams. As an alternative, I thought of preserving the URLs by adding them as a footer or citation in Markdown, but I'm not entirely convinced.

flowchart LR
  markdown[markdown] --> remark[remark]
  subgraph remarkMarkdown[react-markdown]
    direction LR
    remark -- mdast --> remarkPlugins[remark plugins]
    remarkPlugins -- mdast --> remarkRehype[remark-rehype]
    remarkRehype -- hast --> rehypePlugins[rehype plugins]
    rehypePlugins -- hast --> components[components]
  end
  components --> react[react elements]

  click markdown "https://commonmark.org" "Markdown Specification"
  click remark "https://github.com/remarkjs/remark" "Remark Documentation"
  click remarkPlugins "https://github.com/remarkjs/remark/blob/main/doc/plugins.md" "Remark Plugins"
  click remarkRehype "https://github.com/remarkjs/remark-rehype" "Remark Rehype Documentation"
  click rehypePlugins "https://github.com/rehypejs/rehype/blob/main/doc/plugins.md" "Rehype Plugins Documentation"
  click components "#appendix-b-components" "Components Documentation"
Loading

@wooorm
Copy link
Member

wooorm commented Sep 23, 2024

I really have my doubts on this. I do not want to live in a world where ASCII-diagrams are unprofessional. I don’t think all those zoom controls are useful. I think this is fine.

@ChristianMurphy I think you originally made this graph? Thoughts?

@remcohaszing
Copy link
Member

I like this, but I do have my doubts considering the readme may be displayed in places that don’t support mermaid.

@wooorm
Copy link
Member

wooorm commented Sep 27, 2024

@ChristianMurphy Ping :)

@ChristianMurphy
Copy link
Member

I think you originally made this graph?

I made this, and based it off the style of the unified architecture diagram https://github.com/unifiedjs/unified?tab=readme-ov-file#overview

I quite like Mermaid as a diagramming tool and don't have any objections to moving this over.
It would be kinda nice if the links on the lines could remain, but that's something that may need to be raised upstream at mermaid.

@wooorm
Copy link
Member

wooorm commented Oct 2, 2024

OK. I will not block mermaid per-se. I personally like ASCII more.

I do think that splitting this graph up into both a graph, and then some links under it, is not an improvement.

If there is a way to fix that, I am 🤷‍♂️ to this PR.
If there currently no way to link mdast and hast, then I am 👎 on this PR. I think @remcohaszing too?

@cychitivav Can you somehow link mdast/hast? Report upstream?

@remcohaszing
Copy link
Member

I’m also leaning no, but mostly because the Mermaid diagram might not be rendered in places other than GitHub.

@wooorm
Copy link
Member

wooorm commented Oct 4, 2024

OK, I’ll close this then. I appreciate you contributing, @cychitivav. Thanks, but no thanks!

@wooorm wooorm closed this Oct 4, 2024
@wooorm wooorm added 🙅 no/wontfix This is not (enough of) an issue for this project and removed 👋 phase/new Post is being triaged automatically labels Oct 4, 2024

This comment has been minimized.

@github-actions github-actions bot added the 👎 phase/no Post cannot or will not be acted on label Oct 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🙅 no/wontfix This is not (enough of) an issue for this project 👎 phase/no Post cannot or will not be acted on
Development

Successfully merging this pull request may close these issues.

5 participants