From 58a3c6eb9759469444f9fb8c7213f38140054029 Mon Sep 17 00:00:00 2001 From: kdletters Date: Thu, 11 Jun 2026 03:31:35 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=A7=E7=BB=AD=E6=94=B6=E5=8F=A3=E9=A6=96?= =?UTF-8?q?=E9=A1=B5=E5=88=86=E7=B1=BB=E5=BC=82=E6=AD=A5=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 扩展 PlatformAsyncStatePanel 接入首页分类分支的外层与筛选空态 合并桌面分类 section 并补充首页分类状态回归测试 修正 FlowShell 发现频道切换测试的 tab 语义断言 更新 PlatformUiKit 收口计划与共享决策记录 --- .hermes/shared-memory/decision-log.md | 1 + ...】PlatformUiKit弹窗组件收口计划-2026-06-08.md | 1 + ...gEntryFlowShell.agent.interaction.test.tsx | 6 +- .../RpgEntryHomeView.recharge.test.tsx | 49 ++- src/components/rpg-entry/RpgEntryHomeView.tsx | 376 ++++++++---------- 5 files changed, 210 insertions(+), 223 deletions(-) diff --git a/.hermes/shared-memory/decision-log.md b/.hermes/shared-memory/decision-log.md index 3d60a9f8..c4108086 100644 --- a/.hermes/shared-memory/decision-log.md +++ b/.hermes/shared-memory/decision-log.md @@ -57,6 +57,7 @@ - 2026-06-11 追加:暗色 / 像素 modal 的标准 footer 布局统一抽到 `src/components/common/PlatformDarkModalFooter.tsx`;该组件只负责 dark footer 的分隔线、padding 和常见动作区排布,不持有“取消 / 确认”业务语义。`NpcModals.tsx` 的交易 / 赠礼 / 招募 footer、`SelectionCustomizationModals.tsx` 的 `SelectionModal` footer、`RpgAdventurePanelOverlays.tsx` 的 goal panel footer,以及 `InventoryItemViews.tsx` 的详情 footer wrapper 已接入;sticky 工作台 footer、正文内单 CTA 收尾和 runtime HUD 工具条暂不并入这一抽象。 - 2026-06-11 追加:桌面首页里的轻量可点击扁平行开始统一收口到 `src/components/common/PlatformNavigableListItem.tsx`;目前已覆盖 `RpgEntryHomeView.tsx` 的搜索结果行、桌面“最近作品”、桌面“最近浏览”以及桌面“今日游戏”趋势行。组件只承接 `button + left content + right affordance` 结构、默认 `type="button"` 与 `leading / trailing` 插槽,暂不扩成覆盖教培 promo card、分类卡片、世界卡或 runtime 列表项的万能 row primitive。 - 2026-06-11 追加:`PlatformNavigableListItem` 继续扩展到 profile 设置行;`src/components/platform-entry/PlatformProfilePrimitives.tsx` 的 `ProfileSettingsRow` 已改成委托共享 `button + leading + trailing` 骨架,继续保留本地 `platform-profile-settings-row` class 承接分隔线、icon 胶囊和字号微调。后续 profile / 账户中心里的同类轻量导航行优先直接复用共享行骨架,不再回退成原生 ` + + + [ + 'platform-category-chip shrink-0 !min-h-[2.35rem] !rounded-none !border-0 !bg-transparent !px-0 !shadow-none hover:!bg-transparent', + active ? 'platform-category-chip--active' : null, + ] + .filter(Boolean) + .join(' ') + } + /> + + + + + 当前筛选下没有作品。} + > +
+ {activeCategoryEntries.map((entry) => ( + onOpenGalleryDetail(entry)} + /> + ))} +
+
+ + ) : null; + const renderDesktopCategorySection = (cardKeyPrefix: string) => { + const desktopCategoryPanelContent = activeCategoryGroup ? ( + <> +
+ + + [ + 'platform-category-chip shrink-0 !min-h-[2.35rem] !rounded-none !border-0 !bg-transparent !px-0 !shadow-none hover:!bg-transparent', + active ? 'platform-category-chip--active' : null, + ] + .filter(Boolean) + .join(' ') + } + /> + +
+ 当前筛选下没有作品。} + > +
+ {desktopCategoryGrid.map((entry) => ( + openRecommendGalleryDetail(entry)} + className="w-full min-w-0" + authorAvatarUrl={getPublicEntryAuthorAvatarUrl(entry)} + authorSummary={getPublicEntryAuthorSummary(entry)} + /> + ))} +
+
+ + ) : null; + + return ( +
+ + 正在读取作品分类...} + isEmpty={!activeCategoryGroup || activeCategoryRawCount === 0} + emptyState={暂时还没有可分类的作品。} + > + {desktopCategoryPanelContent} + +
+ ); + }; const desktopLibraryPreview = myEntries.slice(0, 2); const resolvedRecommendCoverUrls = useResolvedRecommendCoverImages( recommendedFeedEntries, @@ -3753,81 +3896,18 @@ export function RpgEntryHomeView({ mobileRankingPanel ) : discoverChannel === 'category' ? (
- {isLoadingPlatform ? ( - 正在读取公开作品... - ) : categoryGroups.length > 0 && activeCategoryGroup ? ( - <> -
- - - - [ - 'platform-category-chip shrink-0 !min-h-[2.35rem] !rounded-none !border-0 !bg-transparent !px-0 !shadow-none hover:!bg-transparent', - active ? 'platform-category-chip--active' : null, - ] - .filter(Boolean) - .join(' ') - } - /> -
- - - - {activeCategoryEntries.length > 0 ? ( -
- {activeCategoryEntries.map((entry) => ( - onOpenGalleryDetail(entry)} - /> - ))} -
- ) : ( - - 当前筛选下没有作品。 - - )} - - ) : ( - - 公开广场暂时还没有可分类的作品。 - - )} + 正在读取公开作品...} + isEmpty={!activeCategoryGroup || categoryGroups.length === 0} + emptyState={ + + 公开广场暂时还没有可分类的作品。 + + } + > + {mobileCategoryPanelContent} +
) : discoverChannel === 'edutainment' ? (
@@ -3983,77 +4063,7 @@ export function RpgEntryHomeView({ {discoverChannel === 'ranking' ? ( mobileRankingPanel ) : discoverChannel === 'category' ? ( -
- - {isLoadingPlatform ? ( - 正在读取作品分类... - ) : activeCategoryGroup && activeCategoryRawCount > 0 ? ( - <> -
- - - [ - 'platform-category-chip shrink-0 !min-h-[2.35rem] !rounded-none !border-0 !bg-transparent !px-0 !shadow-none hover:!bg-transparent', - active ? 'platform-category-chip--active' : null, - ] - .filter(Boolean) - .join(' ') - } - /> - -
- {desktopCategoryGrid.length > 0 ? ( -
- {desktopCategoryGrid.map((entry) => ( - openRecommendGalleryDetail(entry)} - className="w-full min-w-0" - authorAvatarUrl={getPublicEntryAuthorAvatarUrl(entry)} - authorSummary={getPublicEntryAuthorSummary(entry)} - /> - ))} -
- ) : ( - 当前筛选下没有作品。 - )} - - ) : ( - 暂时还没有可分类的作品。 - )} -
+ renderDesktopCategorySection('desktop-discover-category') ) : discoverChannel === 'edutainment' ? (
@@ -4816,79 +4826,7 @@ export function RpgEntryHomeView({ ) : null} -
- - {isLoadingPlatform ? ( - 正在读取作品分类... - ) : activeCategoryGroup && activeCategoryRawCount > 0 ? ( - <> -
- - - [ - 'platform-category-chip shrink-0 !min-h-[2.35rem] !rounded-none !border-0 !bg-transparent !px-0 !shadow-none hover:!bg-transparent', - active ? 'platform-category-chip--active' : null, - ] - .filter(Boolean) - .join(' ') - } - /> - -
- {desktopCategoryGrid.length > 0 ? ( -
- {desktopCategoryGrid.map((entry) => ( - openRecommendGalleryDetail(entry)} - className="w-full min-w-0" - authorAvatarUrl={getPublicEntryAuthorAvatarUrl(entry)} - authorSummary={getPublicEntryAuthorSummary(entry)} - /> - ))} -
- ) : ( - 当前筛选下没有作品。 - )} - - ) : ( - 暂时还没有可分类的作品。 - )} -
+ {renderDesktopCategorySection('desktop-category')} )}