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

Feedpage tableViewスクロールキーボードが隠れるようにする、検索結果0件の状態でテキストフィールドを空にしてPullToRefreshする #48

Merged
merged 3 commits into from
May 28, 2024

Conversation

azuma502
Copy link
Collaborator

@azuma502 azuma502 commented May 16, 2024

概要

tableViewスクロールキーボードが隠れるようにする、検索結果0件の状態でテキストフィールドを空にしてPullToRefreshする

CLIENT_IDとCLIENT_SECRET

https://drive.google.com/file/d/1eDe853r65nVN0CZR-UD7GrW_24_RE6Sk/view?usp=drive_link

実装した内容

tableViewスクロールキーボードが隠れるようにする、検索結果0件の状態でテキストフィールドを空にしてPullToRefreshする

UI

RPReplay_Final1715852465.MP4

動作確認

RPReplay_Final1715866027.MP4

参考

その他

@azuma502 azuma502 self-assigned this May 16, 2024
@azuma502 azuma502 changed the title Feature/feedpage keyboard Feedpage tableViewスクロールキーボードが隠れるようにする、検索結果0件の状態でテキストフィールドを空にしてPullToRefreshする May 16, 2024
@azuma502 azuma502 marked this pull request as ready for review May 16, 2024 14:10
Copy link
Collaborator

@KobayashiYoh KobayashiYoh left a comment

Choose a reason for hiding this comment

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

気になる点コメントしましたが、今回修正の必要はございませんので、今後の実装に活かしてください!
LGTMです!

Comment on lines +59 to +61
onTap: () {
FocusScope.of(context).unfocus(); // タップでキーボードを閉じる
},
Copy link
Collaborator

Choose a reason for hiding this comment

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

👍

Comment on lines +62 to +68
child: NotificationListener<ScrollNotification>(
onNotification: (scrollNotification) {
if (scrollNotification is ScrollStartNotification) {
FocusScope.of(context).unfocus(); // スクロール開始でキーボードを閉じる
}
return false;
},
Copy link
Collaborator

Choose a reason for hiding this comment

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

この実装だと、ユーザーは何が起きたのか把握しづらいので、RefreshIndicator等のウィジェットを使ってpull to refreshのUIを表示してください!
今回修正の必要はありませんが、表示するかしないかでだいぶUX変わると思います!

Comment on lines +79 to 93
return const Center(
child: Column(
children: [
SizedBox(height: 228),
Text(
'検索にマッチする記事はありませんでした',
style: AppTextStyles.h2BasicBlack,
),
SizedBox(height: 18),
Text(
'検索条件を変えるなどして再度検索をしてください',
style: AppTextStyles.h3BasicSecondary,
)
],
),
Copy link
Collaborator

Choose a reason for hiding this comment

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

インデントが深くなっているので、UIコンポーネントとして切り分けるといいかもしれませんね!
ここも今回修正の必要はありません。

if (accessToken == null || accessToken.isEmpty) {
debugPrint('Access token is null or empty');
throw Exception('No access token found');
}
return accessToken;
return accessToken ?? ''; // アクセストークンがなければ空文字を返す
Copy link
Collaborator

Choose a reason for hiding this comment

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

ご存じだとは思いますし、今回修正の必要はありませんが、ここは僕も空の文字列よりnullを返す方がいいかもしれないです!
#47 (comment)

@KobayashiYoh KobayashiYoh merged commit a8002c1 into main May 28, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants