Skip to content

Conversation

@ienaga
Copy link
Member

@ienaga ienaga commented Feb 10, 2026

No description provided.

Copilot AI review requested due to automatic review settings February 10, 2026 06:27
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Next2D Framework テンプレートを framework v4 系の設計(MVVM + Clean Architecture + Atomic Design)に合わせ、従来の bind/unbind ベース実装からライフサイクル中心(View/ViewModel initialize/onEnter/onExit)へ移行しつつ、UseCase/Repository 分割とドキュメント・テスト整備を行うPRです。

Changes:

  • View/ViewModel を Page コンポーネント + UseCase 呼び出し中心の構造へ刷新(旧 template/event/template/atom 系の実装を削除)
  • UI コンポーネント(atom/molecule/page)、アニメーション定義、Content ラッパーを追加し、ユニットテストを拡充
  • 仕様書/README 群と CI ワークフロー、依存関係を更新(テンプレートバージョン 5.0.0)

Reviewed changes

Copilot reviewed 72 out of 73 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
template/vite.config.js Vitest 設定・alias・テスト対象拡張子を更新
template/src/view/top/TopViewModel.js Top 画面 ViewModel を UseCase/initialize ベースへ変更
template/src/view/top/TopView.js Top View を Page 委譲・ライフサイクル実装へ変更
template/src/view/home/HomeViewModel.js Home 画面 ViewModel を UseCase/initialize ベースへ変更
template/src/view/home/HomeView.js Home View を Page 委譲・ライフサイクル実装へ変更
template/src/view/README.md View/ViewModel の設計・責務・ライフサイクル説明を大幅拡充
template/src/ui/content/TopContent.js Content クラスの体裁調整
template/src/ui/content/TopContent.test.js TopContent のユニットテスト追加
template/src/ui/content/HomeContent.js Content クラスの体裁調整
template/src/ui/content/HomeContent.test.js HomeContent のユニットテスト追加
template/src/ui/content/README.md Content 層の使い方ドキュメント追加
template/src/ui/component/page/top/TopPage.js Top 画面 UI 構築を Page 化
template/src/ui/component/page/home/HomePage.js Home 画面 UI 構築を Page 化
template/src/ui/component/molecule/TopBtnMolecule.js Top ボタン Molecule 追加
template/src/ui/component/molecule/HomeBtnMolecule.js Home ボタン Molecule 追加
template/src/ui/component/atom/TextAtom.js TextField ラッパー Atom 追加
template/src/ui/component/atom/ButtonAtom.js ボタン基本 Atom 追加
template/src/ui/component/README.md UI component 構造/ガイド追加
template/src/ui/animation/top/TopBtnShowAnimation.js Top ボタン表示アニメーション追加
template/src/ui/animation/README.md アニメーション定義ガイド追加
template/src/ui/README.md UI 層全体の構成ドキュメント追加
template/src/model/application/top/usecase/NavigateToViewUseCase.js 画面遷移 UseCase 追加
template/src/model/application/top/usecase/NavigateToViewUseCase.test.js NavigateToViewUseCase のテスト追加
template/src/model/application/home/usecase/StartDragUseCase.js ドラッグ開始 UseCase 追加
template/src/model/application/home/usecase/StartDragUseCase.test.js StartDragUseCase のテスト追加
template/src/model/application/home/usecase/StopDragUseCase.js ドラッグ停止 UseCase 追加
template/src/model/application/home/usecase/StopDragUseCase.test.js StopDragUseCase のテスト追加
template/src/model/application/home/usecase/CenterTextFieldUseCase.js テキスト中央寄せ UseCase 追加
template/src/model/application/home/usecase/CenterTextFieldUseCase.test.js CenterTextFieldUseCase のテスト追加
template/src/model/application/README.md Application 層ドキュメント追加
template/src/model/infrastructure/repository/HomeTextRepository.js Repository にエラーハンドリング追加
template/src/model/infrastructure/repository/HomeTextRepository.test.js HomeTextRepository のテスト追加
template/src/model/infrastructure/README.md Infrastructure 層ドキュメント追加
template/src/model/domain/callback/Background.js Background callback の体裁/型情報追加
template/src/model/domain/callback/Background.test.js Background のテスト追加
template/src/model/domain/callback/Background/service/BackgroundDrawService.js Background 描画 service の更新
template/src/model/domain/callback/Background/service/BackgroundDrawService.test.js BackgroundDrawService のテスト追加
template/src/model/domain/callback/Background/service/BackgroundChangeScaleService.js Background スケール調整 service の更新
template/src/model/domain/callback/Background/service/BackgroundChangeScaleService.test.js BackgroundChangeScaleService のテスト追加
template/src/model/domain/README.md Domain 層ドキュメント追加
template/src/model/README.md Model 層を 3 層構造として再整理し説明を拡充
template/src/model/ui/component/template/top/TopContentTemplate.js 旧 UI template を削除
template/src/model/ui/component/template/top/TopButtonTemplate.js 旧 UI template を削除
template/src/model/ui/component/template/home/HomeTextTemplate.js 旧 UI template を削除
template/src/model/ui/component/template/home/HomeButtonTemplate.js 旧 UI template を削除
template/src/model/ui/component/atom/TextComponent.js 旧 atom component を削除
template/src/model/ui/component/atom/ButtonComponent.js 旧 atom component を削除
template/src/model/domain/event/top/TopButtonPointerUpEvent.js 旧ドメインイベント削除(UseCase/VM へ移行)
template/src/model/domain/event/home/HomeButtonPointerDownEvent.js 旧ドメインイベント削除(UseCase/VM へ移行)
template/src/model/domain/event/home/HomeButtonPointerUpEvent.js 旧ドメインイベント削除(UseCase/VM へ移行)
template/src/config/README.md 設定 README の体裁・改行整理
template/src/assets/README.md assets ガイドを拡充
template/specs/00-index.md 仕様書インデックス追加
template/specs/01-architecture.md アーキテクチャ仕様追加
template/specs/02-view-viewmodel.md View/ViewModel 仕様追加
template/specs/03-application.md Application(UseCase) 仕様追加
template/specs/04-domain.md Domain 仕様追加
template/specs/05-infrastructure.md Infrastructure(Repository) 仕様追加
template/specs/06-ui.md UI(Content/Animation含む) 仕様追加
template/specs/07-config.md Config/routing 仕様追加
template/specs/08-project.md コマンド・Packages 登録等の仕様追加
template/specs/09-framework-api.md Framework API リファレンス追加
template/package.json テンプレート依存関係/スクリプト更新
template/mock/api/README.md mock API の説明追加
template/mock/content/README.md mock content の説明追加
template/mock/img/README.md mock images の説明追加
template/electron/README.md Electron ディレクトリ説明追加
template/README.md テンプレート README を大幅拡充
template/ARCHITECTURE.md アーキテクチャ概要ドキュメント追加
template/.gitignore Electron 関連 ignore 追加
.github/workflows/publish.yml publish ワークフロー更新
.github/workflows/lint.yml lint ワークフロー更新
package.json ルートパッケージ version を 5.0.0 へ更新

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 22 to 28
with:
node-version: 24
registry-url: "https://registry.npmjs.org"
- run: npm install -D eslint-plugin-unused-imports
working-directory: ./template
- run: npx eslint ./src/**/*.js
working-directory: ./template
Copy link

