marimo
marimo copied to clipboard
feat: documentation panel
This stores the completion response when inside a function call in the documentation tab. This is re-using an old PR when we tried to put this in a popover.
This documentation panel isn't perfect. Some improvements that could happen in this PR or later:
- Parse certain packages that we know are RST using an RST parser (e.g. numpy)
- Populate the panel when we move the cursor to a function (not just the arguments of it)
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 | Jan 24, 2024 6:21pm |
marimo-storybook | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Jan 24, 2024 6:21pm |
Codecov Report
Attention: 4 lines
in your changes are missing coverage. Please review.
Comparison is base (
37c0143
) 63.61% compared to head (aaf2584
) 63.57%.
Files | Patch % | Lines |
---|---|---|
marimo/_runtime/complete.py | 0.00% | 4 Missing :warning: |
Additional details and impacted files
@@ Coverage Diff @@
## main #591 +/- ##
==========================================
- Coverage 63.61% 63.57% -0.04%
==========================================
Files 140 140
Lines 6662 6666 +4
Branches 1321 1322 +1
==========================================
Hits 4238 4238
- Misses 2240 2244 +4
Partials 184 184
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Nice!
Populate the panel when we move the cursor to a function (not just the arguments of it)
I think we implement this feature in this PR. I tried it out and it's a bit awkward / non-obvious having to type in order to get the docs to show up
@akshayka, now we request using the same logic as the tooltip - should be pretty sufficient. some variables have pretty weird/poor docs
Nice! Just tried it out for a bit.
I like that docs show up on cursor move now. However when I move the cursor around (typically by clicking), maybe 20% of the time the docs don't update or I see "No documentation". Here's an example
some variables have pretty weird/poor docs
I guess the issue with using tooltips is that now we get "documentation" for variables, whereas really all we're seeing is the variable name and its type. If we want to avoid this I don't mind creating a new route in the backend that's only for docstrings.