A reactive notebook for Python — run reproducible experiments, query with SQL, execute as a script, deploy as an app, and version with git. Stored as pure Python. All in a modern, AI-native editor.
Python artificial-intelligencedagdata-sciencedata-visualizationdataflowdeveloper-toolsmachine-learningnotebookspipelinepythonreactivesqlweb-app
docs: editor features (#563)
Akshay Agrawalde1cf66eb484
diff --git a/docs/_static/docs-cell-actions.png b/docs/_static/docs-cell-actions.pngnew file mode 100644index 0000000000..c77b9cc863Binary files /dev/null and b/docs/_static/docs-cell-actions.png differdiff --git a/docs/_static/docs-command-palette.png b/docs/_static/docs-command-palette.pngnew file mode 100644index 0000000000..16248340adBinary files /dev/null and b/docs/_static/docs-command-palette.png differdiff --git a/docs/_static/docs-feedback-form.png b/docs/_static/docs-feedback-form.pngnew file mode 100644index 0000000000..75f56a7b86Binary files /dev/null and b/docs/_static/docs-feedback-form.png differdiff --git a/docs/_static/docs-html-export.png b/docs/_static/docs-html-export.pngnew file mode 100644index 0000000000..80bce8bff5Binary files /dev/null and b/docs/_static/docs-html-export.png differdiff --git a/docs/_static/docs-panel-icons.png b/docs/_static/docs-panel-icons.pngnew file mode 100644index 0000000000..3ac3acc5daBinary files /dev/null and b/docs/_static/docs-panel-icons.png differdiff --git a/docs/_static/docs-user-config.png b/docs/_static/docs-user-config.pngnew file mode 100644index 0000000000..8da69c176aBinary files /dev/null and b/docs/_static/docs-user-config.png differdiff --git a/docs/faq.md b/docs/faq.mdindex eef9b6b4c9..0508ff9551 100644--- a/docs/faq.md+++ b/docs/faq.md@@ -227,6 +227,8 @@ Access the last submitted value of the text area with `form.value`.### How do I write markdown?Import `marimo` (as `mo`) in a notebook, and use the `mo.md` function.+Learn more in the [outputs guide](/guides/outputs.md#markdown)+or by running `marimo tutorial markdown`.<a name="faq-plots" ></a>diff --git a/docs/guides/editor_features.md b/docs/guides/editor_features.mdnew file mode 100644index 0000000000..f2a9c86fc5--- /dev/null+++ b/docs/guides/editor_features.md@@ -0,0 +1,112 @@+# Editor features++This guide introduces some of marimo editor's features, including+a variables panel, dependency graph viewer, table of contents, HTML export,+GitHub copilot, code formatting, HTML export, a feedback form, and more.++This guide introduces some of these features.++## Overview panels++marimo ships with the following IDE-like panels that help provide an overview+of your notebook:++1. **errors**: view errors in each cell;+2. **variables**: explore variable values, see where they are defined and used;+3. **dependency graph**: view dependencies between cells;+4. **table of contents**: corresponding to your markdown;+5. **logs**: a continuous stream of stdout and stderr.++<div align="center">+<figure>+<img src="/_static/docs-panel-icons.png"/>+<figcaption>Click these buttons to access the editor panels.</figcaption>+</figure>+</div>++These panels can be toggled via the buttons in the lower left of the editor.++## Cell actions++Click the dot array to the right of a cell to pull up a context menu (or hold+and drag to move the cell):++<div align="center">+<figure>+<img src="/_static/docs-cell-actions.png"/>+<figcaption>Access cell actions like code formatting, hiding code, and more+through the cell context menu.</figcaption>+</figure>+</div>++## Keyboard shortcuts++We've kept some well-known keyboard shortcuts for notebooks (`Ctrl-Enter`,+`Shift-Enter`), dropped others, and added a few of our own. Hit+`Ctrl/Cmd-Shift-H` to pull up the shortcuts.++We know keyboard shortcuts are very personal; we'll let you remap them in the+future.++_Missing a shortcut? File a+[GitHub issue](https://github.com/marimo-team/marimo/issues)._++## Command palette++Hit `Cmd/Ctrl+K` to open the command palette.++<div align="center">+<figure>+<img src="/_static/docs-command-palette.png"/>+<figcaption>Quickly access common commands with the command palette.</figcaption>+</figure>+</div>+++_Missing a command? File a+[GitHub issue](https://github.com/marimo-team/marimo/issues)._++## Export to static HTML++Export the current view your notebook to static HTML via the notebook+menu:++<div align="center">+<figure>+<img src="/_static/docs-html-export.png"/>+<figcaption>Download as static HTML.</figcaption>+</figure>+</div>++## Configuration++Click the settings icon in the top right to access important configuration+settings. For example, you can configure marimo to not autorun on startup.+You can also enable GitHub Copilot from this menu.++<div align="center">+<figure>+<img src="/_static/docs-user-config.png"/>+<figcaption>Configure settings.</figcaption>+</figure>+</div>+++## Send feedback++The question mark icon in the panels tray (lower left of the editor) opens a+dialog to send anonymous feedback. We welcome any and all feedback, from the+tiniest quibbles to the biggest blue sky dreams.++<div align="center">+<figure>+<img src="/_static/docs-feedback-form.png"/>+<figcaption>Send anonymous feedback with our feedback form.</figcaption>+</figure>+</div>++If you'd like your feedback to start a conversation (we'd love to talk with+you!), please consider posting in our [GitHub+issues](https://github.com/marimo-team/marimo/issues) or+[Discord](https://discord.gg/JE7nhX6mD8). But if you're in a flow state and+can't context switch out, the feedback form has your back.diff --git a/docs/guides/index.md b/docs/guides/index.mdindex c1f3aaff32..94319830db 100644--- a/docs/guides/index.md+++ b/docs/guides/index.md@@ -9,6 +9,7 @@reactivityinteractivityoutputs+ editor_featuresdataframesplottingstate@@ -25,6 +26,7 @@ These guides cover marimo's core concepts.| {doc}`reactivity` | How reactive execution works || {doc}`interactivity` | Using interactive UI elements || {doc}`outputs` | Markdown, plots, and other visual outputs |+| {doc}`editor_features`| View variables, cell dependencies, errors, and more || {doc}`dataframes` | Working with dataframes || {doc}`plotting` | Interactive and reactive plots || {doc}`state` | Mutable, reactive state |diff --git a/docs/guides/outputs.md b/docs/guides/outputs.mdindex 09b1570b81..9140b6232f 100644--- a/docs/guides/outputs.md+++ b/docs/guides/outputs.md@@ -11,3 +11,53 @@ documented in the [API reference](/api/index/).<img src="/_static/outputs.gif"/></figure></div>++## Markdown++Markdown is written with the marimo library function [`mo.md`](/api/markdown/).+Writing markdown programmatically lets you make dynamic markdown: interpolate+Python values into markdown strings, conditionally render your markdown, and+embed markdown in other objects.++Here's a simple hello world example:++```python+import marimo asmo+```++```python+name = mo.ui.text(placeholder="Your name here")+mo.md(+ f"""+ Hi! What's your name?++ {name}+ """+)+```++```python+mo.md(+ f"""+ Hello, {name.value}!+ """+)+```++Notice that marimo knows how to render marimo objects in markdown: can just+embed them in [`mo.md()`](/api/markdown) using an f-string, and marimo will+figure out how to display them!++For other objects, like matplotlib plots, wrap+them in [`mo.as_html()`](#marimo.as_html) to tap into marimo's+media viewer:++```python+mo.md(+ f"""+ Here's a plot!++ {mo.as_html(figure)}+ """+)+```diff --git a/frontend/src/components/editor/chrome/wrapper/footer.tsx b/frontend/src/components/editor/chrome/wrapper/footer.tsxindex f34c307b84..a542401cd5 100644--- a/frontend/src/components/editor/chrome/wrapper/footer.tsx+++ b/frontend/src/components/editor/chrome/wrapper/footer.tsx@@ -3,7 +3,7 @@ import React, { PropsWithChildren } from "react";import {PanelBottomIcon,PanelLeftIcon,- CircleEqualIcon,+ FunctionSquareIcon,XCircleIcon,ScrollTextIcon,NetworkIcon,@@ -41,14 +41,7 @@ export const Footer: React.FC = () => {selected={selectedPanel === "variables"}onClick={() => openApplication("variables")}>- <CircleEqualIcon className={cn("h-5 w-5 ")} />- </FooterItem>- <FooterItem- tooltip="View outline"- selected={selectedPanel === "outline"}- onClick={() => openApplication("outline")}- >- <ScrollTextIcon className={cn("h-5 w-5")} />+ <FunctionSquareIcon className={cn("h-5 w-5 ")} /></FooterItem><FooterItemtooltip="Explore dependencies"@@ -57,6 +50,13 @@ export const Footer: React.FC = () => {><NetworkIcon className={cn("h-5 w-5")} /></FooterItem>+ <FooterItem+ tooltip="View outline"+ selected={selectedPanel === "outline"}+ onClick={() => openApplication("outline")}+ >+ <ScrollTextIcon className={cn("h-5 w-5")} />+ </FooterItem><FooterItemtooltip="Notebook logs"selected={selectedPanel === "logs"}