Skip to content

Commit fa451fc

Browse files
committed
refactor: remove right sidebar mini-mode, change left sidebar tabs from vertical to horizontal
- Remove three-state right sidebar toggle (expanded → mini → hidden), revert to simple show/hide - Remove rightMiniMode ref and related state management from PageLayout - Remove right-sidebar-mini slot and quick action buttons from PageEditorView - Change PageEditorLeftSidebar tab strip from vertical (40px left border) to horizontal (top border) - Update PageLayout tests to reflect simplified two-state
1 parent da12c77 commit fa451fc

5 files changed

Lines changed: 21 additions & 96 deletions

File tree

new-deepnotes/apps/web/src/features/pages/PageEditorLeftSidebar.vue

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,10 @@ const tabs = [
1616
</script>
1717

1818
<template>
19-
<div class="flex h-full w-full overflow-hidden">
20-
<!-- Vertical tab strip -->
19+
<div class="flex flex-col h-full w-full overflow-hidden">
20+
<!-- Horizontal tab strip -->
2121
<div
22-
class="border-border/40 bg-muted/30 flex flex-col items-center gap-1 border-r py-2"
23-
style="width: 40px; min-width: 40px"
22+
class="border-border/40 bg-muted/30 flex flex-row items-center gap-1 border-b px-2 py-1"
2423
>
2524
<button
2625
v-for="tab in tabs"

new-deepnotes/apps/web/src/features/pages/PageEditorView.vue

Lines changed: 0 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ import PageStateScreens from "./screens/PageStateScreens.vue";
3939
import { usePageStatus } from "./usePageStatus";
4040
import { useUserPageLists } from "./useUserPageLists";
4141
import { cursorColorForUserId } from "./page-awareness-utils";
42-
import { FilePlus, ArrowUpDown, Copy } from "lucide-vue-next";
4342
4443
import type { SnapshotRow } from "./page-snapshot-list";
4544
@@ -624,61 +623,6 @@ onMounted(() => {
624623
</div>
625624
</template>
626625

627-
<!-- === Right sidebar mini mode === -->
628-
<template #right-sidebar-mini>
629-
<div class="flex flex-col items-center gap-2">
630-
<!-- Note mini actions -->
631-
<template v-if="selectedNoteId">
632-
<Button
633-
variant="ghost"
634-
size="icon"
635-
class="h-8 w-8"
636-
title="Create new page"
637-
:disabled="cryptoError !== null"
638-
@click="handleCreateNewPage"
639-
>
640-
<FilePlus class="h-4 w-4" />
641-
</Button>
642-
<Button
643-
variant="ghost"
644-
size="icon"
645-
class="h-8 w-8"
646-
title="Swap head and body"
647-
:disabled="cryptoError !== null"
648-
@click="handleSwapHeadBody"
649-
>
650-
<ArrowUpDown class="h-4 w-4" />
651-
</Button>
652-
</template>
653-
654-
<!-- Arrow mini actions -->
655-
<template v-if="selectedArrowId">
656-
<Button
657-
variant="ghost"
658-
size="icon"
659-
class="h-8 w-8"
660-
title="Swap arrowheads"
661-
:disabled="cryptoError !== null"
662-
@click="handleSwapArrowheads"
663-
>
664-
<ArrowUpDown class="h-4 w-4" />
665-
</Button>
666-
</template>
667-
668-
<!-- Common: copy link -->
669-
<Button
670-
v-if="selectedNoteId || selectedArrowId"
671-
variant="ghost"
672-
size="icon"
673-
class="h-8 w-8"
674-
title="Copy link"
675-
@click="selectedNoteId ? handleCopyNoteLink() : handleCopyArrowLink()"
676-
>
677-
<Copy class="h-4 w-4" />
678-
</Button>
679-
</div>
680-
</template>
681-
682626
<!-- === Floating overlay === -->
683627
<template #floating-overlay>
684628
<!-- Bottom-right info -->

new-deepnotes/apps/web/src/layouts/PageLayout.test.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -68,25 +68,25 @@ describe("PageLayout", () => {
6868
expect(style).not.toContain("display: none");
6969
});
7070

71-
it("switches right sidebar to mini mode on first toggle", async () => {
71+
it("hides right sidebar on first toggle", async () => {
7272
wrapper = mount(PageLayout);
7373
const toolbar = wrapper.findComponent({ name: "MainToolbarMock" });
7474
await toolbar.vm.$emit("toggle-right");
7575
await wrapper.vm.$nextTick();
7676
const aside = wrapper.findAll("aside");
77-
const style = aside[1]!.attributes("style") ?? "";
78-
expect(style).not.toContain("display: none");
79-
expect(style).toContain("48px");
77+
expect(aside[1]!.attributes("style")).toContain("display: none");
8078
});
8179

82-
it("hides right sidebar on second toggle", async () => {
80+
it("shows right sidebar on second toggle", async () => {
8381
wrapper = mount(PageLayout);
8482
const toolbar = wrapper.findComponent({ name: "MainToolbarMock" });
8583
await toolbar.vm.$emit("toggle-right");
8684
await toolbar.vm.$emit("toggle-right");
8785
await wrapper.vm.$nextTick();
8886
const aside = wrapper.findAll("aside");
89-
expect(aside[1]!.attributes("style")).toContain("display: none");
87+
const style = aside[1]!.attributes("style") ?? "";
88+
expect(style).not.toContain("display: none");
89+
expect(style).toContain("300px");
9090
});
9191

9292
it("renders default slot in main canvas area", () => {

new-deepnotes/apps/web/src/layouts/PageLayout.vue

Lines changed: 3 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -6,25 +6,13 @@ import MainToolbar from "@/features/spatial/MainToolbar.vue";
66
// --- sidebar state ---
77
const leftExpanded = ref(true);
88
const rightExpanded = ref(true);
9-
const rightMiniMode = ref(false);
109
const leftWidth = ref(240);
1110
1211
function toggleLeft() {
1312
leftExpanded.value = !leftExpanded.value;
1413
}
1514
function toggleRight() {
16-
if (rightExpanded.value && !rightMiniMode.value) {
17-
// expanded -> mini
18-
rightMiniMode.value = true;
19-
} else if (rightExpanded.value && rightMiniMode.value) {
20-
// mini -> hidden
21-
rightExpanded.value = false;
22-
rightMiniMode.value = false;
23-
} else {
24-
// hidden -> expanded
25-
rightExpanded.value = true;
26-
rightMiniMode.value = false;
27-
}
15+
rightExpanded.value = !rightExpanded.value;
2816
}
2917
function resetLeftWidth() {
3018
leftWidth.value = 240;
@@ -34,7 +22,6 @@ function resetLeftWidth() {
3422
provide("pageLayout", {
3523
leftExpanded,
3624
rightExpanded,
37-
rightMiniMode,
3825
leftWidth,
3926
toggleLeft,
4027
toggleRight,
@@ -116,13 +103,9 @@ function onResizePointerUp(e: PointerEvent) {
116103
<aside
117104
v-show="rightExpanded"
118105
class="border-border/40 bg-muted/30 flex flex-col overflow-y-auto border-l"
119-
:class="rightMiniMode ? 'items-center' : ''"
120-
:style="{ width: rightMiniMode ? '48px' : '300px', minWidth: rightMiniMode ? '48px' : '300px' }"
106+
style="width: 300px; min-width: 300px"
121107
>
122-
<div v-if="rightMiniMode" class="flex flex-col items-center gap-1 py-2">
123-
<slot name="right-sidebar-mini" />
124-
</div>
125-
<div v-else class="p-2">
108+
<div class="p-2">
126109
<slot name="right-sidebar" />
127110
</div>
128111
</aside>

new-deepnotes/docs/UI_POLISH_PROGRESS.md

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
Tracks execution of `UI_POLISH_PLAN.md` (areas around the main section in the pages layout only).
44

5-
> **Last updated:** After editor-chrome evaluation (Jun 2026).
5+
> **Last updated:** Jun 2026 — after sidebar orientation + mini-mode removal.
66
> **Evaluation findings:**
7-
> - Left sidebar tabs are **vertical** (left edge) but should be **horizontal** (above content).
8-
> - Mini-mode is **disliked by user** and must be removed entirely.
9-
> - "Styled selects" (§5.1) were marked DONE but still use raw `<select>` because Shadcn `Select` is **not installed** in the project.
7+
> - Left sidebar tabs are now **horizontal** (above content).
8+
> - Mini-mode has been removed entirely; right sidebar is 2-state only.
9+
> - "Styled selects" (§5.1) still use raw `<select>` because Shadcn `Select` is **not installed** in the project.
1010
> - Right sidebar is missing a **header bar** showing the active element type.
1111
> - `CURRENT_SITUATION.md` is a snapshot; it should not be edited.
1212
@@ -15,14 +15,14 @@ Tracks execution of `UI_POLISH_PLAN.md` (areas around the main section in the pa
1515
| Section | Task | Status | Files Touched | Notes |
1616
|---------|------|--------|---------------|-------|
1717
| **2.1** | Simplify header: remove `PageToolbarActions`, text links, add profile dropdown | **DONE** | `MainToolbar.vue`, `PageEditorView.vue` | ✅ Good quality. |
18-
| **3.1** | Left sidebar: icon-tabbed sections, remove collab card | **DONE (wrong orientation)** | `PageEditorView.vue`, `PageLayout.vue`, `PageEditorLeftSidebar.vue` | Tabs are vertical on the left edge; need to flip to **horizontal** at the top. |
18+
| **3.1** | Left sidebar: icon-tabbed sections, remove collab card | **DONE** | `PageEditorView.vue`, `PageLayout.vue`, `PageEditorLeftSidebar.vue` | Tabs now horizontal at top. |
1919
| **4.2** | Fix note interactions: vertical resize, double-click, handles visibility, edit-on-frame | **DONE** | `DisplayNote.vue`, `useCanvasActions.ts`, `page-doc-schema.ts`, `note-model.ts` ||
2020
| **4.1a-d** | Main toolbar: command dispatcher + toolbar shell + formatting/objects/alignment + remove floating buttons | **DONE** | `CanvasToolbar.vue`, `useEditorCommandDispatcher.ts`, `SpatialPageView.vue` ||
2121
| **4.3** | Expand context menus | **DONE** | `CanvasContextMenu.vue`, `NoteContextMenu.vue`, `SpatialPageView.vue` ||
2222
| **5.1** | Right sidebar: styled selects, height control, arrow head selects | **NOT DONE** | `NotePropertiesCard.vue`, `ArrowPropertiesCard.vue`, `PageEditorView.vue` | Still uses raw `<select>`. **Blocked:** Shadcn `Select` component is not installed. |
2323
| **5.1b** | Right sidebar: consolidate page-level cards, add missing controls (swap, timestamps, copy link, local collapsing, anchors) | **DONE** | `NotePropertiesCard.vue`, `ArrowPropertiesCard.vue`, `PageEditorView.vue` ||
2424
| **5.2** | Right sidebar: "Create new page" functionality | `PARTIAL` | `NotePropertiesCard.vue` | UI added, crypto stubbed. |
25-
| **5.3** | Right sidebar: mini-mode (48px collapsed strip) | **`ABANDONED`** | `PageLayout.vue`, `PageEditorView.vue` | User dislikes mini-mode. Remove entirely; sidebar should be **expanded ↔ hidden only**. Also remove mini-mode slot from `PageEditorView.vue`. |
25+
| **5.3** | Right sidebar: mini-mode (48px collapsed strip) | **REMOVED** | `PageLayout.vue`, `PageEditorView.vue` | ✅ 2-state only (expanded ↔ hidden). |
2626
| **7** | Keyboard shortcut parity (high-impact missing shortcuts) | `NOT STARTED` | `useSpatialKeyboard.ts` ||
2727

2828
## Blocked Dependencies
@@ -31,7 +31,6 @@ Tracks execution of `UI_POLISH_PLAN.md` (areas around the main section in the pa
3131

3232
## Next Recommended Actions
3333

34-
1. `PageEditorLeftSidebar.vue` — flip `flex-row``flex-col`; move tab strip to horizontal top.
35-
2. `PageLayout.vue` — delete `rightMiniMode` ref and 3-state toggle logic; make right sidebar 2-state (expanded/hidden).
36-
3. `PageEditorView.vue` — delete `#right-sidebar-mini` slot and its contents.
37-
4. Install Shadcn `select` and `tabs` primitives into `@/components/ui`.
34+
1. Install Shadcn `select` primitive into `@/components/ui`.
35+
2. Replace raw `<select>` elements in `NotePropertiesCard.vue` (anchor X/Y, width) and `ArrowPropertiesCard.vue` (body type, body style) with Shadcn `Select`.
36+
3. Add missing keyboard shortcuts to `useSpatialKeyboard.ts` (§7).

0 commit comments

Comments
 (0)