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

End of Year: Add modal structure #413

Merged
merged 4 commits into from
Oct 19, 2022
Merged

Conversation

ashiagr
Copy link
Contributor

@ashiagr ashiagr commented Oct 18, 2022

📘 Project: #410

This PR adds a Compose modal bottom sheet that prompts the user to check their End of Year. Design (and tablet) is not covered in this task and will be done in a future PR.

To test

  1. Set END_OF_YEAR_ENABLED feature flag to true in base.gradle
  2. Run the app
  3. ✅ Check that a bottom sheet appears with two buttons: "View My 2022" and "Not Now"
  4. ✅ Tap "Not Now" and ensure the bottom sheet collapses
  5. Re-run the app
  6. When the bottom sheet appears, tap "View My 2022"
  7. ✅ Ensure that nothing happens ("View My 2022" is not yet connected to any screen)
  8. Rotate the device to landscape mode
  9. ✅ Ensure that modal bottom sheet does not collapse and spreads to landscape mode
  10. Rotate the device to portrait mode and tap outside the modal view
  11. ✅ Ensure that modal bottom sheet collapses
  12. Re-run the app
  13. When the bottom sheet appears, perform a back gesture or press device back button
  14. ✅ Ensure that modal bottom sheet collapses
  15. Perform a back gesture or press device back button again
  16. ✅ Ensure that app goes to background

Checklist

  • Should this change be included in the release notes? If yes, please add a line in CHANGELOG.md N/A
  • Have you tested in landscape?
  • Have you tested accessibility with TalkBack?
  • Have you tested in different themes?
  • Does the change work with a large display font?
  • Are all the strings localized? - Added to strings xml
  • Could you have written any new tests? N/A
  • Did you include Compose previews with any components?

@ashiagr ashiagr requested a review from a team as a code owner October 18, 2022 11:40
@ashiagr ashiagr mentioned this pull request Oct 18, 2022
35 tasks
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.launch

@OptIn(ExperimentalMaterialApi::class)
Copy link
Contributor Author

@ashiagr ashiagr Oct 18, 2022

Choose a reason for hiding this comment

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

I've used ModalBottomSheetLayout which is experimental right now and I had to opt-in for ExperimentalMaterialApi. It made things really simple, I also tested it works on older Android versions (API level 23). But let me know if it's a deal breaker.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think that's fine. With compose still relatively young I don't think we should be too hesitant about using experimental apis when they make sense because a lot of fairly fundamental stuff still seems to be experimental.

Copy link
Contributor

@mchowning mchowning left a comment

Choose a reason for hiding this comment

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

Looks good! I'm excited that you're starting in on the EOY project. 😄

@ashiagr ashiagr merged commit adc8af9 into main Oct 19, 2022
@ashiagr ashiagr deleted the task/410-add-modal-structure branch October 19, 2022 11:00
@ashiagr ashiagr mentioned this pull request Oct 20, 2022
4 tasks
@ashiagr ashiagr added this to the 7.27 ❄️ milestone Nov 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants