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

Fix #4294: Profile successfully deleted message #4488

Closed
wants to merge 6 commits into from

Conversation

mbobiosio
Copy link

Explanation

Fix #4294

This pull request introduces a MaterialAlertDialog after profile is successfully deleted.

What I have done here is to introduce MaterialAlertDialogBuilder extension to efficiently handle alert dialogs across the app.
On successful response to delete a profile, I show this alert dialog to notify the user that this action was successful.

User is required to click OK to continue.

Issues
I'm still trying to get tests running on my local machine, but I've tested manually and attached screencast. Please review the technical approach

Essential Checklist

  • The PR title and explanation each start with "Fix #bugnum: " (If this PR fixes part of an issue, prefix the title with "Fix part of #bugnum: ...".)
  • Any changes to scripts/assets files have their rationale included in the PR explanation.
  • The PR follows the style guide.
  • The PR does not contain any unnecessary code changes from Android Studio (reference).
  • The PR is made from a branch that's not called "develop" and is up-to-date with "develop".
  • The PR is assigned to the appropriate reviewers (reference).

For UI-specific PRs only

If your PR includes UI-related changes, then:

  • Add screenshots for portrait/landscape for both a tablet & phone of the before & after UI changes
  • For the screenshots above, include both English and pseudo-localized (RTL) screenshots (see RTL guide)
  • Add a video showing the full UX flow with a screen reader enabled (see accessibility guide)
  • Add a screenshot demonstrating that you ran affected Espresso tests locally & that they're passing

Copy link
Member

@BenHenning BenHenning left a comment

Choose a reason for hiding this comment

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

Thanks @mbobiosio! I left one initial thought regarding the approach--please take a look.

Comment on lines +12 to +15
fun Context.alertDialog(
@StyleRes style: Int = 0,
dialogBuilder: MaterialAlertDialogBuilder.() -> Unit
) {
Copy link
Member

Choose a reason for hiding this comment

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

I like where you're going with this. I think my main hesitation is that we've historically preferred using dialog fragments to host alert dialogs since it both gives us more control over the dialog's lifecycle (i.e. we can ensure that the dialog is shown synchronously via a transaction rather than asynchronously) and it provides more flexibility in centralizing the theme & style of the dialog (though I suppose we can do the same here via a central pattern).

Do you think there would be a way to generalize our alert dialogs over to a central dialog fragment, instead? I'm not sure if there's actually a potential for simplification there, but I think that's the approach we'd want to consider (and move away from alert dialogs entirely where they're only created in a single, general dialog fragment).

@BenHenning BenHenning assigned mbobiosio and unassigned BenHenning Aug 3, 2022
@oppiabot
Copy link

oppiabot bot commented Aug 10, 2022

Hi @mbobiosio, I'm going to mark this PR as stale because it hasn't had any updates for 7 days. If no further activity occurs within 7 days, it will be automatically closed so that others can take up the issue.
If you are still working on this PR, please make a follow-up commit within 3 days (and submit it for review, if applicable). Please also let us know if you are stuck so we can help you!

@oppiabot oppiabot bot added the stale Corresponds to items that haven't seen a recent update and may be automatically closed. label Aug 10, 2022
@oppiabot oppiabot bot closed this Aug 17, 2022
@BenHenning
Copy link
Member

@mbobiosio are you still working on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale Corresponds to items that haven't seen a recent update and may be automatically closed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

After deleting a profile, Deleted successfully message should be displayed
2 participants