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

mep/8: frontend function hints #4025

Draft
wants to merge 2 commits into
base: dm/setup-context
Choose a base branch
from
Draft

Conversation

dmadisetti
Copy link
Collaborator

📝 Summary

@mscolnick this was my very rough draft approach to passing hints upstream:

image

For reference, this is how observable renders their functions:

image

and what was suggested:

image

image

But I'm sure there's probably a more cohesive marimo style (do we have have any brand docs?):

Copy link

vercel bot commented Mar 7, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
marimo-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 7, 2025 5:40pm
marimo-storybook ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 7, 2025 5:40pm

@dmadisetti dmadisetti marked this pull request as draft March 7, 2025 17:35
@dmadisetti dmadisetti changed the title Dm/function hook mep/8: frontend function hints Mar 7, 2025
@akshayka
Copy link
Contributor

akshayka commented Mar 7, 2025

No brand docs yet ... but that's a good idea.

At first glance it feels a bit repetitive to include the function signature in the output area? I like the idea of communicating hints and function-ness though ...

@mscolnick
Copy link
Contributor

@dmadisetti is the name configurable on the frontend? is it enforced by the backend?

when happens to the name if it goes from a pure function to non-pure function?

@dmadisetti
Copy link
Collaborator Author

@dmadisetti is the name configurable on the frontend? is it enforced by the backend?

Name will be overwritten as is, which seems reasonable? But the current UI does make it a bit jarring. Might be worth hiding in these cases.

when happens to the name if it goes from a pure function to non-pure function?

Then the TopLevelStatus "hint" indicates that something has gone wrong- but the name is retained. It could be pushed back to "_"


Currently unindented comments after (or before) the function are stripped. I'm think we should retain the comments, and have that break "purity" if someone really wanted to intentionally keep it in cell mode.

@dmadisetti
Copy link
Collaborator Author

At first glance it feels a bit repetitive to include the function signature in the output area? I like the idea of communicating hints and function-ness though ...

Agreed. I think this is an issue shared with markdown too. Many possible UIs but one might be using the markdown style blocks of no border, and expansion on click

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.

3 participants