-
Notifications
You must be signed in to change notification settings - Fork 350
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
fix: run markdown cells synchronously before hiding code #3385
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
for more information, see https://pre-commit.ci
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.
Thanks for the quick response! At first I thought this might not fix the problem I reported, because this is only about markdown cells, but I used python: mo.md("# heading")
.
But it seems like new versions of marimo automatically treat these "pure" markdown cells just like cells created using the add markdown cell
button.
Looks good to me!
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.
nice change!
// For markdown cells, ensure the cell is run before hiding | ||
if (nextHidden && languageAdapter === "markdown") { | ||
runCell(); | ||
} |
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.
cc @Light2Dark @akshayka for visibility, this looks good to me but want to get one of your stamps first
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.
I thought this was fixed here: #3320 🤔. This would run the cell even if it's not meant to be run I think. I'm okay with it if that's an acceptable behaviour.
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.
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.
Could I ask what the edge case is @metaboulie ? I'm struggling to reproduce this issue in the latest pull
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.
@Light2Dark Yeah, #3320 should have fixed this problem, thanks 🙂
📝 Summary
reported here
https://discord.com/channels/1059888774789730424/1326825858337607704
This ensures markdown cells are properly rendered before their code is hidden from view, while maintaining a smoother user experience.
Before
Screen.Recording.2025-01-09.at.20.15.03.mov
Now
Screen.Recording.2025-01-09.at.20.13.30.mov
📋 Checklist
📜 Reviewers
@akshayka OR @mscolnick