Feat/optimize UI export for markus hub new - #302
Open
jsyqrt wants to merge 5 commits into
Open
Conversation
- hubRequest: __MARKUS_PREVIEW__ 模式下直连 HUB_URL 真实 hub API(/api/*), 绕开 /api/hub 后端代理(landing 静态页无此代理导致 404 空态) - ShowcaseProvider: 强制 html.dark,保证 demo 在宿主深色页面上统一深色主题 - index.ts: 导出 StoreDiscovery 供 landing 探索页复用真页面
Team.tsx handleInputChange 在 @mention 分支调用 loadEntityMentions,但该 函数从未定义(重构遗漏) → TS2304。把原 useEffect 内的实体加载逻辑抽成 可复用的 useCallback(带 loadedRef 防重复 fetch),useEffect 与输入处理 共用。tsc --noEmit -p packages/web-ui 验证通过。
Landing 的 Explore/Store demo 懒挂载(滚动到才渲染 StoreDiscovery), 挂载后才 fetch /items?limit=60&sort=popular——慢网络下用户划到时看到 骨架屏,容易误读为社区内容弱/加载慢。 1. hubRequest 在 __MARKUS_PREVIEW__ 模式下对 GET 成功响应缓存 10 分钟 (仅 landing 生效,桌面/web 客户端行为不变)。页面加载时预取一次, 之后任意时刻挂载 StoreDiscovery 都直接命中内存、立即渲染真实数据。 2. showcase/index.ts 导出 hubApi,landing 侧可统一从这里预取。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.