diff --git a/design-qa.md b/design-qa.md index 74b0c63..80dcf72 100644 --- a/design-qa.md +++ b/design-qa.md @@ -1,42 +1,41 @@ # Design QA -- Source visual truth: `/workspace/scratch/6e52996114b8/upload/6c29987c-43a6-4ded-ba86-b66d1c638f51.png` -- Source pixel dimensions: `151 × 506`. -- Browser-rendered implementation: `/workspace/scratch/6e52996114b8/sidebar-popover-pc-final-20260909.jpg` +- Source visual truth: `/workspace/scratch/6e52996114b8/upload/28e7be72-5b24-4b86-bae5-d0d4eb1015e2.png` +- Source pixel dimensions: `151 × 381`. +- Browser-rendered implementation: `/workspace/scratch/6e52996114b8/sidebar-popover-outside-20260909.jpg` - Browser-rendered implementation dimensions: `1363 × 936`. -- Focused side-by-side comparison: `/workspace/scratch/6e52996114b8/sidebar-popover-comparison-final-20260909.jpg` +- Focused side-by-side comparison: `/workspace/scratch/6e52996114b8/sidebar-popover-outside-comparison-20260909.jpg` - Implementation CSS viewport: `1363 × 936`, device scale factor `1`. - State: PC dark theme, collapsed sidebar, pointer hovering the disabled “视觉风格” icon. ## Full-view comparison evidence -The implementation preserves the existing collapsed sidebar width, icon order, selected state and main-content boundary. Hovering an icon opens a compact Naive UI popover to the right without shifting the sidebar or content. +The browser render keeps the `64px` collapsed navigation rail unchanged. The visible popover is teleported to `body`, rendered above the content layer, and no longer begins inside the sidebar boundary. ## Focused region comparison evidence -The focused comparison places the supplied sidebar crop beside a `320 × 506` crop of the browser render. The source icon spacing, dark surfaces and green selected state remain unchanged. The implementation adds the requested hover label beside the icon; disabled workflow items use the explanatory suffix “(剧本完成后可用)”. +The focused comparison places the supplied crop beside a `320 × 381` crop of the revised browser render. The source's red annotation identifies the content-side area beside the collapsed rail. Browser geometry confirms the sidebar ends at `x = 64px` and the popover body begins at `x = 65px`, leaving the body fully outside the sidebar while its arrow still points back to the icon. ## Required fidelity surfaces -- Typography: the application typography is unchanged; popover copy uses the current Naive UI theme and compact UI text sizing. -- Spacing and layout rhythm: the `64px` collapsed sidebar and existing vertical menu rhythm are preserved. Popovers use `placement="right"` and do not alter document flow. -- Colors and visual tokens: dark sidebar surfaces and the selected green state remain unchanged. Popovers inherit the existing dark Naive UI theme. -- Image and asset fidelity: no raster assets were introduced. Existing Lucide menu icons are preserved. -- Copy and content: PC hints use each menu's existing label. Locked entries append “(剧本完成后可用)”; “后端连接” keeps its original copy. +- Typography: existing application and Naive UI popover typography are unchanged. +- Spacing and layout rhythm: the `64px` sidebar and icon rhythm remain unchanged. The popover's total inline-start margin is `24px`, producing a measured `1px` gap outside the sidebar edge. +- Colors and visual tokens: dark surfaces, selected green state and popover theme tokens remain unchanged. +- Image and asset fidelity: no raster or icon assets were added or modified. +- Copy and content: menu labels and locked-state explanation remain unchanged. ## Findings - No actionable P0/P1/P2 visual or responsive issues remain. -- The disconnected local backend produces the expected in-page `502` response; it does not affect sidebar layout or popover behavior. +- The disconnected local backend produces the expected in-page `502` response; it does not affect popover positioning. ## Primary interactions tested -- Collapsed the PC sidebar and hovered an enabled menu icon; “我的剧本” appeared. -- Hovered the disabled “视觉风格” icon; its availability explanation appeared. -- Hovered the bottom settings icon; “后端连接” appeared. -- Clicked an enabled collapsed icon and confirmed navigation to the target workflow route. -- Expanded the PC sidebar and confirmed menu popovers were absent. -- Confirmed through component tests that mobile navigation does not render menu popovers. +- Collapsed the PC sidebar and hovered the “视觉风格” icon. +- Confirmed the popover content remained readable and the arrow still targeted the icon. +- Measured the sidebar and popover body bounds to confirm the popover starts outside the sidebar. +- Confirmed the popover is explicitly mounted to `body` with a high overlay level. +- Confirmed component tests continue to cover desktop-only popover rendering. ## Console errors checked @@ -44,15 +43,16 @@ No application-origin console errors were reported. The cloud browser logged onl ## Comparison history -- Iteration 1: added native NPopover wrappers and found that the full-width transparent RouterLink intercepted hover on enabled menu icons. -- Iteration 2: made enabled collapsed icons direct RouterLinks, raised their trigger layer above the transparent label and rechecked enabled, disabled and settings hints in the browser. +- Iteration 1: the popover body began at `x = 51px` while the sidebar ended at `x = 64px`, leaving a `13px` overlap (P2). +- Fix: mounted the popover explicitly to `body`, raised its overlay level, and overrode Naive UI's default inline margin in the component style. +- Iteration 2: the revised browser render measured the popover body at `x = 65px`, a `1px` gap outside the sidebar edge, with no remaining P0/P1/P2 issue. ## Implementation checklist -- [x] Add NPopover hints to all PC collapsed sidebar menu icons. -- [x] Preserve click navigation for enabled collapsed icons. -- [x] Explain locked workflow items in their hint copy. -- [x] Keep PC expanded and mobile navigation free of duplicate popovers. -- [x] Preserve sidebar size, spacing, theme and selected state. +- [x] Place the PC sidebar popover outside the collapsed rail. +- [x] Keep the arrow aligned with the hovered icon. +- [x] Prevent business content from covering the popover. +- [x] Keep existing sidebar spacing, colors, icons and copy. +- [x] Preserve desktop-only popover behavior. final result: passed diff --git a/src/App.vue b/src/App.vue index 7aa78f2..b59722f 100644 --- a/src/App.vue +++ b/src/App.vue @@ -127,7 +127,13 @@ function createMenuIcon(icon: typeof FolderOpen, label: string, popoverEnabled: return h( NPopover, - { trigger: 'hover', placement: 'right' }, + { + trigger: 'hover', + placement: 'right', + to: 'body', + class: 'admin-nav-popover', + zIndex: 3000 + }, { trigger, default: () => label @@ -239,7 +245,14 @@ const menuOptions = computed(() => {