-
Notifications
You must be signed in to change notification settings - Fork 0
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
feat: クエスト詳細ページの簡易実装を追加 #461
Conversation
Walkthroughこの変更は、クエスト詳細機能の拡張に焦点を当てています。クエストデータに新たなフィールドを追加し、これに関連するすべてのクラスや関数もアップデートしました。さらに、ローカリゼーションファイルに新しいラベルとプレースホルダーが追加されました。詳細ページは Changes
Assessment against linked issues
Poem
Tip Early access features: enabledWe are currently testing the following features in early access:
Note:
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? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
Visit the preview URL for this PR (updated for commit 5c53790): https://asis-quest-catalog-dev--pr461-feature-gh-460-wiq29oxl.web.app (expires Sun, 07 Jul 2024 14:43:56 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: 5aa3b98f0f68e3358ab4b28a7b45d288ba01e139 |
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: 11
Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files selected for processing (25)
- catalog/lib/ui/component/quest_list_tile.dart (1 hunks)
- core/common/lib/extension.dart (1 hunks)
- core/common/lib/src/extension/string.dart (1 hunks)
- core/data/lib/src/quest_repository.dart (4 hunks)
- core/database/lib/src/quest/quest_dao.dart (1 hunks)
- core/database_isar/lib/src/quest/isar_quest_dao.dart (2 hunks)
- core/database_isar/lib/src/quest/model/quest.dart (2 hunks)
- core/database_isar/lib/src/quest/model/quest.g.dart (30 hunks)
- core/domain/lib/src/use_case/quest/add_quest_use_case.dart (2 hunks)
- core/model/lib/quest.dart (1 hunks)
- core/model/lib/src/quest/quest.dart (2 hunks)
- core/model/lib/src/quest/quest.freezed.dart (8 hunks)
- core/model/lib/src/quest/quest_status.dart (1 hunks)
- core/network/lib/src/quest/model/network_main_quest.dart (1 hunks)
- core/network/lib/src/quest/model/network_main_quest.freezed.dart (11 hunks)
- core/network_ferry/lib/src/quests/ferry_network_main_quest_transformer.dart (1 hunks)
- core/ui/lib/src/quest_list_tile.dart (1 hunks)
- feature/home/lib/src/ui/page/home/component/recent_quest_list_section.dart (1 hunks)
- feature/quest/lib/src/gen/l10n/l10n.dart (1 hunks)
- feature/quest/lib/src/gen/l10n/l10n_en.dart (1 hunks)
- feature/quest/lib/src/gen/l10n/l10n_ja.dart (1 hunks)
- feature/quest/lib/src/l10n/app_en.arb (1 hunks)
- feature/quest/lib/src/l10n/app_ja.arb (1 hunks)
- feature/quest/lib/src/ui/page/detail/component/quest_content.dart (2 hunks)
- feature/quest/lib/src/ui/page/detail/quest_detail_page.dart (1 hunks)
Files not summarized due to errors (1)
- core/database_isar/lib/src/quest/model/quest.g.dart: Error: Message exceeds token limit
Files skipped from review due to trivial changes (4)
- core/common/lib/extension.dart
- core/model/lib/quest.dart
- core/model/lib/src/quest/quest_status.dart
- feature/home/lib/src/ui/page/home/component/recent_quest_list_section.dart
Additional comments not posted (76)
core/network/lib/src/quest/model/network_main_quest.dart (1)
14-19
: 新しいフィールドの追加新しいフィールドが
NetworkMainQuest
クラスに追加されました。これらのフィールドは、クエストの詳細を表すために必要です。core/model/lib/src/quest/quest.dart (1)
15-22
: 新しいフィールドの追加新しいフィールドが
Quest
クラスに追加されました。これらのフィールドは、クエストの詳細を表すために必要です。core/ui/lib/src/quest_list_tile.dart (1)
17-17
: プロパティの変更
QuestListTile
クラスのtitle
プロパティが_quest.name
から_quest.title
に変更されました。この変更は、新しいQuest
クラスのフィールドに一致しています。core/common/lib/src/extension/string.dart (1)
1-24
: 新しいメソッドの追加
StringX
拡張に文字列をキャメルケースに変換するメソッドが追加されました。このメソッドは正しく動作し、パフォーマンスも適切です。feature/quest/lib/src/ui/page/detail/quest_detail_page.dart (1)
23-24
: LGTM!
SafeArea
を使用して、コンテンツが安全領域内に表示されるようにする変更は適切です。catalog/lib/ui/component/quest_list_tile.dart (1)
13-23
: LGTM!
Quest
エンティティに新しいフィールドを追加する変更は適切です。これにより、クエストの詳細情報が正しく表示されます。feature/quest/lib/src/l10n/app_ja.arb (1)
5-14
: LGTM!クエストの詳細に関する新しいローカライズ文字列の追加は適切です。これにより、ユーザーインターフェースが改善されます。
feature/quest/lib/src/l10n/app_en.arb (1)
5-14
: LGTM!クエストの詳細に関する新しいローカライズ文字列の追加は適切です。これにより、ユーザーインターフェースが改善されます。
core/network_ferry/lib/src/quests/ferry_network_main_quest_transformer.dart (1)
20-25
: 新しいフィールドを追加する際の確認新しいフィールド
begunAt
,endedAt
,categoryId
,status
,coverImageUrl
,note
がtransformToNetworkMainQuest
メソッドに追加されました。これらのフィールドが正しくマッピングされていることを確認してください。全体的に見て、これらの変更は問題ないようです。
core/domain/lib/src/use_case/quest/add_quest_use_case.dart (1)
24-31
: 新しいフィールドを追加する際の確認新しいフィールド
userId
,begunAt
,endedAt
,categoryId
,status
,coverImageUrl
がinsert
メソッドに追加されました。これらのフィールドが正しく渡されていることを確認してください。全体的に見て、これらの変更は問題ないようです。
core/database/lib/src/quest/quest_dao.dart (1)
31-36
: 新しいフィールドを追加する際の確認
merges
メソッドに新しいフィールドbegunAt
,endedAt
,categoryId
,status
,coverImageUrl
,note
が追加されました。これらのフィールドが正しく処理されていることを確認してください。全体的に見て、これらの変更は問題ないようです。
core/database_isar/lib/src/quest/model/quest.dart (4)
12-19
: 新しいフィールドを追加する際の確認
Quest
クラスに新しいフィールドtitle
,begunAt
,endedAt
,categoryId
,status
,coverImageUrl
,note
が追加されました。これらのフィールドが正しく初期化されていることを確認してください。全体的に見て、これらの変更は問題ないようです。
23-30
: 新しいフィールドを追加する際の確認
Quest
クラスのフィールドtitle
,begunAt
,endedAt
,categoryId
,status
,coverImageUrl
,note
が正しく宣言されていることを確認してください。全体的に見て、これらの変更は問題ないようです。
36-43
: 新しいフィールドを追加する際の確認
QuestExtension
のasModel
メソッドに新しいフィールドtitle
,begunAt
,endedAt
,categoryId
,status
,coverImageUrl
,note
が追加されました。これらのフィールドが正しくマッピングされていることを確認してください。全体的に見て、これらの変更は問題ないようです。
50-57
: 新しいフィールドを追加する際の確認
QuestModelExtension
のasDbModel
メソッドに新しいフィールドtitle
,begunAt
,endedAt
,categoryId
,status
,coverImageUrl
,note
が追加されました。これらのフィールドが正しくマッピングされていることを確認してください。全体的に見て、これらの変更は問題ないようです。
feature/quest/lib/src/gen/l10n/l10n_ja.dart (10)
18-19
: 新しい翻訳を確認してください
questDetailContentBegunAtLabel
の翻訳は「開始日時」となっていますが、これは適切な日本語です。
21-22
: 新しい翻訳を確認してください
questDetailContentBegunAtEmptyText
の翻訳は「設定されていません」となっていますが、これは適切な日本語です。
24-25
: 新しい翻訳を確認してください
questDetailContentEndedAtLabel
の翻訳は「終了日時」となっていますが、これは適切な日本語です。
27-28
: 新しい翻訳を確認してください
questDetailContentEndedAtEmptyText
の翻訳は「設定されていません」となっていますが、これは適切な日本語です。
30-31
: 新しい翻訳を確認してください
questDetailContentCategoryLabel
の翻訳は「カテゴリ」となっていますが、これは適切な日本語です。
33-34
: 新しい翻訳を確認してください
questDetailContentCategoryEmptyText
の翻訳は「設定されていません」となっていますが、これは適切な日本語です。
36-37
: 新しい翻訳を確認してください
questDetailContentStatusLabel
の翻訳は「ステータス」となっていますが、これは適切な日本語です。
39-40
: 新しい翻訳を確認してください
questDetailContentStatusEmptyText
の翻訳は「設定されていません」となっていますが、これは適切な日本語です。
42-43
: 新しい翻訳を確認してください
questDetailContentNoteLabel
の翻訳は「ノート」となっていますが、これは適切な日本語です。
45-46
: 新しい翻訳を確認してください
questDetailContentNoteEmptyText
の翻訳は「設定されていません」となっていますが、これは適切な日本語です。feature/quest/lib/src/gen/l10n/l10n_en.dart (10)
18-19
: New translation check
The translation forquestDetailContentBegunAtLabel
as "Begun At" is appropriate.
21-22
: New translation check
The translation forquestDetailContentBegunAtEmptyText
as "Not set" is appropriate.
24-25
: New translation check
The translation forquestDetailContentEndedAtLabel
as "Ended At" is appropriate.
27-28
: New translation check
The translation forquestDetailContentEndedAtEmptyText
as "Not set" is appropriate.
30-31
: New translation check
The translation forquestDetailContentCategoryLabel
as "Category" is appropriate.
33-34
: New translation check
The translation forquestDetailContentCategoryEmptyText
as "Not set" is appropriate.
36-37
: New translation check
The translation forquestDetailContentStatusLabel
as "Status" is appropriate.
39-40
: New translation check
The translation forquestDetailContentStatusEmptyText
as "Not set" is appropriate.
42-43
: New translation check
The translation forquestDetailContentNoteLabel
as "Note" is appropriate.
45-46
: New translation check
The translation forquestDetailContentNoteEmptyText
as "Not set" is appropriate.core/data/lib/src/quest_repository.dart (6)
39-39
: 新しいパラメータの追加を確認してください
userId
パラメータが追加されました。これは正しいです。
42-43
: 新しいパラメータの追加を確認してください
begunAt
とendedAt
パラメータが追加されました。これは正しいです。
44-45
: 新しいパラメータの追加を確認してください
categoryId
とstatus
パラメータが追加されました。これは正しいです。
46-46
: 新しいパラメータの追加を確認してください
coverImageUrl
パラメータが追加されました。これは正しいです。
61-66
: 新しいパラメータの追加を確認してください
merges
メソッドに新しいフィールドが追加されました。これは正しいです。
93-102
: 新しいフィールドの追加を確認してください
sync
メソッドに新しいフィールドが追加されました。これは正しいです。core/database_isar/lib/src/quest/isar_quest_dao.dart (3)
70-72
: 新しいパラメータの追加を確認してください
update
メソッドに新しいフィールドが追加されました。これは正しいです。
98-108
: 新しいフィールドの追加を確認してください
merges
メソッドに新しいフィールドが追加されました。これは正しいです。
118-125
: 新しいフィールドの追加を確認してください
merges
メソッドのマッピングに新しいフィールドが追加されました。これは正しいです。feature/quest/lib/src/gen/l10n/l10n.dart (10)
117-121
: ローカリゼーション文字列の追加
questDetailContentBegunAtLabel
は適切に追加されています。特に問題はありません。
123-127
: ローカリゼーション文字列の追加
questDetailContentBegunAtEmptyText
は適切に追加されています。特に問題はありません。
129-133
: ローカリゼーション文字列の追加
questDetailContentEndedAtLabel
は適切に追加されています。特に問題はありません。
135-139
: ローカリゼーション文字列の追加
questDetailContentEndedAtEmptyText
は適切に追加されています。特に問題はありません。
141-145
: ローカリゼーション文字列の追加
questDetailContentCategoryLabel
は適切に追加されています。特に問題はありません。
147-151
: ローカリゼーション文字列の追加
questDetailContentCategoryEmptyText
は適切に追加されています。特に問題はありません。
153-157
: ローカリゼーション文字列の追加
questDetailContentStatusLabel
は適切に追加されています。特に問題はありません。
159-163
: ローカリゼーション文字列の追加
questDetailContentStatusEmptyText
は適切に追加されています。特に問題はありません。
165-169
: ローカリゼーション文字列の追加
questDetailContentNoteLabel
は適切に追加されています。特に問題はありません。
171-175
: ローカリゼーション文字列の追加
questDetailContentNoteEmptyText
は適切に追加されています。特に問題はありません。core/model/lib/src/quest/quest.freezed.dart (7)
20-27
: 新しいフィールドの追加
Quest
クラスに新しいフィールドが追加されています。特に問題はありません。
38-47
: コピーウィズメソッドの更新
Quest
クラスのcopyWith
メソッドが新しいフィールドを反映するように更新されています。特に問題はありません。
64-71
: コピーウィズメソッドの更新
Quest
クラスのcopyWith
メソッドが新しいフィールドを反映するように更新されています。特に問題はありません。
121-130
: コピーウィズメソッドの更新
Quest
クラスのcopyWith
メソッドが新しいフィールドを反映するように更新されています。特に問題はありません。
145-155
: コピーウィズメソッドの更新
Quest
クラスのcopyWith
メソッドが新しいフィールドを反映するように更新されています。特に問題はありません。
202-207
: 新しいフィールドの追加
Quest
クラスに新しいフィールドが追加されています。特に問題はありません。
218-225
: 新しいフィールドの追加
Quest
クラスに新しいフィールドが追加されています。特に問題はありません。core/network/lib/src/quest/model/network_main_quest.freezed.dart (7)
22-27
: 新しいフィールドの追加
NetworkMainQuest
クラスに新しいフィールドが追加されています。特に問題はありません。
40-49
: コピーウィズメソッドの更新
NetworkMainQuest
クラスのcopyWith
メソッドが新しいフィールドを反映するように更新されています。特に問題はありません。
68-73
: コピーウィズメソッドの更新
NetworkMainQuest
クラスのcopyWith
メソッドが新しいフィールドを反映するように更新されています。特に問題はありません。
124-133
: コピーウィズメソッドの更新
NetworkMainQuest
クラスのcopyWith
メソッドが新しいフィールドを反映するように更新されています。特に問題はありません。
150-155
: コピーウィズメソッドの更新
NetworkMainQuest
クラスのcopyWith
メソッドが新しいフィールドを反映するように更新されています。特に問題はありません。
202-210
: 新しいフィールドの追加
NetworkMainQuest
クラスに新しいフィールドが追加されています。特に問題はありません。
218-229
: 新しいフィールドの追加
NetworkMainQuest
クラスに新しいフィールドが追加されています。特に問題はありません。core/database_isar/lib/src/quest/model/quest.g.dart (8)
28-28
: フィールドtitle
の追加
title
フィールドがQuest
スキーマに追加されました。これにより、クエストのタイトルを保存できます。
36-42
: フィールドbegunAt
とendedAt
の追加
begunAt
とendedAt
フィールドがQuest
スキーマに追加されました。これにより、クエストの開始日と終了日を保存できます。
44-56
: フィールドcategoryId
、status
、coverImageUrl
、note
の追加
categoryId
、status
、coverImageUrl
、およびnote
フィールドがQuest
スキーマに追加されました。これにより、クエストのカテゴリ、ステータス、カバー画像URL、およびメモを保存できます。
73-96
: シリアライズの更新新しいフィールド
title
、begunAt
、endedAt
、categoryId
、status
、coverImageUrl
、およびnote
がシリアライズに追加されました。これにより、クエストオブジェクトのこれらのフィールドを保存できます。
104-145
: デシリアライズの更新新しいフィールド
title
、begunAt
、endedAt
、categoryId
、status
、coverImageUrl
、およびnote
がデシリアライズに追加されました。これにより、保存されたクエストオブジェクトのこれらのフィールドを読み取ることができます。
Line range hint
551-710
: クエリフィルタの更新新しいフィールド
title
に対するクエリフィルタが追加されました。これにより、title
フィールドを基準にクエストをフィルタリングできます。
895-1789
: クエリフィルタの更新新しいフィールド
begunAt
、endedAt
、categoryId
、status
、coverImageUrl
、およびnote
に対するクエリフィルタが追加されました。これにより、これらのフィールドを基準にクエストをフィルタリングできます。
Line range hint
2154-2313
: プロパティクエリの更新新しいフィールド
title
、begunAt
、endedAt
、categoryId
、status
、coverImageUrl
、およびnote
に対するプロパティクエリが追加されました。これにより、これらのフィールドを直接クエリできます。
Text(l10n.questDetailContentCategoryLabel), | ||
if (quest.categoryId != null) | ||
Text(quest.categoryId!) | ||
else | ||
Text(l10n.questDetailContentCategoryEmptyText), |
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.
カテゴリの表示
quest.categoryId
が存在しない場合のプレースホルダーを追加することを検討してください。
- if (quest.categoryId != null)
- Text(quest.categoryId!)
- else
- Text(l10n.questDetailContentCategoryEmptyText),
+ Text(quest.categoryId ?? l10n.questDetailContentCategoryEmptyText),
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
Text(l10n.questDetailContentCategoryLabel), | |
if (quest.categoryId != null) | |
Text(quest.categoryId!) | |
else | |
Text(l10n.questDetailContentCategoryEmptyText), | |
Text(l10n.questDetailContentCategoryLabel), | |
Text(quest.categoryId ?? l10n.questDetailContentCategoryEmptyText), |
final provider = questStreamByIdUseCaseProvider(id: _questId); | ||
final quest = ref.watch(provider); |
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.
プロバイダの型を指定してください
final provider = questStreamByIdUseCaseProvider(id: _questId);
の型を明示的に指定することで、コードの可読性と保守性が向上します。
- final provider = questStreamByIdUseCaseProvider(id: _questId);
+ final StreamProvider<Quest?> provider = questStreamByIdUseCaseProvider(id: _questId);
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
final provider = questStreamByIdUseCaseProvider(id: _questId); | |
final quest = ref.watch(provider); | |
final StreamProvider<Quest?> provider = questStreamByIdUseCaseProvider(id: _questId); | |
final quest = ref.watch(provider); |
Text(l10n.questDetailContentStatusLabel), | ||
Text(quest.status.name), |
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.
ステータスの表示
quest.status.name
を表示していますが、ユーザーフレンドリーなラベルを表示することを検討してください。
- Text(quest.status.name),
+ Text(l10n.questStatusLabel(quest.status)),
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
Text(l10n.questDetailContentStatusLabel), | |
Text(quest.status.name), | |
Text(l10n.questDetailContentStatusLabel), | |
Text(l10n.questStatusLabel(quest.status)), |
import 'package:core_designsystem/component.dart'; | ||
import 'package:core_domain/quest_use_case.dart'; | ||
import 'package:core_model/quest.dart'; | ||
import 'package:core_ui/quest_list_title.dart'; | ||
import 'package:feature_quest/src/gen/l10n/l10n.dart'; |
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.
不要なインポートを削除してください
import 'package:core_designsystem/component.dart';
と import 'package:core_domain/quest_use_case.dart';
が使用されていないようです。不要なインポートは削除することをお勧めします。
- import 'package:core_designsystem/component.dart';
- import 'package:core_domain/quest_use_case.dart';
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
import 'package:core_designsystem/component.dart'; | |
import 'package:core_domain/quest_use_case.dart'; | |
import 'package:core_model/quest.dart'; | |
import 'package:core_ui/quest_list_title.dart'; | |
import 'package:feature_quest/src/gen/l10n/l10n.dart'; | |
import 'package:core_model/quest.dart'; | |
import 'package:feature_quest/src/gen/l10n/l10n.dart'; |
if (quest == null) { | ||
return const SizedBox.shrink(); | ||
} |
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.
クエストが null の場合のハンドリング
if (quest == null)
の場合に SizedBox.shrink()
を返していますが、ユーザーにフィードバックを提供するためにエラーメッセージやプレースホルダーを表示することを検討してください。
- if (quest == null) {
- return const SizedBox.shrink();
- }
+ if (quest == null) {
+ return Center(child: Text(l10n.questDetailContentNotFound));
+ }
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
if (quest == null) { | |
return const SizedBox.shrink(); | |
} | |
if (quest == null) { | |
return Center(child: Text(l10n.questDetailContentNotFound)); | |
} |
), | ||
|
||
// 説明 | ||
if (quest.description.isNotEmpty) Text(quest.description), |
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.
説明の表示
quest.description.isNotEmpty
の場合にテキストを表示していますが、quest.description
が存在しない場合のプレースホルダーを追加することを検討してください。
- if (quest.description.isNotEmpty) Text(quest.description),
+ if (quest.description.isNotEmpty)
+ Text(quest.description),
+ else
+ Text(l10n.questDetailContentDescriptionEmptyText),
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
if (quest.description.isNotEmpty) Text(quest.description), | |
if (quest.description.isNotEmpty) | |
Text(quest.description), | |
else | |
Text(l10n.questDetailContentDescriptionEmptyText), |
if (quest.coverImageUrl != null) | ||
ClipRRect( | ||
borderRadius: BorderRadius.circular(8), | ||
child: Image.network(quest.coverImageUrl!), | ||
), |
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.
カバー画像のエラーハンドリング
Image.network
を使用していますが、画像のロードに失敗した場合のエラーハンドリングを追加することを検討してください。
- Image.network(quest.coverImageUrl!),
+ Image.network(
+ quest.coverImageUrl!,
+ errorBuilder: (context, error, stackTrace) {
+ return Icon(Icons.error);
+ },
+ ),
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
if (quest.coverImageUrl != null) | |
ClipRRect( | |
borderRadius: BorderRadius.circular(8), | |
child: Image.network(quest.coverImageUrl!), | |
), | |
if (quest.coverImageUrl != null) | |
ClipRRect( | |
borderRadius: BorderRadius.circular(8), | |
child: Image.network( | |
quest.coverImageUrl!, | |
errorBuilder: (context, error, stackTrace) { | |
return Icon(Icons.error); | |
}, | |
), | |
), |
Text(l10n.questDetailContentNoteLabel), | ||
Text(quest.note), |
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.
ノートのプレースホルダー
quest.note
が存在しない場合のプレースホルダーを追加することを検討してください。
- Text(quest.note),
+ Text(quest.note.isNotEmpty ? quest.note : l10n.questDetailContentNoteEmptyText),
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
Text(l10n.questDetailContentNoteLabel), | |
Text(quest.note), | |
Text(l10n.questDetailContentNoteLabel), | |
Text(quest.note.isNotEmpty ? quest.note : l10n.questDetailContentNoteEmptyText), |
Text(l10n.questDetailContentBegunAtLabel), | ||
if (quest.begunAt != null) | ||
Text(quest.begunAt!.toIso8601String()) | ||
else | ||
Text(l10n.questDetailContentBegunAtEmptyText), |
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.
開始日時のフォーマット
quest.begunAt!.toIso8601String()
ではなく、ユーザーフレンドリーなフォーマットで日時を表示することを検討してください。
- Text(quest.begunAt!.toIso8601String())
+ Text(DateFormat.yMMMd().format(quest.begunAt!))
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
Text(l10n.questDetailContentBegunAtLabel), | |
if (quest.begunAt != null) | |
Text(quest.begunAt!.toIso8601String()) | |
else | |
Text(l10n.questDetailContentBegunAtEmptyText), | |
Text(l10n.questDetailContentBegunAtLabel), | |
if (quest.begunAt != null) | |
Text(DateFormat.yMMMd().format(quest.begunAt!)) | |
else | |
Text(l10n.questDetailContentBegunAtEmptyText), |
Text(l10n.questDetailContentEndedAtLabel), | ||
if (quest.endedAt != null) | ||
Text(quest.endedAt!.toIso8601String()) | ||
else | ||
Text(l10n.questDetailContentEndedAtEmptyText), |
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.
終了日時のフォーマット
quest.endedAt!.toIso8601String()
ではなく、ユーザーフレンドリーなフォーマットで日時を表示することを検討してください。
- Text(quest.endedAt!.toIso8601String())
+ Text(DateFormat.yMMMd().format(quest.endedAt!))
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
Text(l10n.questDetailContentEndedAtLabel), | |
if (quest.endedAt != null) | |
Text(quest.endedAt!.toIso8601String()) | |
else | |
Text(l10n.questDetailContentEndedAtEmptyText), | |
Text(l10n.questDetailContentEndedAtLabel), | |
if (quest.endedAt != null) | |
Text(DateFormat.yMMMd().format(quest.endedAt!)) | |
else | |
Text(l10n.questDetailContentEndedAtEmptyText), |
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
Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files selected for processing (1)
- core/domain/lib/src/use_case/quest/add_quest_use_case.g.dart (1 hunks)
Files skipped from review due to trivial changes (1)
- core/domain/lib/src/use_case/quest/add_quest_use_case.g.dart
Issue
概要
クエスト詳細ページの簡易実装を追加します。
レビュー観点
レビューレベル
レビュー優先度
参考リンク
スクリーンショット
Summary by CodeRabbit
新機能
バグ修正
改善
QuestContent
をSafeArea
で囲むように変更。翻訳