-
Notifications
You must be signed in to change notification settings - Fork 10
docs: replace images with text in mode-of-operation (fixes #31) #40
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
base: main
Are you sure you want to change the base?
docs: replace images with text in mode-of-operation (fixes #31) #40
Conversation
asanvaq
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your contribution! We have been discussing this change among the team, and we reached the conclusion that a more visual alternative to the images is needed (eg. a diagram). We want to replicate the original version without using any images. I understand this adds a layer of complexity to this issue, so please let me know if you would like to continue working on this!
|
I would love to work on this, but before making any changes, could we discuss it in the Chisel Matrix room? I want to run my ideas through you first and proceed only if everything looks good. |
|
Great! Feel free to message the Matrix room. |
|
Thank you |
…hub.com/MChandrahas/chisel-docs into fix/31-replace-images-mode-of-operation
|
I've updated PR #40 with the Mermaid diagrams. I used a vertical layout so it renders correctly on GitHub and mobile. I initially tried a side-by-side table layout, but I found that GitHub's markdown renderer caused issues with the diagram sizing and toolbars. Ready for your review when you have a moment! |
|
Thanks for the update! The Read the docs project is not building, I suspect it's because the “sphinxcontrib-mermaid” extension is not added to requirements.txt and config.py. Instructions on how to do this can be found here. |
|
Fixed! I added the missing "sphinxcontrib-mermaid" dependency and configured myst_fence_as_directive in conf.py. The local build is passing now without warnings |
|
I have removed the old image files since they are no longer used. Ready for review! Thanks for your patience and supporting me. |
|
It looks great! We have been discussing this solution and there is now some repetition in the text, and we would like to avoid that. Could you try to recreate the table, but with a mermaid diagram in each cell for the title? Basically like the original but with mermaid diagrams replacing the images. Thank you for your patience while we figure this out together! |
|
Hi @asanvaq , thanks for the feedback! I completely agree about avoiding the text repetition. I tried to recreate the table layout as you suggested (putting the Mermaid diagrams inside the table cells), but the documentation theme is struggling to render it correctly. As you can see in the screenshot below, the layout engine shrinks the diagrams down until they are unreadable and creates large empty gaps in the page alignment. Here is a screenshot from my testing branch to show you what I mean:
Given that the table layout causes these rendering bugs, do you have any suggestions on how you'd like to proceed? |
|
Hi! Apologies for the delay, we were off due to end of the year break. Thanks for the change, is this all in one table? If so, have you tried checking how it looks with a table with two columns for each step? |
|
Thanks for the suggestion! Yes, the previous attempt was a single table. I will try splitting it into a table with two columns for each step to see if that fixes the rendering issues. I'll update the PR once I've tested it. |
Fix: Mermaid diagram height issueProblemThe mermaid extension generates inline SolutionAdded |
|
Thanks! There is still quite a big gap between the diagrams, ideally the entire text would fit on the screen, without having to scroll. |
|
@asanvaq Thanks for the feedback! I actually added a custom JS script in the last commit specifically to resize the diagrams dynamically so they fit the screen without scrolling. It works perfectly in my local build. Since you are still seeing the gaps, is it possible that the custom JS isn't loading or executing in the Read the Docs deployment? Please let me know if there are specific restrictions for custom scripts here. |
|
@MChandrahas, thanks so much for trying to resolve this. I'm afraid the complexity of the solution (custom JavaScript, Mermaid diagrams) for such a trivial thing (a fancy arrow) is getting a bit out of hand. How about using CSS only? The following could be in place of the SVG images in the table: <style>
.arrow-box {
background-color: #A81C1C;
color: white;
padding: 15px 40px;
clip-path: polygon(0% 0%, 92% 0%, 100% 50%, 92% 100%, 0% 100%);
}
</style>
<div class="arrow-box">
1. Read and parse chisel-releases
</div>Of course, the CSS definition would go into |
|
Yes! It sounds good :) |


Description
This PR addresses issue #31 by replacing the images in
docs/explanation/mode-of-operation.mdwith text descriptions.Changes
QA Steps
docs/explanation/mode-of-operation.md.