-
Notifications
You must be signed in to change notification settings - Fork 37
feature: バナーを複数設定できるように変更 #183
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
base: production
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for blog-microcms ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
概要シングルバナーコンポーネント( 変更内容
推定レビュー難度🎯 2 (シンプル) | ⏱️ ~12 分 レビューのポイント:
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Tip 📝 Customizable high-level summaries are now available in beta!You can now customize how CodeRabbit generates the high-level summary in your pull requests — including its content, structure, tone, and formatting.
Example instruction:
Note: This feature is currently in beta for Pro-tier users, and pricing will be announced later. 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. Comment |
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.
Actionable comments posted: 0
🧹 Nitpick comments (1)
components/Banners.vue (1)
57-60: 未使用の必須プロパティidについて
idプロパティが必須として定義されていますが、コンポーネント内で使用されていません。このプロパティが将来の実装で必要ない場合は、required: falseに変更するか、実際に使用することを検討してください。
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (9)
README.md(1 hunks)components/Banner.vue(0 hunks)components/Banners.vue(1 hunks)nuxt.config.js(6 hunks)pages/_slug/index.vue(3 hunks)pages/author/_authorId.vue(3 hunks)pages/draft/index.vue(2 hunks)pages/index.vue(3 hunks)pages/search/index.vue(3 hunks)
💤 Files with no reviewable changes (1)
- components/Banner.vue
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
- GitHub Check: Redirect rules
- GitHub Check: Header rules
- GitHub Check: Pages changed
🔇 Additional comments (10)
README.md (1)
116-131: ドキュメント更新が適切に反映されていますバナー関連のAPIスキーマ設定が正しく更新されています。エンドポイント名の変更、繰り返しフィールドへの移行、カスタムフィールド定義が明確に記載されており、PRの目的と一致しています。
nuxt.config.js (1)
217-219: エンドポイントとペイロードの更新が一貫しています
bannerからbannersへの変更が、データ取得とすべてのルート生成のペイロードで一貫して適用されています。Also applies to: 245-245, 256-256, 270-270, 277-277, 305-305, 338-338
pages/draft/index.vue (1)
78-78: 下書きページの更新が適切ですコンポーネント使用、データ取得、プロパティバインディングが新しい
Bannersコンポーネントとエンドポイントに正しく更新されています。Also applies to: 107-109, 116-116
pages/_slug/index.vue (1)
84-84: 記事詳細ページの更新が完了していますテンプレート、データ取得ロジック、戻り値が新しい
banners構造に統一されています。Also applies to: 118-123, 185-185
pages/search/index.vue (1)
80-80: 検索ページの更新が一貫しています
Bannersコンポーネントの使用とデータフローが他のページと同じパターンで実装されています。Also applies to: 104-109, 124-124
pages/author/_authorId.vue (1)
91-91: 著者ページの更新が適切です著者ページにおいても、
Bannersコンポーネントとエンドポイントの変更が正しく反映されています。Also applies to: 118-123, 159-159
pages/index.vue (1)
60-60: トップページの更新が完了していますトップページのバナー統合が新しい
Bannersシステムに正しく移行されています。Also applies to: 94-99, 141-141
components/Banners.vue (3)
3-45: キー属性の安定性について確認してくださいバナーのキーとして
banner.id || idxを使用していますが、banner.idが存在しない場合、バナーの順序が変更されるとVueの再レンダリングで問題が発生する可能性があります。可能であれば、microCMSのAPIレスポンスに一意なIDが含まれることを確認するか、バナー設定時に一意なIDを付与することを推奨します。
62-70: 正規化ロジックがAPIレスポンス構造に依存しています
normalizedBannersの実装では、this.banners.bannerという特定の構造を想定していますが、これはREADMEに記載されているAPIスキーマ(bannersエンドポイントがbannerフィールドを持つオブジェクトを返す)と一致しているようです。ただし、将来的にAPI構造が変更された場合に備えて、この依存関係を認識しておくことが重要です。
1-90: 新しい Banners コンポーネントが適切に実装されています複数バナーのレンダリング、配列/オブジェクトの正規化、条件付きリンク、lazyload対応が実装されており、PRの目的を満たしています。画像のalt属性も適切に処理されています。
変更箇所
banner→bannersにSummary by CodeRabbit
リリースノート
ドキュメンテーション
新機能
✏️ Tip: You can customize this high-level summary in your review settings.