Skip to content
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: クエスト追加ダイアログを追加 #459

Merged
merged 4 commits into from
Jun 30, 2024
Merged

Conversation

tatsutakein
Copy link
Member

@tatsutakein tatsutakein commented Jun 30, 2024

Issue

概要

クエスト追加ダイアログを追加します。

レビュー観点

レビューレベル

  • Lv0: まったく見ないで Approve する
  • Lv1: ぱっとみて違和感がないかチェックして Approve する
  • Lv2: 仕様レベルまで理解して、仕様通りに動くかある程度検証して Approve する
  • Lv3: 実際に環境で動作確認したうえで Approve する

レビュー優先度

  • すぐに見てもらいたい ( hotfix など ) 🚀
  • 今日中に見てもらいたい 🚗
  • 今日〜明日中で見てもらいたい 🚶
  • 数日以内で見てもらいたい 🐢

参考リンク

スクリーンショット

GH-459.mp4

Summary by CodeRabbit

  • 新機能

    • 「クエストを追加する」ダイアログの追加: クエストをすばやく追加するための新しいダイアログを導入しました。タイトル、説明、ノートを入力するフィールドが含まれています。
    • 「クエストを追加する」ボタン: ホームページにこのボタンを追加し、押すと新しいダイアログが開きます。
  • 改良

    • 新しいルートの追加: 「quickAddQuest」のルートを追加し、ナビゲーションがより直感的になりました。
    • 日本語対応の強化: クエスト追加ダイアログに対応する新しい日本語の翻訳キーを追加しました。

@tatsutakein tatsutakein requested a review from a team as a code owner June 30, 2024 11:19
@github-actions github-actions bot added @feature/home feature home package @catalog Catalog development @app app package labels Jun 30, 2024
Copy link

coderabbitai bot commented Jun 30, 2024

Walkthrough

この変更は、新しい「クエストのクイック追加ダイアログ」機能を導入するものです。具体的には、新しいクエストの追加ダイアログ画面とそれに関連するルーティング、ボタン操作、ローカリゼーションの追加が含まれています。

Changes

ファイル 変更内容
app/lib/router/app_router.g.dart 新しいルートQuickAddQuestDialogRouteを追加し、関連するナビゲーションメソッドを追加。
app/lib/router/routes/home_route.dart onQuickAddButtonPressedコールバックを追加し、ボタン押下でQuickAddQuestDialogRouteに遷移。
app/lib/router/shell_branch/home_branch.dart homeBranchに新しいTypedGoRouteを追加。
catalog/lib/feature/home/page/home_page.dart HomePageonQuickAddButtonPressedパラメータを追加。
feature/home/lib/feature_home.dart quick_add_quest_dialog.dartをエクスポートに追加。
feature/home/lib/src/gen/l10n/l10n.dart L10nクラスに新しいローカリゼーションキーを追加。
feature/home/lib/src/gen/l10n/l10n_en.dart L10nEnクラスに新しいクエスト追加ダイアログ用の文字列を追加。
feature/home/lib/src/gen/l10n/l10n_ja.dart L10nJaクラスにクエスト追加ダイアログ用の新しい文字列を追加。
feature/home/lib/src/l10n/app_en.arb 新しいローカリゼーションキーを追加。
feature/home/lib/src/l10n/app_ja.arb クエスト追加ダイアログ用の新しい文字列を追加。
feature/home/lib/src/ui/page/home/home_page.dart QuickAddQuestDialogのコールバックを追加。
feature/home/lib/src/ui/page/home/quick_add_quest_dialog.dart クエストのクイック追加ダイアログを導入。
feature/home/pubspec.yaml flutter_hooks 依存関係を追加。

Sequence Diagram(s)

このセクションをスキップします。

Assessment against linked issues

