From 58dcd73e1bec083fb9a306f4dcfbc7549252c293 Mon Sep 17 00:00:00 2001 From: huyan Date: Fri, 4 Sep 2026 00:00:59 +0800 Subject: [PATCH] feat(quick-start): simplify history navigation The persistent history rail competed with the Quick Start canvas and added unnecessary visual weight. Replace it with a token-based left trigger and contextual floating panel with outside-click and Escape dismissal. Keep the canvas full-width and limit the change to Quick Start history presentation. --- .../src/pages/quick-start/history-sidebar.tsx | 42 +++++++++---------- frontend/src/pages/quick-start/index.tsx | 5 +-- 2 files changed, 21 insertions(+), 26 deletions(-) diff --git a/frontend/src/pages/quick-start/history-sidebar.tsx b/frontend/src/pages/quick-start/history-sidebar.tsx index c717942c..02c02240 100644 --- a/frontend/src/pages/quick-start/history-sidebar.tsx +++ b/frontend/src/pages/quick-start/history-sidebar.tsx @@ -1,5 +1,5 @@ import { useEffect, useState } from 'react' -import { ClockCounterClockwise, Note, NotePencil, SidebarSimple, X } from '@phosphor-icons/react' +import { ListDashes, Note, NotePencil, X } from '@phosphor-icons/react' import { Link } from 'react-router' import type { QuickStartEntryService, QuickStartHistoryItem } from './service' @@ -40,6 +40,15 @@ export function QuickStartHistorySidebar({ const closeMobile = () => setMobileOpen(false) + useEffect(() => { + if (!mobileOpen) return + const onKeyDown = (event: KeyboardEvent) => { + if (event.key === 'Escape') closeMobile() + } + window.addEventListener('keydown', onKeyDown) + return () => window.removeEventListener('keydown', onKeyDown) + }, [mobileOpen]) + return ( <> {mobileOpen ? ( @@ -57,31 +66,23 @@ export function QuickStartHistorySidebar({ type="button" aria-label="关闭创作历史" onClick={closeMobile} - className="fixed inset-0 z-40 bg-app-ink/20 backdrop-blur-[2px] lg:hidden" + className="fixed inset-0 z-40 bg-transparent" /> ) : null}