Shaky skips the feedback form after the bottom sheet was dismissed

オープン 初心者向け
#103 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
78/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
android, java
領域
mobile

調査の方向性

delegate の launchShakeBottomSheet を読みます。これは isBottomSheetFlowActive = true を設定し、続いて onDataReady/doStartFeedbackFlow があり、ここではフラグは送信済みの sheet flow の後にのみクリアされます。さらに bottom sheet の Dismiss 行のハンドラーも読みます。サンプルアプリで再現します:「bottom sheet を手動で起動」、「Dismiss」、そして「feedback を手動で開始」。完了条件は、sheet の OnCancelListener がフラグをクリアすること、Dismiss 行が cancel() を呼ぶこと、flow を開始する行は引き続き dismiss() を呼ぶこと、手動の flow が FeedbackActivity に到達することです。

索引モデルが issue の本文から書いたものです。

説明

On main (ca3e5f0), with the default delegate (shouldUseBottomSheet() returns true):

  1. Shake, or call startShakeBottomSheetFlowManually(). The bottom sheet opens.
  2. Close it without picking a row: tap "Dismiss", press back, tap outside or swipe it down.
  3. Call shaky.startFeedbackFlow(), which the README suggests for starting the flow without a shake.

Expected: FeedbackActivity opens and the user can write a message.

Actual: after the screenshot is collected, delegate.submit() is called right away with no message and a null title. With EmailShakeDelegate that opens the mail app with only the screenshot attached.

launchShakeBottomSheet sets isBottomSheetFlowActive = true when it shows the sheet. The flag is only cleared in onDataReady after a sheet flow has submitted. If the sheet is closed without a choice, nothing clears it, so the next doStartFeedbackFlow() from startFeedbackFlow() takes the sheet branch in onDataReady. The sample app shows it too: tap "Manually launch bottom sheet", tap "Dismiss", then tap "Manually start feedback".

I have a small fix: clear the flag in an OnCancelListener on the sheet, and make the Dismiss row call cancel() instead of dismiss(). The row taps that start a flow still call dismiss(), so their path is unchanged. A plain dismiss listener would not work: the row tap broadcasts first and the dismiss callback would clear the flag before onDataReady reads it.

主要言語
Java
スター
162
フォーク
59
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

linkedin/shaky-android のほかの issue

linkedin/shaky-android の issue をすべて見る

似ている issue

Java の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。