Skip to content

feat: docsのui/をBlocks / Examplesの2分類にし、作例を/ui/examples/へ統合する - #660

Merged
ddryo merged 1 commit into
devfrom
feat/ui-examples-merge
Oct 1, 2026
Merged

ddryo merged 1 commit into
devfrom
feat/ui-examples-merge

Conversation

@ddryo

@ddryo ddryo commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

概要

公式サイト(apps/site)のui/セクションを、3分類(Blocks / Block Examples / Components)から2分類(Blocks / Examples)へ変えます。作例ページのURLは/ui/examples/{slug}/(英語は/en/ui/examples/{slug}/)に揃えます。ページの中身は変えず、移動とリンク修正だけです。

変更内容

  • コンテンツの移動: content/{ja,en}/ui/components/*.mdx(9件)とblock-examples/*.mdx(4件)をexamples/へgit mv(draftも含む)。重複していたja/ui/components/_opt-in/_decorations.cssを削除し、Decorationsのimportをja/ui/_opt-in/へ向けた。
  • 本文リンク: BalloonBoxとchangelog(ja/en)のChatへのリンクを/ui/examples/chat/へ。
  • リダイレクト(redirects.ts):
    • 削除: /ui/examples/{banner,breadcrumb,card,dividerlabel,reel}/ → /ui/components/*(実ページのURLと衝突するため)
    • 追加: /ui/components/{同5件}/ → /ui/examples/{同名}/、/ui/block-examples/chat/ → /ui/examples/chat/
    • 付け替え: /ui/chat/ → /ui/examples/chat/
    • 維持: Steps・Timeline・FAQ・Heroの旧URL → patterns/
  • サイドバーと一覧ページ: uiSidebarと/ui/・/en/ui/の一覧を「Blocks」「Examples」の2セクションに。
  • .md・llms.txtの生成: buildUiIndexMdの見出しを## Blocks / ## Examplesに、classifyのOptional判定をui/examples/に。
  • MCP: getNextToolの判定をui/examples/に。docs-index.jsonのsourcePath 6件(Chat / Card / Banner / Breadcrumb / DividerLabel / Reel)とmeta.tsを更新。
  • 文書: docs/decisions.mdに決定を追記。documents/docs-md.md・.claude/commands/docs-update.md・LPテンプレのコメント内URLを追随。

確認したこと

  • nr test・nr lint: 通過。
  • nr build:siteの出力(ja/en両方):
    • 公開6ページのui/examples/{slug}/index.htmlは実ページで、ui/examples/{slug}.mdも生成されている。
    • ui/components/{banner,breadcrumb,card,dividerlabel,reel}/・ui/block-examples/chat/・ui/chat/は、同名の/ui/examples/*へのmeta refresh。
    • Steps・Timeline・FAQ・Heroの旧URLはpatterns/へのmeta refreshのまま。
    • ui.mdに## Blocksと## Examplesがあり、リンクは/ui/examples/*.md。llms.txtのOptionalに/en/ui/examples/*.mdがある。
    • 旧URL以外のHTMLに、ui/components/・ui/block-examples/へのリンクは残っていない。
  • リポジトリ内のui/components・ui/block-examples・Block Examplesは、redirects.tsのリダイレクト元、docs/decisions.md、apps/site/lastmod-map.jsonだけに残る。

既知の事項

  • nr typecheckはapps/site/src/lib/topShowcase.tsの型エラー2件(TS2339 / TS2559)で失敗する。dev(a1ea2a076)でも同じ2件が出ることを確認済みで、このPRの差分とは無関係。astro checkでも、エラーはこの2件だけ。
  • 旧.mdのURL(/ui/components/card.md等)とOG画像の旧URLは維持しない。
  • apps/site/lastmod-map.jsonは触っていない(公開手順のgenerate:lastmodで再生成される)。
  • 開発サーバーでは、draftのui/examples/Hero.mdxと/ui/examples/hero/のリダイレクトが同じURLになり、draftのHeroは開けないと読める(実機では未確認。本番ビルドではdraftが生成されないので衝突しない)。

確認してほしい点

  • /ui/一覧のExamples説明文(ja: 「Lism CSSで組み立てる、パッケージ外の部品・技法の実装例です。」)
  • docs/decisions.mdの新エントリの文面

Plan: .plan/plan-ui-examples-merge.md (PR 1/1)

🤖 Generated with Claude Code

https://claude.ai/code/session_01SdQQUP5KUna8zNFJ6cbPuD

Summary by CodeRabbit

  • 変更点
    • UIドキュメントを「Blocks」と「Examples」の2つに整理しました。作例は「Examples」セクションに掲載されます。
    • 作例ページのURLを /ui/examples/{slug}/ に統一しました。旧URLからは新しいURLへ転送されます。
    • サイドバーや関連リンクも新しい分類・URLに合わせて更新しました。

@coderabbitai

coderabbitai Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

🧰 Additional context used
📚 Code guidelines (1)
CLAUDE.md — auto-discovered

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 48f424a5-de5f-43ef-ae0d-ad56294940b9

📥 Commits

Reviewing files that changed from the base of the PR and between a1ea2a0 and 6b5d301.

📒 Files selected for processing (47)
  • .claude/commands/docs-update.md
  • apps/site/src/config/redirects.ts
  • apps/site/src/config/sidebar.ts
  • apps/site/src/content/en/changelog.mdx
  • apps/site/src/content/en/ui/examples/BalloonBox.mdx
  • apps/site/src/content/en/ui/examples/Banner.mdx
  • apps/site/src/content/en/ui/examples/Breadcrumb.mdx
  • apps/site/src/content/en/ui/examples/Card.mdx
  • apps/site/src/content/en/ui/examples/Chat.mdx
  • apps/site/src/content/en/ui/examples/Decorations.mdx
  • apps/site/src/content/en/ui/examples/DividerLabel.mdx
  • apps/site/src/content/en/ui/examples/Hero.mdx
  • apps/site/src/content/en/ui/examples/List.mdx
  • apps/site/src/content/en/ui/examples/Others.mdx
  • apps/site/src/content/en/ui/examples/Reel.mdx
  • apps/site/src/content/en/ui/examples/Table.mdx
  • apps/site/src/content/en/ui/examples/Timeline.mdx
  • apps/site/src/content/ja/changelog.mdx
  • apps/site/src/content/ja/ui/components/_opt-in/_decorations.css
  • apps/site/src/content/ja/ui/examples/BalloonBox.mdx
  • apps/site/src/content/ja/ui/examples/Banner.mdx
  • apps/site/src/content/ja/ui/examples/Breadcrumb.mdx
  • apps/site/src/content/ja/ui/examples/Card.mdx
  • apps/site/src/content/ja/ui/examples/Chat.mdx
  • apps/site/src/content/ja/ui/examples/Decorations.mdx
  • apps/site/src/content/ja/ui/examples/DividerLabel.mdx
  • apps/site/src/content/ja/ui/examples/Hero.mdx
  • apps/site/src/content/ja/ui/examples/List.mdx
  • apps/site/src/content/ja/ui/examples/Others.mdx
  • apps/site/src/content/ja/ui/examples/Reel.mdx
  • apps/site/src/content/ja/ui/examples/Table.mdx
  • apps/site/src/content/ja/ui/examples/Timeline.mdx
  • apps/site/src/integrations/docs-md/build-llms-txt.test.ts
  • apps/site/src/integrations/docs-md/build-llms-txt.ts
  • apps/site/src/integrations/docs-md/build-ui-index-md.test.ts
  • apps/site/src/integrations/docs-md/build-ui-index-md.ts
  • apps/site/src/lib/sidebarPosts.test.ts
  • apps/site/src/lib/sidebarPosts.ts
  • apps/site/src/pages/[lang]/ui/index.astro
  • apps/site/src/pages/ui/index.astro
  • docs/decisions.md
  • documents/docs-md.md
  • packages/mcp/src/data/docs-index.json
  • packages/mcp/src/data/meta.ts
  • packages/mcp/src/lib/search.ts
  • packages/mcp/src/tests/search.test.ts
  • templates/lp/astro/src/pages/interior/_style.css
💤 Files with no reviewable changes (1)
  • apps/site/src/content/ja/ui/components/_opt-in/_decorations.css

Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

UI作例の分類先を ui/examples/ に統一しました。サイトの一覧とサイドバー、ドキュメント生成、リダイレクト、MCP検索データを更新しました。

Changes

UI Examples分類とURL

Layer / File(s) Summary
分類ルールとドキュメント生成
docs/decisions.md, documents/docs-md.md, .claude/commands/docs-update.md, apps/site/src/integrations/docs-md/*
UIコンテンツをBlocksとExamplesの2区分に変更しました。ui/examples/をExamplesとして分類し、生成処理とテストを更新しました。
サイトのナビゲーションと一覧表示
apps/site/src/config/sidebar.ts, apps/site/src/lib/sidebarPosts*, apps/site/src/pages/*/ui/index.astro
サイドバーとUI一覧から「Block Examples」「Components」をなくし、「Examples」を表示するよう変更しました。分類・表示テストも更新しました。
URL、参照、検索データの更新
apps/site/src/config/redirects.ts, apps/site/src/content/*, packages/mcp/src/*, templates/lp/astro/src/pages/interior/_style.css
旧URLから新しいExamples URLへのリダイレクトを設定しました。コンテンツ内リンク、MCPの作例パスと検索判定、リールの参照先を更新しました。装飾用CSSファイルも削除しました。

Priority: ➖ Normal

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Other

Merge Risk: ⚪ Minimal · up to 6b5d3

The Blocks and Examples migration is consistent across the supplied evidence, with no actionable merge-blocking issue identified. Merge after normal checks.

Security Architecture Review

Security architecture risk: 🔵 Low · up to 6b5d3

The migration preserves production draft filtering and directs legacy links to the new example URLs. No security regression was established in the inspected paths, but deployment behavior and broader security coverage remain incomplete.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — The demonstrated exposure is public documentation discovery and navigation in both languages, plus MCP search destinations. The inspected category changes do not widen the underlying UI collection admitted by the public indexes.

Trust Boundaries and Controls

  • observed — MCP search queries affect filtering and scoring, while result destinations and recommendations come from documentation entries. Before and after migration, the moved example entries receive no next-tool recommendation; the changed predicate preserves their exclusion from package-component recommendations and does not execute a tool.
🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed タイトルは、UI分類をBlocks / Examplesの2分類へ変更し、作例を/ui/examples/へ統合するというプルリクエストの主要変更を明確に示しています。
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Commit to this branch
  • Create a new PR
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.

Warning

Some tools did not complete. Review the errors below.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint install timed out. The project may have too many dependencies for the sandbox.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

うさぎは新しい道を見つけたよ
Examplesの野原へぴょんと跳ぶ
古い道しるべは新しい先を指す
Blocksと例が並んで見える
月の下でリンクを確かめる
うさぎは満足して巣へ帰る

Comment @coderabbitai help to get the list of available commands.

@ddryo ddryo left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codex Review (by GPT-6)

Review baseline: 6b5d301

Summary

UIドキュメントをBlocks / Examplesの2分類に統合し、作例のURL・サイドバー・一覧Markdown・llms.txt・MCP検索をui/examples/へ揃える変更を確認しました。確認した差分と周辺コードにBlockingはありません(0件)。Examplesの説明文と意思決定の追記も、今回の分類方針と整合しています。

Validation

  • サイトのbuild-llms-txt.test.ts・build-ui-index-md.test.ts・sidebarPosts.test.tsを実行し、22件通過しました。
  • MCPのsearch.test.tsを実行し、25件通過しました。
  • 公開6作例の移行先と日英のリダイレクト定義、一覧の分類、MCPの検索URLとnextTool判定を確認しました。
  • 本レビューでは本番ビルド・型検査・ブラウザ確認は再実行していません。PR記載のdraft Heroと開発時リダイレクトの競合は実機未確認で、旧.md・OG画像URLの非維持は明示された対象外として扱いました。

Positives

実ページと競合する旧リダイレクトを取り除き、旧URLから新URLへの転送先を日英で揃えています。作例をget_componentへ誘導しない判定と、2分類の一覧・ナビゲーションの回帰テストも更新されています。

@ddryo
ddryo merged commit 235d927 into dev Oct 1, 2026
10 of 13 checks passed
@ddryo
ddryo deleted the feat/ui-examples-merge branch October 1, 2026 08:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant