Shaky skips the feedback form after the bottom sheet was dismissed

Open Beginner friendly
#103 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
78/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
android, java
Domain
mobile

Research direction

Read the delegate's launchShakeBottomSheet, which sets isBottomSheetFlowActive = true, then onDataReady/doStartFeedbackFlow where the flag is only cleared after a submitted sheet flow, and the Dismiss row handler in the bottom sheet. Reproduce with the sample app: "Manually launch bottom sheet", "Dismiss", then "Manually start feedback". Done means the sheet's OnCancelListener clears the flag, the Dismiss row calls cancel(), flow-starting rows still call dismiss(), and the manual flow reaches FeedbackActivity.

Written by the indexing model from the issue text.

Description

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.

Dominant language
Java
Stars
162
Forks
59
PR merge metrics
No merged PRs in 30d

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from linkedin/shaky-android

All issues in linkedin/shaky-android

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.