perf(syntax-lookup): optimize catalog search and detail routes
维护者通常 2 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 30/100
- Issue 类型
- 重构
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- cypress, react
调研方向
Start with the /syntax-lookup and representative detail routes, using the production-artifact baseline from #1371 after the homepage stack lands on master. Profile catalog and detail assets, loader data, DOM/media counts, and query costs separately, then run the named ReScript compilation, production build, focused Vitest/Cypress coverage, and #1371 route report. Done means the listed navigation, highlighting, media, payload, and console-error acceptance criteria pass without visual snapshot updates.
由索引模型根据 Issue 内容生成。
描述
Context
The syntax lookup is both a large catalog search surface and a collection of MDX detail pages under the docs layout. Its catalog loader serializes the complete item set, builds a local Fuse index, and can render many tags; detail routes instead render compiled MDX. Optimize these two shapes together only where they share real behavior, while keeping their individual profiles visible.
The homepage work already moved syntax grammar registration to the content boundary (#1365). Retain that boundary; this ticket concerns catalog data, interactive rendering, and detail-page payloads.
Representative profiles
/syntax-lookup- A typical detail route such as
/syntax-lookup/decorator_as - A detail route reached after a catalog query
Use the production-artifact baseline from #1371 after the homepage stack lands on master.
Suggested PR stack
- Add catalog and detail profiles plus browser coverage for direct loads, query changes, category filtering, result-to-detail navigation, back/forward behavior, code-copy/highlighting, and docs sidebar/TOC navigation.
- Measure catalog loader serialization, local index construction, unfiltered DOM size, and query-response work independently. Make index creation and filtering stable across renders, and defer or partition expensive client work only if the initial catalog remains useful and accessible.
- Profile the detail loader/MDX payload and prerender static code presentation where it removes client work without compromising anchors, code tabs, copy controls, or content-boundary highlighting.
- Audit catalog/detail media for intrinsic dimensions and priority; use responsive sources only for actual large raster placements.
- Split optional syntax-lookup interaction code at activation boundaries and apply existing React Compiler annotations only to stable leaf components with artifact and browser coverage.
Acceptance criteria
- Catalog and detail pages report separate, reproducible initial assets, loader-data sizes, DOM/media counts, and post-query costs; every stack layer records its delta against the immediate target.
- Querying, category filters, result ordering, direct detail URLs, client navigation, back/forward, docs navigation, syntax highlighting, and code interaction work without hydration or console errors.
- Initial routes do not regain homepage, playground/compiler, or eager DocSearch implementation payloads; DocSearch remains activation-loaded.
- Every rendered image/video has numeric intrinsic dimensions and below-fold media is not needlessly preloaded.
- ReScript compilation, production build, focused Vitest/Cypress coverage, and the #1371 route report pass. Do not update visual snapshots without approval.
Relates to #1354 and depends on #1371 for the common measurement contract.
- 主要语言
- MDX
- 星标
- 1.9k
- 派生
- 261
- 平均合并
- 3 天 13 小时
- 30 天内合并 PR
- 37
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
rescript-lang/rescript-lang.org 的其他 Issue
-
Semantic drift analysis: results可能已有人在做 @fhammerschmidt 于 14 天前认领。 未关闭
rescript-lang/rescript-lang.org#1421 · 1 条评论 · 已指派 1 人 ·
维护者通常 2 天内回复
-
Duplicated playground logic between guide and playground, two copies diverged可能已有人在做 @fhammerschmidt 于 14 天前认领。 未关闭
难度 4/5 3-5 天 新手友好度 20/100
rescript-lang/rescript-lang.org#1407 ·
维护者通常 2 天内回复
-
Guide compiler is unpinned and lessons are never validated可能已有人在做 @fhammerschmidt 于 14 天前认领。 未关闭
难度 4/5 3-5 天 新手友好度 35/100
rescript-lang/rescript-lang.org#1405 ·
维护者通常 2 天内回复
-
enhancement playground react
难度 5/5 一周以上 新手友好度 35/100
rescript-lang/rescript-lang.org#1377 ·
维护者通常 2 天内回复
-
enhancement react
难度 5/5 一周以上 新手友好度 35/100
rescript-lang/rescript-lang.org#1375 ·
维护者通常 2 天内回复
查看 rescript-lang/rescript-lang.org 的全部 Issue
相似的 Issue
-
P4: low
难度 1/5 1 小时以内 新手友好度 85/100
jeffknupp/association#537 ·
-
content good first issue
难度 2/5 1-3 小时 新手友好度 78/100
-
难度 1/5 1 小时以内 新手友好度 85/100
godotengine/godot-docs#12467 ·
维护者通常 2 天内回复
-
docs priority:P3 size:XS
难度 1/5 1 小时以内 新手友好度 88/100
维护者通常 1 天内回复
-
enhancement
难度 2/5 1-3 小时 新手友好度 83/100
维护者通常 1 天内回复