Copilot AI Feb 10, 2026

Choose a reason for hiding this comment

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

CI 内で npm install -D eslint-plugin-unused-imports を実行すると、package.json/lockfile を暗黙に更新しうる上に、依存解決が毎回変わって再現性が落ちます。必要なら template/package.json の devDependencies に追加して npm ci で固定し、eslint 実行前は npm ci(または少なくとも npm install)に統一してください。

Copilot uses AI. Check for mistakes.
Comment on lines 39 to 41
"alias": {
"@": path.resolve(process.cwd(), "./src")
"@": path.resolve(__dirname, "src")
}
Copy link

Copilot AI Feb 10, 2026

Choose a reason for hiding this comment

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

package.json"type": "module" のため、この Vite 設定ファイルは ESM として実行され、Node.js では __dirname が未定義になります(実行時に ReferenceError)。エイリアス解決は process.cwd() を使うか、import.meta.url からディレクトリを解決する形に戻してください。

Copilot uses AI. Check for mistakes.

```json
{
"title": "Click Me."
Copy link

Copilot AI Feb 10, 2026

Choose a reason for hiding this comment

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

この README の top.json サンプルが title キーになっていますが、実際のモック template/mock/api/top.jsonword キーです。ドキュメントと実データ/コード(TopViewModel.word を参照)を一致させるため、サンプル JSON を word に修正してください。

Suggested change
"title": "Click Me."
"word": "Click Me."

Copilot uses AI. Check for mistakes.
Comment on lines 19 to 22
node-version: 24
registry-url: "https://registry.npmjs.org"
- run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }} No newline at end of file
- run: npm install -g npm@latest
- run: npm publish No newline at end of file
Copy link

Copilot AI Feb 10, 2026

Choose a reason for hiding this comment

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

npm publish に認証情報が渡っておらず(従来の NODE_AUTH_TOKEN も削除されています)、このままだと publish が失敗する可能性が高いです。OIDC を使う意図なら npm publish --provenance 等の設定を追加し、スコープ付きパッケージの場合は --access public も明示してください。トークン運用に戻すなら NODE_AUTH_TOKEN を再設定する必要があります。

Copilot uses AI. Check for mistakes.
@ienaga ienaga merged commit dd25c96 into main Feb 11, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant