继续收口平台分段与泥点确认

新增泥点确认状态机共享 hook 并接入拼图与抓大鹅工作台

将首页发现页与个人中心剩余切换条收口到 PlatformSegmentedTabs

统一平台弹窗 header 关闭入口并补齐相关测试

更新前端组件收口文档与团队决策记录
This commit is contained in:
2026-06-11 01:30:13 +08:00
parent 94122583ac
commit 0a4ccdf45c
19 changed files with 511 additions and 242 deletions

View File

@@ -594,7 +594,7 @@ describe('PuzzleResultView', () => {
expect(
within(dialog).queryByRole('button', { name: /关卡测试/u }),
).toBeNull();
fireEvent.click(screen.getByLabelText('关闭'));
fireEvent.click(screen.getByLabelText('关闭关卡详情'));
expect(screen.getAllByText('第2关').length).toBeGreaterThan(0);
await act(async () => {
@@ -741,7 +741,7 @@ describe('PuzzleResultView', () => {
{ name: '确定' },
),
);
fireEvent.click(screen.getByLabelText('关闭'));
fireEvent.click(screen.getByLabelText('关闭关卡详情'));
expect(
within(screen.getByLabelText('拼图关卡列表')).getAllByText('生成中')
@@ -790,11 +790,11 @@ describe('PuzzleResultView', () => {
{ levelId: 'puzzle-level-1' },
);
fireEvent.click(screen.getByLabelText('关闭'));
fireEvent.click(screen.getByLabelText('关闭关卡详情'));
openPuzzleLevelsTab();
fireEvent.click(screen.getByRole('button', { name: /新增关卡/u }));
expect(screen.getByRole('dialog', { name: '关卡详情' })).toBeTruthy();
fireEvent.click(screen.getByLabelText('关闭'));
fireEvent.click(screen.getByLabelText('关闭关卡详情'));
fireEvent.click(screen.getByRole('button', { name: /发布/u }));
const publishDialog = screen.getByRole('dialog', { name: '发布拼图作品' });

View File

@@ -6,7 +6,6 @@ import {
Play,
Plus,
Trash2,
X,
} from 'lucide-react';
import { useEffect, useMemo, useRef, useState } from 'react';
import { createPortal } from 'react-dom';
@@ -28,6 +27,7 @@ import { PlatformFieldLabel } from '../common/PlatformFieldLabel';
import { PlatformIconBadge } from '../common/PlatformIconBadge';
import { PlatformIconButton } from '../common/PlatformIconButton';
import { PlatformMediaFrame } from '../common/PlatformMediaFrame';
import { PlatformModalCloseButton } from '../common/PlatformModalCloseButton';
import { PlatformMudPointConfirmDialog } from '../common/PlatformMudPointConfirmDialog';
import { PlatformPillBadge } from '../common/PlatformPillBadge';
import { PlatformProgressBar } from '../common/PlatformProgressBar';
@@ -652,10 +652,10 @@ function PuzzleLevelDetailDialog({
<div className="min-w-0 truncate text-base font-semibold text-[var(--platform-text-strong)]">
{level.levelName || '关卡详情'}
</div>
<PlatformIconButton
<PlatformModalCloseButton
variant="platformIcon"
label="关闭关卡详情"
onClick={onClose}
label="关闭"
icon={<X className="h-4 w-4" />}
/>
</div>
@@ -896,10 +896,10 @@ function PuzzlePublishDialog({
<div className="text-base font-semibold text-[var(--platform-text-strong)]">
</div>
<PlatformIconButton
<PlatformModalCloseButton
variant="platformIcon"
label="关闭发布拼图作品"
onClick={onClose}
label="关闭"
icon={<X className="h-4 w-4" />}
/>
</div>