收口作品详情底部动作

将作品详情改造编辑和启动按钮迁移到 PlatformActionButton

保留详情页底部局部样式类控制 sticky 动作栏

补充底部动作公共按钮断言

更新 PlatformUiKit 文档和 Hermes 决策记录
This commit is contained in:
2026-06-10 13:44:25 +08:00
parent 0db4f5a6df
commit 11193112b6
4 changed files with 24 additions and 10 deletions

View File

@@ -147,8 +147,12 @@ test('PlatformWorkDetailView renders compact stats and date time', () => {
'platform-icon-button',
);
expect(screen.getByRole('button', { name: '点赞 4赞' })).toBeTruthy();
expect(screen.getByRole('button', { name: '作品改造' })).toBeTruthy();
expect(screen.getByRole('button', { name: '启动' })).toBeTruthy();
const remixAction = screen.getByRole('button', { name: '作品改造' });
const startAction = screen.getByRole('button', { name: '启动' });
expect(remixAction.className).toContain('platform-button');
expect(remixAction.className).toContain('platform-work-detail__remix');
expect(startAction.className).toContain('platform-button');
expect(startAction.className).toContain('platform-work-detail__start');
});
test('PlatformWorkDetailView prefers resolved public user display name', () => {

View File

@@ -18,6 +18,7 @@ import type { PublicUserSummary } from '../../../packages/shared/src/contracts/a
import { buildPublicWorkDetailUrl } from '../../routing/appPageRoutes';
import { CopyCodeButton } from '../common/CopyCodeButton';
import { CopyFeedbackMessage } from '../common/CopyFeedbackMessage';
import { PlatformActionButton } from '../common/PlatformActionButton';
import { PlatformIconButton } from '../common/PlatformIconButton';
import { useCopyFeedback } from '../common/useCopyFeedback';
import { ResolvedAssetImage } from '../ResolvedAssetImage';
@@ -454,24 +455,29 @@ export function PlatformWorkDetailView({
</div>
<div className="platform-work-detail__bottom">
<button
type="button"
<PlatformActionButton
tone="secondary"
shape="pill"
size="lg"
fullWidth
className="platform-work-detail__remix"
onClick={onRemix}
disabled={isBusy}
>
<WorkActionIcon className="h-5 w-5" />
{workActionLabel}
</button>
<button
type="button"
</PlatformActionButton>
<PlatformActionButton
shape="pill"
size="lg"
fullWidth
className="platform-work-detail__start"
onClick={onStart}
disabled={isBusy}
>
<Play className="h-5 w-5 fill-current" />
</button>
</PlatformActionButton>
</div>
</div>
);