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.

feat: hide floating outline if less than 2 items (#2375)

Myles Scolnick7877529b3d96
diff --git a/frontend/src/components/editor/chrome/panels/outline/floating-outline.tsx b/frontend/src/components/editor/chrome/panels/outline/floating-outline.tsx
index ef48696f08..aa3839fbf2 100644
--- a/frontend/src/components/editor/chrome/panels/outline/floating-outline.tsx
+++ b/frontend/src/components/editor/chrome/panels/outline/floating-outline.tsx
@@ -15,7 +15,10 @@ export const FloatingOutline: React.FC = () => {
const { activeHeaderId } = useActiveOutline(findOutlineElements(items));
const [isHovered, setIsHovered] = React.useState(false);
- if (items.length === 0) {
+ // Hide if < 2 items
+ // It's kinda useless to have an outline with only one item
+ // and Notion does the same
+ if (items.length < 2) {
return null;
}