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

feat: ui.markdown component #903

Merged
merged 9 commits into from
Oct 22, 2024
Merged

Conversation

wusteven815
Copy link
Contributor

@wusteven815 wusteven815 commented Sep 23, 2024

@wusteven815 wusteven815 marked this pull request as ready for review September 23, 2024 16:27
@wusteven815 wusteven815 linked an issue Sep 23, 2024 that may be closed by this pull request
plugins/ui/DESIGN.md Outdated Show resolved Hide resolved
@dsmmcken
Copy link
Contributor

Would we expect it to accept common props as well?

@dsmmcken
Copy link
Contributor

For reference: https://docs.streamlit.io/develop/api-reference/text/st.markdown#stmarkdown

Streamlit exposes unsafe_allow_html to turn off escaping.

Also supports emoji shortcodes which is just neat. Probably not something we need to do, but neat.

Copy link
Member

@mofojed mofojed left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code blocks aren't rendering properly. You'll need to pass in a component for rendering code blocks, like we do in our MarkdownEditor component.

ReactMarkdown shows an example of this in their page as well (side note, I didn't know you could use tildes to mark code blocks as well, thought it was just backticks).

Example that doesn't look right:

from deephaven import ui

md = ui.markdown("""
# Code block example

```python
from deephaven import empty_table
t = empty_table(1000).update("x=i")
```
""")

image

Copy link
Contributor

@dsmmcken dsmmcken left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good. Add doc page.

@dsmmcken dsmmcken changed the title docs: markdown component spec feat: markdown component spec Oct 4, 2024
@dsmmcken dsmmcken changed the title feat: markdown component spec feat: ui.markdown component Oct 4, 2024
mofojed
mofojed previously approved these changes Oct 15, 2024
@wusteven815 wusteven815 merged commit 0d1eea8 into deephaven:main Oct 22, 2024
18 checks passed
wusteven815 added a commit that referenced this pull request Oct 23, 2024
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.

ui.markdown widget
4 participants