Skip to content

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.

fix: add "marimo-sidebar" to excluded tags in outline (#8504)

Myles Scolnickdd6376ee2b10
diff --git a/frontend/src/core/dom/__tests__/outline.test.ts b/frontend/src/core/dom/__tests__/outline.test.ts
index a9f275c495..b2dd2a2ff1 100644
--- a/frontend/src/core/dom/__tests__/outline.test.ts
+++ b/frontend/src/core/dom/__tests__/outline.test.ts
@@ -323,6 +323,9 @@ describe("parseOutline", () => {
<marimo-accordion>
<h2 id="excluded-heading-accordion">Excluded Heading in Accordion</h2>
</marimo-accordion>
+ <marimo-sidebar>
+ <h2 id="excluded-heading-sidebar">Excluded Heading in Sidebar</h2>
+ </marimo-sidebar>
<h2 id="another-included-heading">Another Included Heading</h2>
</div>
`;
diff --git a/frontend/src/core/dom/outline.ts b/frontend/src/core/dom/outline.ts
index d785360efe..d12f56f2bf 100644
--- a/frontend/src/core/dom/outline.ts
+++ b/frontend/src/core/dom/outline.ts
@@ -6,7 +6,12 @@ import type { Outline, OutlineItem } from "../cells/outline";
import type { OutputMessage } from "../kernel/messages";
// Tags that we don't want to include in the outline
-const excludedTags = ["marimo-carousel", "marimo-tabs", "marimo-accordion"];
+const excludedTags = [
+ "marimo-carousel",
+ "marimo-tabs",
+ "marimo-accordion",
+ "marimo-sidebar",
+];
// We go up to h6. Previously we did h3 to match Google Docs and Notion, but users have requested more levels.
// This could be made configurable in the future.