Skip to content
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

Hide markdown duplication in 'edit' view. #2389

Closed
patrick-kidger opened this issue Sep 23, 2024 · 2 comments · Fixed by #2507
Closed

Hide markdown duplication in 'edit' view. #2389

patrick-kidger opened this issue Sep 23, 2024 · 2 comments · Fixed by #2507
Assignees
Labels
enhancement New feature or request

Comments

@patrick-kidger
Copy link

Description

I did a search but surprisingly could not see an existing issue for this. When editing a notebook, it would be nice to not see all of the markdown written out twice.

(This is kind of detail that makes Marimo a hard sell to my coworkers.)

I appreciate that you're getting bombarded with a lot of options for when to show/hide each individual widget in each mode. I'm sorry to be adding to that! :D

Suggested solution

A Jupyter-like solution in which the display switches between the underlying markdown and the rendered HTML, when you click on it to edit it.

I appreciate that Marimo is a bit unusual in that it has three representations of Markdown (the underlying Python), which may complicate this further. I think the underlying Python is kind of an implementation detail of the serialization format though, maybe no-one ever needs to worry about that...

Alternative

No response

Additional context

No response

@akshayka
Copy link
Contributor

We've talked about making the "markdown cells" WYSIWYG (like Colab for example), but it hasn't been a priority.

I'm surprised that the duplication makes it a hard sell, but that's good to know — thanks for letting us know.

I think the underlying Python is kind of an implementation detail of the serialization format though, maybe no-one ever needs to worry about that

The Python API of mo.md() is required for interpolating Python values (which requires using mo.md(f""), including markdown in layouts, and conditionally writing markdown, all of which are not uncommon use cases. But you're totally right for pure markdown, mo.md is boilerplate.

@wasimsandhu wasimsandhu self-assigned this Oct 6, 2024
@wasimsandhu wasimsandhu added the enhancement New feature or request label Oct 6, 2024
wasimsandhu added a commit that referenced this issue Oct 10, 2024
## 📝 Summary

Create Markdown cells on the frontend with `hide_code` set to `true` by
default. Closes #2389.

## 🔍 Description of Changes

With @akshayka's change in #2504, this makes it so that the code editor
for a Markdown cell is shown when editing, but hidden when the cell is
not focused.

## 📋 Checklist

- [x] I have read the [contributor
guidelines](https://github.com/marimo-team/marimo/blob/main/CONTRIBUTING.md).
- [x] For large changes, or changes that affect the public API: this
change was discussed or approved through an issue, on
[Discord](https://discord.gg/JE7nhX6mD8), or the community
[discussions](https://github.com/marimo-team/marimo/discussions) (Please
provide a link if applicable).
- [ ] I have added tests for the changes made.
- [x] I have run the code and verified that it works as expected.

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
@ngbrown
Copy link

ngbrown commented Oct 20, 2024

I hope the issue with the PR is resolved and this comes back.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants