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 #1762, #2704: Highlight Correct MenuItem after cancelling ExitProfileDialog #2671

Conversation

prayutsu
Copy link
Contributor

@prayutsu prayutsu commented Feb 9, 2021

Explanation

Fixes #1762, and fixes #2704 -
Navigation Drawer now highlights the correct menu Item after canceling the ExitProfileDialog, and also after pressing the back button (when some activity is opened from the navigation drawer).

Manual testing video -
https://user-images.githubusercontent.com/54636525/107812250-6ceda380-6d95-11eb-9d46-5dafb44838c2.mp4

Tests passing on ESPRESSO-
Screenshot from 2021-02-15 10-38-39

New test cases being ignored on Robolectric-
Screenshot from 2021-02-13 15-10-46

Checklist

  • The PR title starts with "Fix #bugnum: ", followed by a short, clear summary of the changes. (If this PR fixes part of an issue, prefix the title with "Fix part of #bugnum: ...".)
  • The PR explanation includes the words "Fixes #bugnum: ..." (or "Fixes part of #bugnum" if the PR only partially fixes an issue).
  • The PR follows the style guide.
  • The PR does not contain any unnecessary auto-generated code from Android Studio.
  • The PR is made from a branch that's not called "develop".
  • The PR is made from a branch that is up-to-date with "develop".
  • The PR's branch is based on "develop" and not on any other branch.
  • The PR is assigned to an appropriate reviewer in both the Assignees and the Reviewers sections.

@prayutsu prayutsu changed the title Fix #1816: Highlight Correct MenuItem after cancelling ExitProfileDialog Fix #1762: Highlight Correct MenuItem after cancelling ExitProfileDialog Feb 9, 2021
@prayutsu
Copy link
Contributor Author

prayutsu commented Feb 9, 2021

Screenrecorder-2021-02-09-21-20-49-293.mp4

Now we are facing only 1 bug-

  1. Go to Administrator Controls
  2. Open NavDrawer and click on Switch Profile
  3. Change the configuration of the device
  4. The Switch Profile Item gets unchecked and Administrator Controls gets checked.

@BenHenning
Copy link
Member

Honestly from a user perspective I think this looks quite solid @prayutsu. The scenario you described is quite an edge case, and I'm not even sure it can be considered a bug. It does have slight inconsistency with the other configuration change scenarios, but it still seems arguably 'correct' in the context in which it's observed (e.g. you're still in the admin controls page).

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 @prayutsu. This is definitely moving toward the right solution. Just have a few specific thoughts on the exact mechanism being built into the navigation drawer presenter. PTAL.

@BenHenning BenHenning assigned prayutsu and unassigned BenHenning Feb 10, 2021
@vinitamurthi vinitamurthi removed their assignment Feb 15, 2021
Copy link
Contributor

@rt4914 rt4914 left a comment

Choose a reason for hiding this comment

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

@prayutsu Just found another issue filing this and do not solve this in this PR. #2728

Thanks.

model/src/main/proto/arguments.proto Outdated Show resolved Hide resolved
Copy link
Contributor

@rt4914 rt4914 left a comment

Choose a reason for hiding this comment

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

Forgot about my suggestions because of issue filing. Blocking this PR for nit changes.

@rt4914 rt4914 assigned prayutsu and chrk2205 and unassigned rt4914 Feb 15, 2021
… highlight-correct-item-after-cancelling-exit-profile-dialog
@prayutsu prayutsu assigned rt4914 and unassigned prayutsu Feb 15, 2021
Copy link
Contributor

@rt4914 rt4914 left a comment

Choose a reason for hiding this comment

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

LGTM, thanks.

@rt4914 rt4914 removed their assignment Feb 15, 2021
Copy link
Contributor

@anandwana001 anandwana001 left a comment

Choose a reason for hiding this comment

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

LGTM

@anandwana001 anandwana001 removed their assignment Feb 16, 2021
@prayutsu
Copy link
Contributor Author

[If @chrk2205 do not have any suggestions, then @anandwana001 can merge this PR.

Copy link
Contributor

@chrk2205 chrk2205 left a comment

Choose a reason for hiding this comment

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

LGTM

@chrk2205 chrk2205 removed their assignment Feb 16, 2021
@prayutsu
Copy link
Contributor Author

Thanks, everyone for reviewing the PR!!

@rt4914
Copy link
Contributor

rt4914 commented Feb 16, 2021

@BenHenning and @anandwana001 Some Optional tests are failing so should be merge in this case or not?

@BenHenning
Copy link
Member

@rt4914 Optional tests can be partly ignored (which is why they're being kept optional). We don't need to block submission on them yet, but we should ensure new breakages are fixed in PRs where we can spot them. This isn't as perfect as requiring the tests yet, but we will need to wait a few weeks before we can mark them as required.

@BenHenning
Copy link
Member

The failures seem like known flakes that are outside our codebase & need more investigating, plus one apparent issue with the compute affected targets PR process: https://github.com/oppia/oppia-android/pull/2671/checks?check_run_id=1908497857. Adding this to #2691.

@BenHenning BenHenning enabled auto-merge (squash) February 17, 2021 04:44
@BenHenning
Copy link
Member

Re-running with latest develop & enabling auto-merge.

@BenHenning BenHenning merged commit e7ed2c0 into oppia:develop Feb 17, 2021
@prayutsu prayutsu deleted the highlight-correct-item-after-cancelling-exit-profile-dialog branch February 17, 2021 05:14
@rt4914
Copy link
Contributor

rt4914 commented Feb 17, 2021

@BenHenning Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incorrect highlighting in Drawer items NavigationDrawer cancel switch profile always mark home
6 participants