Skip to content

[Improve]: packages/samples 配下のアーキテクチャ検討#595

Merged
blendthink merged 13 commits into
mainfrom
improve/GH-472/samples-architecture-refactor
Sep 10, 2025
Merged

[Improve]: packages/samples 配下のアーキテクチャ検討#595
blendthink merged 13 commits into
mainfrom
improve/GH-472/samples-architecture-refactor

Conversation

@blendthink
Copy link
Copy Markdown
Contributor

@blendthink blendthink commented Sep 9, 2025

概要

Issue 472「packages/samples 配下のアーキテクチャ検討」に対応し、packages/samples/github_repositoryの機能をsamples/github_appに統合しました。

学習用サンプルアプリとして、Dioの使い方とページング処理の実装方法を一つのアプリ内で確認できるようにシンプル化しました。

レビュー観点

  • packages/samples/github_repositoryの削除が適切か
  • samples/github_appへの機能統合が適切か
  • ナビゲーション機能の簡素化が学習目的に適しているか
  • 依存関係の整理が適切か

レビューレベル

  • Lv1: ぱっとみて違和感がないかチェックして Approve する

レビュー優先度

  • 数日以内で見てもらいたい 🐢

画像 / 動画

2025-09-09.11.04.06.mov

確認したこと

  • samples/github_appが正常にビルドできること
  • コード生成が正常に実行されること
  • 静的解析でエラーがないこと
  • melos bootstrapが正常に実行されること
  • 不要なファイルが適切に削除されていること

動作確認手順

  1. cd samples/github_app
  2. flutter pub get を実行
  3. dart run build_runner build を実行
  4. flutter analyze で静的解析を実行
  5. アプリが正常にビルドできることを確認

備考

  • packages/samples/github_repositoryを完全に削除し、機能をsamples/github_appに統合
  • ナビゲーション機能をプロバイダーパターンから直接実装に変更し、学習しやすくした
  • 新アーキテクチャに無理に従わず、サンプルアプリとしての目的に適した構造にした

- Add data layer with Dio configuration and repository providers
- Add domain layer with GitHub repository models and exceptions
- Add UI layer with list and detail pages
- Add pagination support using utils_pagination
- Update pubspec.yaml with required dependencies
- Add build.yaml for code generation
- Remove dependency on packages/samples/github_repository

This consolidates the GitHub repository sample functionality into a single
self-contained sample app for better learning experience.
- Remove packages/samples/github_repository directory
- Update pubspec.yaml to remove reference to deleted package
- Update melos configuration to reflect package removal
- All functionality has been integrated into samples/github_app

This completes the consolidation of GitHub repository sample functionality
into a single self-contained sample app.
- Remove route.dart file and move navigation logic directly into UI pages
- Remove unnecessary provider for navigation
- Simplify main.dart by removing complex provider setup
- Move navigation method directly into GitHubRepositoryListPage
- Remove generated files that are no longer needed

This makes the sample app more straightforward and easier to understand
for learning purposes.
@yumemi-team-review-requester yumemi-team-review-requester Bot requested review from a team, BlueEventHorizon and morikann and removed request for a team September 9, 2025 02:05
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Sep 9, 2025

Ready for review 🚀

@blendthink blendthink requested review from trm11tkr and removed request for BlueEventHorizon September 9, 2025 02:05
Copy link
Copy Markdown
Contributor

@trm11tkr trm11tkr left a comment

Choose a reason for hiding this comment

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

一点質問させていただきましたのでご確認お願いします!🙏

Comment thread samples/github_app/build.yaml
Comment thread samples/github_app/lib/domain/providers/scroll_notifier.dart Outdated
Comment thread samples/github_app/pubspec.yaml
Base automatically changed from improve/GH-542/modeling-md-implementation to main September 9, 2025 08:07
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Sep 9, 2025

⚠️ Rebase or force-push detected in this push
以下のコミットが非線形な履歴となっており、rebase または強制 push の可能性があります:

  • 76c5349 (fix: 変数名をforceUpdatePolicyに変更)
  • 84b9517 (fix: run format)
  • 7f0f1f3 (fix: デザインレイヤーについて追記)
  • 8e3d168 (fix: themeSettingRepository.saveThemeSetting に修正)
  • 9ded71e (docs: エラーハンドリングの方針をアーキテクチャ全体の方針として追加)
  • 957bcc1 (fix: 階層を修正)
  • 8522162 (docs: presentation layer に実装時の注意点を追加)
  • a75e894 (docs: presentation layer に ThemeSettingNotifier の実装例を追加)
  • 2763004 (docs: presentation layer の実装例を完全なコードに修正)
  • f77b4ee (docs: レイヤー間の責務と実装パターンに実装例を追加)
  • d9b2bd9 (docs: ui 状態の表記を修正)
  • 1dfeaf7 (docs: コード表記とスペースの修正)
  • e4966ee (docs: アーキテクチャの詳細な説明を追加)

Copy link
Copy Markdown
Contributor Author

@blendthink blendthink left a comment

Choose a reason for hiding this comment

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

@trm11tkr
いくつか修正させていただきましたのでご確認お願いいたします 🙏

Comment thread samples/github_app/pubspec.yaml
Comment thread samples/github_app/lib/domain/providers/scroll_notifier.dart Outdated
Comment thread samples/github_app/lib/data/providers/github_access_token.dart
Comment thread samples/github_app/lib/domain/providers/scroll_notifier.dart Outdated
@blendthink blendthink requested a review from trm11tkr September 9, 2025 08:38
- Move ScrollNotifier to appropriate location for UI state management
- Update import path in github_repository_list_page.dart
- Regenerate build files with melos run gen:build
- Sort import directives alphabetically to follow Dart conventions
- Resolve dart analyze warning about directive ordering
Copy link
Copy Markdown
Contributor

@trm11tkr trm11tkr left a comment

Choose a reason for hiding this comment

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

LGTM です!
ご対応いただきありがとうございます!

@blendthink blendthink added this pull request to the merge queue Sep 10, 2025
Merged via the queue into main with commit de22932 Sep 10, 2025
17 checks passed
@blendthink blendthink deleted the improve/GH-472/samples-architecture-refactor branch September 10, 2025 07:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

@samples/github_app samples github_app package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Improve]: packages/samples 配下のアーキテクチャ検討

2 participants