Objective Addressed Explanation
クエストのクイック追加ダイアログを追加する (#458)

Poem

うさぎが跳ねる、コードの森、
新しい道へ、クエストを導く、
夢見る冒険、ダイアログの中、
物語が生まれ、新たな始まり、
コードが織り成す、不思議の世界へ。
🍃🐇✨


Tip

Early access features: enabled

We are currently testing the following features in early access:

  • OpenAI gpt-4o model for code reviews and chat: OpenAI claims that this model is better at understanding and generating code than the previous models. We seek your feedback over the next few weeks before making it generally available.

Note:

  • You can enable or disable early access features from the CodeRabbit UI or by updating the CodeRabbit configuration file.
  • Please join our Discord Community to provide feedback and report issues.
  • OSS projects are always opted into early access features.

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?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@tatsutakeinjp-bot
Copy link
Contributor

Visit the preview URL for this PR (updated for commit bc11697):

https://asis-quest-catalog-dev--pr459-feature-gh-458-jjygk0ei.web.app

(expires Sun, 07 Jul 2024 11:21:39 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 5aa3b98f0f68e3358ab4b28a7b45d288ba01e139

Copy link

@coderabbitai coderabbitai bot left a 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

Commits

Files that changed from the base of the PR and between acdab0d and bc11697.

Files ignored due to path filters (1)
  • feature/home/pubspec.lock is excluded by !**/*.lock
Files selected for processing (13)
  • app/lib/router/app_router.g.dart (2 hunks)
  • app/lib/router/routes/home_route.dart (2 hunks)
  • app/lib/router/shell_branch/home_branch.dart (1 hunks)
  • catalog/lib/feature/home/page/home_page.dart (1 hunks)
  • feature/home/lib/feature_home.dart (1 hunks)
  • feature/home/lib/src/gen/l10n/l10n.dart (1 hunks)
  • feature/home/lib/src/gen/l10n/l10n_en.dart (1 hunks)
  • feature/home/lib/src/gen/l10n/l10n_ja.dart (1 hunks)
  • feature/home/lib/src/l10n/app_en.arb (1 hunks)
  • feature/home/lib/src/l10n/app_ja.arb (1 hunks)
  • feature/home/lib/src/ui/page/home/home_page.dart (2 hunks)
  • feature/home/lib/src/ui/page/home/quick_add_quest_dialog.dart (1 hunks)
  • feature/home/pubspec.yaml (1 hunks)
Files skipped from review due to trivial changes (5)
  • feature/home/lib/src/gen/l10n/l10n_en.dart
  • feature/home/lib/src/gen/l10n/l10n_ja.dart
  • feature/home/lib/src/l10n/app_en.arb
  • feature/home/lib/src/l10n/app_ja.arb
  • feature/home/pubspec.yaml
Additional comments not posted (23)
feature/home/lib/feature_home.dart (1)

4-4: LGTM!

quick_add_quest_dialog.dart のエクスポートが追加されています。

catalog/lib/feature/home/page/home_page.dart (1)

13-13: LGTM!

onQuickAddButtonPressed コールバックが HomePage に追加されています。

app/lib/router/shell_branch/home_branch.dart (1)

18-20: LGTM!

新しい QuickAddQuestDialogRoute が追加されています。

app/lib/router/routes/home_route.dart (2)

12-14: LGTM!

onQuickAddButtonPressed コールバックが HomeRoute に追加されています。


24-37: LGTM!

新しい QuickAddQuestDialogRoute が追加されています。

feature/home/lib/src/ui/page/home/home_page.dart (4)

14-14: 新しいパラメーターの追加

onQuickAddButtonPressed パラメーターが追加されました。これにより、クイック追加ボタンが押されたときのコールバックを設定できます。


19-19: 新しいフィールドの追加

新しいフィールド _onQuickAddButtonPressed が追加されました。これにより、クイック追加ボタンが押されたときのコールバックが保存されます。


24-24: 新しいフィールドの追加

新しいフィールド _onQuickAddButtonPressed が追加されました。これにより、クイック追加ボタンが押されたときのコールバックが保存されます。


55-55: クエスト概要セクションの更新

QuestOverviewSectiononQuickAddButtonPressed コールバックが追加されました。これにより、クイック追加ボタンが押されたときに適切なアクションが実行されます。

feature/home/lib/src/ui/page/home/quick_add_quest_dialog.dart (12)

1-1: 新しいインポート

flutter_hooks パッケージがインポートされました。これにより、フックを使用して状態管理が行われます。


8-8: 新しいクラスの追加

QuickAddQuestDialog クラスが追加されました。このクラスはクエストを迅速に追加するためのダイアログを実装しています。


10-12: コンストラクタの追加

QuickAddQuestDialog クラスのコンストラクタが追加されました。onClose コールバックを受け取ります。


14-14: 新しいフィールドの追加

_onClose フィールドが追加されました。これにより、ダイアログを閉じるためのコールバックが保存されます。


16-18: ビルドメソッドの追加

build メソッドが追加されました。ここでダイアログのUIが構築されます。


20-27: フックの使用

useTextEditingControlleruseValueListenable フックが使用されています。これにより、テキストフィールドの状態が管理されます。


29-29: フォームキーの使用

useMemoized フックを使用してフォームキーが生成されています。これにより、フォームの状態が管理されます。


31-31: ダイアログの構築

AlertDialog ウィジェットが使用されています。これにより、クエスト追加ダイアログの基本的なレイアウトが提供されます。


32-32: ダイアログのタイトル

ダイアログのタイトルとしてローカライズされたテキストが使用されています。


33-87: フォームの構築

フォームが構築され、テキストフィールドが追加されています。それぞれのフィールドにはバリデーションが含まれています。


89-92: キャンセルボタン

キャンセルボタンが追加されました。これにより、ダイアログを閉じることができます。


94-109: クエスト追加ロジック

フォームのバリデーションとクエストの追加ロジックが実装されています。バリデーションが成功した場合、クエストが追加され、ダイアログが閉じられます。

feature/home/lib/src/gen/l10n/l10n.dart (1)

135-175: 新しいローカライズキーの追加

クエスト追加ダイアログのための新しいローカライズキーが追加されました。これにより、ダイアログのテキストが適切に翻訳されます。

app/lib/router/app_router.g.dart (1)

148-164: 新しいルート拡張の追加

QuickAddQuestDialogRoute のための新しいルート拡張が追加されました。これにより、ナビゲーションが容易になります。

@tatsutakein tatsutakein merged commit b26e928 into main Jun 30, 2024
13 checks passed
@tatsutakein tatsutakein deleted the feature/GH-458 branch June 30, 2024 11:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@app app package @catalog Catalog development @feature/home feature home package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature]: クエストのクイック追加ダイアログを追加
1 participant