Closed ju-ki closed 2 months ago
この変更は、Visual Studio Codeの設定ファイルを追加し、バックエンドのPostController
と新しいPostService
を統合することで、コードの整形とデータ管理を改善します。また、フロントエンドには新しいコンポーネントやテストが追加され、全体のユーザー体験が向上しました。
ファイル | 変更の概要 |
---|---|
.vscode/settings.json |
Prettierをデフォルトフォーマッターとして設定。 |
backend/app/Http/Controllers/API/PostController.php |
PostService を注入し、get_posts メソッドを使用。 |
backend/app/Services/PostService.php |
新しいPostService クラスを作成し、get_posts メソッドを追加。 |
backend/tests/Feature/API/PostTest.php |
APIレスポンスに'tags'フィールドを追加。 |
backend/tests/Unit/PostTest.php |
PostService のユニットテストを追加。 |
frontend/.editorconfig |
コーディングスタイルの一貫性を確立するための設定ファイルを追加。 |
frontend/.prettierrc |
コード整形ルールの設定ファイルを追加。 |
frontend/src/components/Common/Header/index.tsx |
新しいHeader コンポーネントを追加。 |
frontend/src/components/Common/Layout/index.tsx |
新しいLayout コンポーネントを追加。 |
frontend/src/components/Posts/Card/index.tsx |
新しいPostCard コンポーネントを追加。 |
frontend/src/pages/posts.tsx |
Posts コンポーネントにローディング状態を追加。 |
frontend/src/types/article.ts |
Article 型を定義する新しいファイルを追加。 |
frontend/src/styles/globals.css |
CSSスタイルの大幅な削除。 |
sequenceDiagram
participant User
participant PostsComponent
participant PostService
participant PostController
User->>PostsComponent: リクエスト
PostsComponent->>PostController: API呼び出し
PostController->>PostService: get_posts()
PostService-->>PostController: 投稿データを返却
PostController-->>PostsComponent: 投稿データを返却
PostsComponent-->>User: データを表示
🐰 整えられたコード、輝く星の下、 新しいコンポーネント、楽しい響き。 サービスの流れ、すべてがスムーズ、 うさぎの心も、嬉しく跳ねる。✨ みんなで作る、素敵な場所、 コードの森で、夢を語ろう!
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
@coderabbitai review
Summary by CodeRabbit
新機能
Header
、Layout
、PostCard
コンポーネントを導入し、ブログのヘッダー、ページレイアウト、および記事のカード表示を追加。Posts
コンポーネントにローディング状態を追加し、PostCard
を使用してポストを表示。Article
を定義し、記事データの取り扱いを強化。バグ修正
ドキュメント
.editorconfig
および.prettierrc
ファイルを追加し、プロジェクト全体のコーディングスタイルを一貫させる。