Closed mgr-inz-rafal closed 1 year ago
Could you please give me a reproducible example?
Yes, certainly. This is the graph source code:
flowchart TD
style Start fill:#66ccff,stroke:#333,stroke-width:4px
style End fill:#66ccff,stroke:#333,stroke-width:4px
Start --> Initialize
Initialize --> CatchUp
CatchUp --> KeepUp
KeepUp --> CatchUp
KeepUp --> Validate
Validate --> KeepUp
CatchUp --> ShutdownForUpgrade
KeepUp --> ShutdownForUpgrade
Validate --> ShutdownForUpgrade
CatchUp --> Upgrading
CatchUp -->|at genesis| Validate
Upgrading --> CatchUp
ShutdownForUpgrade --> End
and this is the pic embededd in docs:
@mgr-inz-rafal it doesn't reproduce for me locally with cargo doc --open
. Does it break for you locally?
Is that a public crate I could see docs.rs page for?
Yes, it reproduces for me locally in both Chrome and Firefox on Linux Mint.
The repo is public: https://github.com/casper-network/casper-node
However, the docs are not yet published. The charts are merged into the dev
branch.
This file contains the mentioned graph: https://github.com/casper-network/casper-node/blob/dev/node/src/reactor/main_reactor/reactor_state.rs
PS. I use this to generate the docs:
cargo doc --document-private-items --open
@mgr-inz-rafal add the following init line in your flowchart declaration:
/// flowchart TD
/// %%{init: { 'flowchart': {'diagramPadding':100} }}%%
/// style Start fill:#66ccff,stroke:#333,stroke-width:4px
/// style End fill:#66ccff,stroke:#333,stroke-width:4px
///
It would ensure you have padding at all borders, including leftmost. That should fix it. Please let me know if that's not a one-off issue, in this case I think aquamarine should enforce larger padding on all diagram types by default.
P.S: I couldn't reproduce it in a test crate or pinpoint why it happens.
Marking wontfix for now, will reopen if there are more occasions of this issue.
@mersinvald Adding the manual padding worked like a charm, thanks! :+1:
Hello, For some of the flowcharts, the leftmost part is not visible when embedded into the docs. Can we overcome that?