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

The mermaid diagram is not shown on Description (the content from Discourse) #1525

Closed
taurus-forever opened this issue Feb 27, 2023 · 10 comments · Fixed by #1584
Closed

The mermaid diagram is not shown on Description (the content from Discourse) #1525

taurus-forever opened this issue Feb 27, 2023 · 10 comments · Fixed by #1584

Comments

@taurus-forever
Copy link

Hi,

Please check mysql-router on charmhub.io: https://charmhub.io/mysql-router?channel=dpe/edge
and on GitHub: https://github.com/canonical/mysql-router-operator/blob/main/README.md

As you can see the basic mermaid diagram is not processed on charmhub.io and shown as a plain text: flowchart TD...

Screenshot from 2023-02-27 22-51-05

It looks like https://warthogs.atlassian.net/browse/WD-665 was a subtask for develop mermaid support.
Is it a not-yet implemented feature or a bug? Thank you!

P.S. we would like to publish more complex diagrams, but without charmhub.io support mermaid is a risky choice.

@taurus-forever
Copy link
Author

Hint: if you wish to publish mermaid on charmhub: publish screenshots with links to GitHub, e.g. https://charmhub.io/postgresql-k8s/docs/e-charm?channel=14/stable

@Lukewh
Copy link
Contributor

Lukewh commented May 17, 2023

I believe this is no longer relevant since we made this change. Closing, but please reopen if you think it's still relevant :).

@Lukewh Lukewh closed this as completed May 17, 2023
taurus-forever added a commit to canonical/mysql-k8s-operator that referenced this issue May 22, 2023
* [MISC] Sync from Discourse

* Restore original docs/explanation/e-flowcharts.md

We do not want to loose mermaid diagrams on GitHub,
we are waiting for mermaid support on Discource:
canonical/charmhub.io#1525

---------

Co-authored-by: Alex Lutay <[email protected]>
@taurus-forever
Copy link
Author

taurus-forever commented May 22, 2023

Dear @Lukewh , it is still relevant for Data Platform team.

Please see the following examples:
https://charmhub.io/mysql-k8s/docs/e-flowcharts
https://charmhub.io/postgresql-k8s/docs/e-charm
https://charmhub.io/postgresql-k8s/docs/e-peers
https://charmhub.io/postgresql-k8s/docs/e-backups

As you can see we are actively using mermaid diagrams to describe the internal logic of our charms.
Unfortunately it produces issues for us on Discourse->GitHub sync. We have to manually restore mermaid blocks in bot PRs, example: canonical/mysql-k8s-operator@4a5aeae

We really looking forward to add mermaid support for charmhub.io (as Discourse supports mermaid nowadays).
Please reopen this issue. Thank you!

@Lukewh
Copy link
Contributor

Lukewh commented May 22, 2023

Aha, I see. I'll reopen and rename this issue to relate to discourse rendering, not GitHub README rendering 👍

@Lukewh Lukewh reopened this May 22, 2023
@Lukewh Lukewh changed the title The mermaid diagram is not shown on Description (the content from GitHub README) The mermaid diagram is not shown on Description (the content from Discourse) May 22, 2023
@Lukewh
Copy link
Contributor

Lukewh commented May 23, 2023

@taurus-forever this is now live, and you can see the resulting diagram on https://charmhub.io/mysql-k8s/docs/e-flowcharts :).

@taurus-forever
Copy link
Author

... this is now live ...

You are my HERO! Thank YOU!!!
P.S. applied the change to https://charmhub.io/mysql-k8s/docs/e-flowcharts (all other pages will follow).
P.P.S. It implies our life A LOT. THANK YOU!!!

@taurus-forever
Copy link
Author

@Lukewh there is a small bug (if page has 2+ diagrams): https://charmhub.io/postgresql-k8s/docs/e-charm
Should I report it as a separate issue?

@Lukewh
Copy link
Contributor

Lukewh commented May 23, 2023

@Lukewh there is a small bug (if page has 2+ diagrams): charmhub.io/postgresql-k8s/docs/e-charm Should I report it as a separate issue?

Please do! I'll take a look anyway, but good to track it separately :)

@Lukewh
Copy link
Contributor

Lukewh commented May 23, 2023

@taurus-forever never mind, already merged: #1586 :)

@taurus-forever
Copy link
Author

@taurus-forever never mind, already merged: #1586 :)

The fix confirmed, thank you one more time!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants