-
Notifications
You must be signed in to change notification settings - Fork 156
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
feat: enable toggling to md mode automatically via mod-shift-m #1021
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅ |
I have read the CLA Document and I hereby sign the CLA |
recheck |
Awesome! Thanks so much for the PR @riyavsinha! 🙌 I really like this.
Weirdly, for me (on Linux), the hotkey and action button are working even on empty cells. I can't repro your issue. I did find a different bug: when I toggle the markdown view, either through the context menu or the hotkey, the tooltip in the top right of the cell (the little "M" button) still displays "View as Markdown", whereas it should be updated to "View as Python". markdown-button.webmP.S. If you're on our Discord (https://discord.gg/JE7nhX6mD8), let me know what your username is and I can give you the contributor role/flair :) |
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.
Just some small comments, in addition to a comment on the PR thread.
Ahh, good find -- I think this is because the
I'm not sure how to get around this, since passing in language as a string prop didn't work I think (maybe because the parent ran into the same issue). |
@riyavsinha this is a bug on me - i have 2 places where i keep the state and since it was one callsite, i figured it was ok. ill fix this on the |
Thank you both for the quick feedback and help so far! @mscolnick your PR worked perfectly when I pulled your changes in locally :) The last issue with this PR is that I still get In the below video, I just have it print the value for marimo-md-toggle-bug.mov |
Off the top of my head, not sure, but I can look into it |
@riyavsinha, I've merged a fix onto main. With that fix, your PR should work! Thanks so much for adding for making this contribution :) |
🚀 Development release published. You may be able to view the changes at https://marimo.app?v=0.3.8-dev5 |
…o-team#1021) * feat: enable toggling to md mode automatically via mod-shift-m * feat: add reverse toggle out of markdown
Features demonstrated in video:
However, it seems that when a cell is created, the
editorView
is null until something is typed. For this reason, I only know how to get this working after typing some whitespace character first, not sure how to actually initialize the EditorView.Fixes #1003
marimo-md.mov