2

Goal: Work flow diagram displays underneath the header text with standard spacing
Actual Results: Work flow diagram displays underneath header with a standardized amount of white space
Errors: No errors messages
Troubleshooting Steps: I attempted to follow the solution steps in this article but it makes the mermaid diagram no longer display and produces formatting error codes.

# Author Submission Workflow 
::: mermaid
graph TD
A[Author sends a review to the customer success email] -->|Dynamics 365 creates a review case based on the Knowledge Base Article Review Template| B[[Automation]]
B --> D[D365 creates a review case based on the Knowledge Base Article Review Template]
B --> E[D365 places the review article in the Article Review Queue]
D -->F[Dynamics 365 creates a review case based on the Knowledge Base Article Review Template]
E -->F[A customer success agent assigns themself as the owner for the article]
F -->G[[D365 sends a notification of the new owner to the TDT email]]
G -->H[In Madcap Central, the Flare author reassigns article review from the cus success email to the assigned Owner for the review case]
H -->I[Agent completes review in Madcap Central and submit it to Flare Author]
I -->J[Agent closes the review case in D365]
J -->K[Flare author receives notification of returned review via Madcap Central email]
K -->L[Flare author implements changes in Flare and accepts the file]
L -->M[Flare author synchronizes project with source control]
:::

Markdown editor and preview side by side

James Z
  • 12,209
  • 10
  • 24
  • 44
Ryan Lake
  • 23
  • 4
  • Please consider tagging this `azure-devops-wiki`. I would have done it but there is a five tag limit and I did not want to remove any of your tags. – ScottWelker Feb 01 '22 at 21:28

1 Answers1

4

For Azure DevOps Services' Wiki, adding this line works with your chart. It's line #3 in the full chart source below.

  • %%{init: {"flowchart": { "useMaxWidth": false } }}%%

Full Chart Source

::: mermaid
graph TD
%%{init: {"flowchart": { "useMaxWidth": false } }}%%
A[Author sends a review to the customer success email] -->|Dynamics 365 creates a review case based on the Knowledge Base Article Review Template| B[[Automation]]
B --> D[D365 creates a review case based on the Knowledge Base Article Review Template]
B --> E[D365 places the review article in the Article Review Queue]
D -->F[Dynamics 365 creates a review case based on the Knowledge Base Article Review Template]
E -->F[A customer success agent assigns themself as the owner for the article]
F -->G[[D365 sends a notification of the new owner to the TDT email]]
G -->H[In Madcap Central, the Flare author reassigns article review from the cus success email to the assigned Owner for the review case]
H -->I[Agent completes review in Madcap Central and submit it to Flare Author]
I -->J[Agent closes the review case in D365]
J -->K[Flare author receives notification of returned review via Madcap Central email]
K -->L[Flare author implements changes in Flare and accepts the file]
L -->M[Flare author synchronizes project with source control]
:::

This was a doozy to figure out. Lots of examples that don't readily apply to, or work with, Azure DevOps Wiki. Credit to #1758 Huge white margins on img/png output of large diagrams

axilleas Jun 20, 2021 Since mermaid 8.6.0, you can use directives straight into the diagram, without fiddling with JavaScript and CSS. %%{init: {"flowchart": { "useMaxWidth": false } }}%% graph LR

Note: I don't have access to Azure DevOps Server so I can't say whether it works there. Plus that might depend on the version you are using.

ScottWelker
  • 1,701
  • 17
  • 30
  • 1
    Hey Scott, Thank you so much for your help and helping to surface that solution from another user!!! I can confirm that this worked for my issue. – Ryan Lake Jan 19 '22 at 12:06
  • This fix may no longer be required. Today I noticed that the original diagram in this question now ONLY exhibits the extra whitespace during Edit/Preview. Something seems to have changed - in my Azure DevOps Services Wiki. – ScottWelker Feb 17 '22 at 15:02
  • I found this because I'm still seeing lots of whitespace. This fix works providing you don't scale the image when you print. I tried to fit my "page and a bit" diagram ot a single sheet but it "shrank" to TWO pages because the first page suddenly was the title, a page of whitespace and nothing else with the mermaid diagram on a second sheet on its own! – Paul D Smith Jun 15 '22 at 08:43
  • FYI: Mermaid was upgraded to version 8.13.9 in [MS Sprint 200 Update (Feb 2022)](https://learn.microsoft.com/en-us/azure/devops/release-notes/2022/sprint-200-update#support-for-additional-diagram-types-in-wiki-pages). – ScottWelker Aug 08 '22 at 20:59