-
Notifications
You must be signed in to change notification settings - Fork 1
framework v4へ対応 #75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
framework v4へ対応 #75
Conversation
There was a problem hiding this 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.
| 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 |
Copilot
AI
Feb 10, 2026
There was a problem hiding this comment.
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)に統一してください。
| "alias": { | ||
| "@": path.resolve(process.cwd(), "./src") | ||
| "@": path.resolve(__dirname, "src") | ||
| } |
Copilot
AI
Feb 10, 2026
There was a problem hiding this comment.
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 からディレクトリを解決する形に戻してください。
|
|
||
| ```json | ||
| { | ||
| "title": "Click Me." |
Copilot
AI
Feb 10, 2026
There was a problem hiding this comment.
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.json は word キーです。ドキュメントと実データ/コード(TopViewModel が .word を参照)を一致させるため、サンプル JSON を word に修正してください。
| "title": "Click Me." | |
| "word": "Click Me." |
| 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 |
Copilot
AI
Feb 10, 2026
There was a problem hiding this comment.
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 を再設定する必要があります。
No description provided.