fix: 测试用例提Bug按钮 + 全局侧边栏阴影统一
1. 测试用例"提 BUG"按钮接入工作台: - TestCaseDetailDrawer 传入 onCreateBug callback - 点击"提 BUG"关闭测试详情,弹出 BugCreateModal - 创建后 Bug 自动关联该测试用例 2. 全局侧边弹窗阴影统一为 shadow-2xl: - PlanDetailDrawer: shadow-2xl ✓ - DevTaskDetailDrawer: shadow-[var(--shadow-lg)] → shadow-2xl - TestCaseDetailDrawer: shadow-[var(--shadow-lg)] → shadow-2xl - BugDetailDrawer: shadow-[var(--shadow-lg)] → shadow-2xl - 所有 Drawer 样式一致,阴影明显 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -17,6 +17,7 @@ import { PlanDetailDrawer } from '@/components/version/PlanDetailDrawer';
|
||||
import { DevTaskDetailDrawer } from '@/components/dev-task/DevTaskDetailDrawer';
|
||||
import { TestCaseDetailDrawer } from '@/components/test-case/TestCaseDetailDrawer';
|
||||
import { BugDetailDrawer } from '@/components/bug/BugDetailDrawer';
|
||||
import { BugCreateModal } from '@/components/bug/BugCreateModal';
|
||||
import { DEV_TASK_STATUS_LABEL, DEV_TASK_STATUS_COLOR } from '@/lib/dev-task';
|
||||
import { TEST_CASE_STATUS_LABEL, TEST_CASE_STATUS_COLOR } from '@/lib/test-case';
|
||||
import { BUG_STATUS_LABEL, BUG_STATUS_COLOR, BUG_SEVERITY_LABEL, BUG_SEVERITY_COLOR } from '@/lib/bug';
|
||||
@@ -53,6 +54,7 @@ export default function WorkspacePage() {
|
||||
const [showCompleted, setShowCompleted] = useState(true);
|
||||
const [selectedVersionId, setSelectedVersionId] = useState<string | null>(null);
|
||||
const [drawerItem, setDrawerItem] = useState<WorkItem | null>(null);
|
||||
const [bugFromTestCaseId, setBugFromTestCaseId] = useState<string | null>(null);
|
||||
|
||||
useEffect(() => { fetchOverview(); }, [fetchOverview]);
|
||||
useEffect(() => { fetchPlans(); }, [fetchPlans]);
|
||||
@@ -226,11 +228,14 @@ export default function WorkspacePage() {
|
||||
<DevTaskDetailDrawer taskId={drawerItem.id} allTaskIds={devTasks.map((t) => t.id)} onClose={() => setDrawerItem(null)} />
|
||||
)}
|
||||
{drawerItem && drawerItem.type === 'testCase' && (
|
||||
<TestCaseDetailDrawer testCaseId={drawerItem.id} onClose={() => setDrawerItem(null)} />
|
||||
<TestCaseDetailDrawer testCaseId={drawerItem.id} onClose={() => setDrawerItem(null)} onCreateBug={(tcId) => { setDrawerItem(null); setBugFromTestCaseId(tcId); }} />
|
||||
)}
|
||||
{drawerItem && drawerItem.type === 'bug' && (
|
||||
<BugDetailDrawer bugId={drawerItem.id} onClose={() => setDrawerItem(null)} />
|
||||
)}
|
||||
{bugFromTestCaseId && (
|
||||
<BugCreateModal testCaseId={bugFromTestCaseId} onClose={() => setBugFromTestCaseId(null)} />
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -65,7 +65,7 @@ export function BugDetailDrawer({ bugId, onClose }: Props) {
|
||||
|
||||
return (
|
||||
<div className="fixed inset-0 z-50 flex justify-end" onClick={onClose}>
|
||||
<div className="w-full max-w-md h-full bg-[var(--bg)] border-l border-[var(--line)] shadow-[var(--shadow-lg)] flex flex-col" onClick={(e) => e.stopPropagation()}>
|
||||
<div className="w-full max-w-md h-full bg-[var(--bg)] border-l border-[var(--line)] shadow-2xl flex flex-col" onClick={(e) => e.stopPropagation()}>
|
||||
<div className="flex items-center justify-between h-14 px-5 border-b border-[var(--line)] bg-[var(--bg-card)] shrink-0">
|
||||
<div className="flex items-center gap-2">
|
||||
<span className="text-[12px] font-mono text-[var(--ink-muted)]">{bug.bugNo}</span>
|
||||
|
||||
@@ -55,7 +55,7 @@ export function DevTaskDetailDrawer({ taskId, allTaskIds, onClose }: Props) {
|
||||
|
||||
return (
|
||||
<div className="fixed inset-0 z-50 flex justify-end" onClick={onClose}>
|
||||
<div className="w-full max-w-md h-full bg-[var(--bg)] border-l border-[var(--line)] shadow-[var(--shadow-lg)] flex flex-col" onClick={(e) => e.stopPropagation()}>
|
||||
<div className="w-full max-w-md h-full bg-[var(--bg)] border-l border-[var(--line)] shadow-2xl flex flex-col" onClick={(e) => e.stopPropagation()}>
|
||||
{/* 顶栏 */}
|
||||
<div className="flex items-center justify-between h-14 px-5 border-b border-[var(--line)] bg-[var(--bg-card)] shrink-0">
|
||||
<div className="flex items-center gap-2">
|
||||
|
||||
@@ -59,7 +59,7 @@ export function TestCaseDetailDrawer({ testCaseId, onClose, onCreateBug }: Props
|
||||
|
||||
return (
|
||||
<div className="fixed inset-0 z-50 flex justify-end" onClick={onClose}>
|
||||
<div className="w-full max-w-md h-full bg-[var(--bg)] border-l border-[var(--line)] shadow-[var(--shadow-lg)] flex flex-col" onClick={(e) => e.stopPropagation()}>
|
||||
<div className="w-full max-w-md h-full bg-[var(--bg)] border-l border-[var(--line)] shadow-2xl flex flex-col" onClick={(e) => e.stopPropagation()}>
|
||||
<div className="flex items-center justify-between h-14 px-5 border-b border-[var(--line)] bg-[var(--bg-card)] shrink-0">
|
||||
<div className="flex items-center gap-2">
|
||||
<span className="text-[12px] font-mono text-[var(--ink-muted)]">{tc.caseNo}</span>
|
||||
|
||||
@@ -76,7 +76,7 @@ export function PlanDetailDrawer({ planId, onClose }: Props) {
|
||||
|
||||
return (
|
||||
<div className="fixed inset-0 z-50 flex justify-end" onClick={onClose}>
|
||||
<div className="w-full max-w-md bg-[var(--bg-card)] border-l border-[var(--line)] shadow-2xl h-full flex flex-col overflow-hidden" onClick={(e) => e.stopPropagation()}>
|
||||
<div className="w-full max-w-md h-full bg-[var(--bg)] border-l border-[var(--line)] shadow-2xl flex flex-col overflow-hidden" onClick={(e) => e.stopPropagation()}>
|
||||
{/* Header */}
|
||||
<div className="flex items-center justify-between px-5 py-4 border-b border-[var(--line)] shrink-0">
|
||||
<div className="flex items-center gap-2">
|
||||
|
||||
Reference in New Issue
Block a user