Love the mermaid integration, and being able to easily type out charts has been a game-changer for the way that I plan out software. However, there is a small rendering issue that makes the notes substantially less enjoyable to use, which is excessive whitespace padding around the charts:
sequenceDiagram
autonumber
title: SEED: Ethereum > Matic Bridge Flow
participant P as 🐨<br>Player
participant SEED as Ethereum<br>SEED
participant RCM as Ethereum<br>Root Chain Manager
participant EPC as Ethereum<br>Predicate Contract
participant CCM as Matic<br>Child Chain Manager
participant MSEED as Matic<br>SEED
rect rgba(166, 107, 208, 0.1)
note over P, SEED: First Time Approval Setup
P ->>+ SEED: Approve Predicate Contract<br>(Ethereum, approve call)
SEED -->>- P: Approve Confirmed
end
P ->>+ RCM: Deposit SEED to Lock<br>(Ethereum, depositFor call)
rect rgba(255, 190, 68, 0.1)
note over EPC, RCM: Lock Ethereum SEED
RCM ->>+ EPC: Use Predicate<br>(Token-specific Locking Logic)
EPC -->>- RCM: Lock Successful
end
RCM ->>+ CCM: State Sync SEED<br>(Ethereum to Matic)
rect rgba(120, 210, 130, 0.1)
note over CCM, MSEED: Mint Matic SEED<br>for locked Ethereum SEED
CCM ->>+ MSEED: Mint Equal SEED<br>(Matic, deposit call)
end
Matic > Ethereum
sequenceDiagram
autonumber
title: SEED: Matic > Ethereum Bridge Flow
participant P as 🐨<br>Player
participant MSEED as Matic<br>SEED
participant RCM as Ethereum<br>Root Chain Manager
participant EPC as Ethereum<br>Predicate Contract
participant SEED as Ethereum<br>SEED
rect rgba(166, 107, 208, 0.1)
note over P, MSEED: Burn Matic SEED
P ->>+ MSEED: Burn SEED<br>(Matic, withdraw call)
MSEED -->>- P: Burn Confirmed
end
rect rgba(255, 190, 68, 0.1)
note over P: Wait for Checkpoint
P ->> P: Wait 10-30 min for Burn<br>to be Checkpointed to Ethereum
end
P ->>+ RCM: "Exit" Matic<br>(Submit proof of burn to unlock)
rect rgba(120, 210, 130, 0.1)
note over RCM, SEED: Unlock (Exit) SEED
RCM ->>+ EPC: Exit via Predicate<br>(Token-specific Unlocking Logic)
EPC ->>+ SEED: Transfer Tokens to Player<br>(Ethereum, safeTransfer call)
end
Though it looks like this may have been by-design, to make the split editor's heights line up between markdown and split editing? That vaguely makes sense for the split view, but definitely makes the rendered view look weird
I have a problem with my dev env right now. And I'm rather busy at work. I'll look at it in the evening.
We should also check what the latest mermaid code does. They have a kitchen sink env.
So it could be an upstream bug that has been fixed already. Unfortunately I can't upgrade my local Mermaid to test that theory, because my dev env is shot.
It never came to me to resize the window. So now I think it is an upstream bug that hasn't been fixed.
Afaik there's nothing in the Joplin code that would add extra space at the top and bottom.
I guess someone will have to open a bug report with Mermaid. I hope I get around to it the next few days.