-
Notifications
You must be signed in to change notification settings - Fork 17
docs(APP-4267): add Mermaid diagrams section to Markdown Viewer #305
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?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,7 @@ | ||
| --- | ||
| title: Markdown Viewer | ||
| description: >- | ||
| Open Markdown files in your terminal and run commands. | ||
| Open Markdown files in your terminal, run shell commands, and view rendered Mermaid diagrams. | ||
| sidebar: | ||
| label: "Markdown viewer" | ||
| --- | ||
|
|
@@ -87,6 +87,33 @@ If the command contains any arguments using the curly brace `{{param}}` syntax, | |
|
|
||
| <DemoVideo src="/assets/terminal/run-markdown-file-command.mp4" label="Demo of running two commands from a Markdown file in Warp" /> | ||
|
|
||
| In addition, all shell and code blocks have a copy button to quickly copy the block’s text to the clipboard. | ||
| In addition, all shell and code blocks have a copy button to quickly copy the block's text to the clipboard. | ||
|
|
||
| Code blocks without a set language, or one of the following languages, are treated as shell commands: `sh`, `shell`, `bash`, `fish`, `zsh`, `warp-runnable-command`. | ||
|
|
||
| ## Mermaid diagrams | ||
|
|
||
| Warp renders [Mermaid](https://mermaid.js.org/) diagrams in the markdown viewer. Add a fenced code block with the `mermaid` language tag and Warp converts it to a rendered SVG diagram automatically. | ||
|
|
||
| ```` | ||
| ```mermaid | ||
| graph LR | ||
| A[Start] --> B[End] | ||
| ``` | ||
| ```` | ||
|
|
||
| [TODO: docs reviewer — screenshot of a rendered Mermaid diagram in the markdown viewer] | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
|
|
||
| ### Switching between raw and rendered | ||
|
|
||
| Each Mermaid block includes a **Raw** and **Rendered** toggle. Use it to switch between the rendered diagram and the original Mermaid source without leaving the viewer. | ||
|
|
||
| ### Render failures and timeouts | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @rachaelrenk can we remove this section please? i don't think it's necessary to expose this technical detail |
||
|
|
||
| If a Mermaid diagram cannot be rendered — for example, due to invalid syntax — Warp replaces the loading placeholder with a **Failed to render Mermaid diagram** notice. The same notice appears if rendering takes longer than 10 seconds. | ||
|
|
||
| The notice is localized to the affected block; the rest of the document continues to render normally. Multiple Mermaid diagrams in the same file are independent — a failure in one does not affect others. | ||
|
|
||
| Your original Mermaid source is always preserved. Copying, exporting, and undo/redo all operate on the authored code, not the failure notice. | ||
|
|
||
| If rendering eventually succeeds after a timeout, Warp replaces the notice with the rendered diagram automatically. | ||
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.
@rachaelrenk do you mind grabbing a screenshot for this? or maybe asking an agent to use computer use to grab one?