Skip to content

Conversation

@maxkoretskyi
Copy link
Contributor

📝 Summary

Added mo.outline() element to show outline. Fixes 5834

🔍 Description of Changes

image

@vercel
Copy link

vercel bot commented Sep 18, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
marimo-docs Ready Ready Preview Comment Sep 19, 2025 4:27pm


render(props: IStatelessPluginProps<Data>): JSX.Element {
const { label } = props.data;
const { items } = store.get(notebookOutline);
Copy link
Contributor

Choose a reason for hiding this comment

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

this won't re-render on changes. you will need to create a new react component and then call useAtomValue(notebookOutline)

Copy link
Contributor

Choose a reason for hiding this comment

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

you will want to wrap the component in a <Provider store={store} too

@maxkoretskyi
Copy link
Contributor Author

need to check that

const { activeHeaderId, activeOccurrences } = useActiveOutline(headerElements);`

works as expected and write a few tests

mscolnick
mscolnick previously approved these changes Sep 19, 2025
@mscolnick
Copy link
Contributor

you will need to run the test tests/test_api.py::test_api to update the API snapshot

@manzt manzt added the enhancement New feature or request label Sep 19, 2025
@mscolnick mscolnick merged commit be7369c into marimo-team:main Sep 19, 2025
35 of 37 checks passed
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 this pull request may close these issues.

Add outline - mo.outline()

3 participants