Skip to content

Conversation

@sghng
Copy link

@sghng sghng commented Oct 6, 2025

📝 Summary

Fixes #6697

🔍 Description of Changes

Fix the scaling issue of Mermaid LR flowchart by removing width limit.

📋 Checklist

  • I have read the contributor guidelines.
  • For large changes, or changes that affect the public API: this change was discussed or approved through an issue, on Discord, or the community discussions (Please provide a link if applicable).
  • I have added tests for the changes made.
  • I have run the code and verified that it works as expected.

@sghng sghng requested review from Light2Dark and manzt as code owners October 6, 2025 16:43
@vercel
Copy link

vercel bot commented Oct 6, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
marimo-docs Ready Ready Preview Comment Oct 6, 2025 4:44pm

@github-actions
Copy link

github-actions bot commented Oct 6, 2025


Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


I have read the CLA Document and I hereby sign the CLA


You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

@sghng
Copy link
Author

sghng commented Oct 6, 2025

I could use some help! The scaling is fixed but the left most portion is somehow hidden (even with scroll bar)...

Twilight 2025-10-06 12 31 38

@sghng
Copy link
Author

sghng commented Oct 6, 2025

I have read the CLA Document and I hereby sign the CLA

I have read the CLA Document and I hereby sign the CLA

@mscolnick
Copy link
Contributor

@sghng - if you move the mermaid diagram outside of the vstack or remove the center does that change anything? im curious if one of those are messing with the styling. i would also suggest inspecting the browser console and playing with the styles there to see if we should add/override anything

@sghng
Copy link
Author

sghng commented Oct 6, 2025

@sghng - if you move the mermaid diagram outside of the vstack or remove the center does that change anything? im curious if one of those are messing with the styling. i would also suggest inspecting the browser console and playing with the styles there to see if we should add/override anything

Thanks for the tips! The problem is indeed with the .center() method call. But I'm still not sure how to have this fixed...

@sghng
Copy link
Author

sghng commented Oct 8, 2025

I can still use some help here with the problem of mo.center() :/

@mscolnick
Copy link
Contributor

@sghng can you move it outside of the center? you might need to provide a max-width or justify-self

@sghng
Copy link
Author

sghng commented Oct 22, 2025

@sghng can you move it outside of the center? you might need to provide a max-width or justify-self

Move it outside works, but this is exactly what I want to fix.

However I think this problem is actually acceptable? If the image is long enough that it's clipped, then there's no need to center it anyway.

@sghng sghng marked this pull request as ready for review October 22, 2025 03:55
@mscolnick
Copy link
Contributor

mscolnick commented Oct 22, 2025

@sghng i wonder if this change could affect a lot of existing notebooks. Could you create a smoke test with various mermaid examples and compare the before and after?

You can commit this smoke test to marimo/_smoke_tests/...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Mermaid scaling issue in LR diagrams

2 participants