For #15402: Hide ETP pop-up if the toolbar is not visible #15667
Conversation
No Taskcluster jobs started for this pull requestThe `allowPullRequests` configuration for this repository (in `.taskcluster.yml` on the
default branch) does not allow starting tasks for this pull request. |
app/src/main/java/org/mozilla/fenix/trackingprotection/TrackingProtectionOverlay.kt
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for looking into this!
For a complete fix we need the same issue also resolved for when the toolbar is set at top (to know about this I think you can use a AppBarLayout.OnOffsetChangedListener)
Changes after which TrackingProtectionOverlayTest will probably need to be updated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The issue with adding the listener would be there's already one added for the app bar in BrowserToolbarView.kt.
fenix/app/src/main/java/org/mozilla/fenix/components/toolbar/BrowserToolbarView.kt
Line 107 in ad2b99f
app_bar.addOnOffsetChangedListener(offsetChangedListener) |
So, I checked the parent of the toolbar instead.
app/src/main/java/org/mozilla/fenix/trackingprotection/TrackingProtectionOverlay.kt
Outdated
Show resolved
Hide resolved
Thank you! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I agree with you that the code couldn't be easily read. I found a property to check the toolbar's position in Settings class and included it in the check because it appeared more readable. Thanks for your help.
app/src/main/java/org/mozilla/fenix/trackingprotection/TrackingProtectionOverlay.kt
Outdated
Show resolved
Hide resolved
Thank you! One small thing related to a safe cast to be resolved and then I'll merge this. |
bors try |
tryBuild succeeded: |
@sijanr
Can you please check and update the patch? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should fix the ktlint errors
bors try |
tryBuild succeeded: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thanks for pushing through with this!
bors r=Mugurell |
👎 Rejected by label |
bors r=Mugurell |
15667: For #15402: Hide ETP pop-up if the toolbar is not visible r=Mugurell a=sijanr ![ETP](https://user-images.githubusercontent.com/47872289/95005944-269c6280-05b3-11eb-870e-4bd2ef90bf79.gif) ### Pull Request checklist <!-- Before submitting the PR, please address each item --> - [ ] **Tests**: This PR includes thorough tests or an explanation of why it does not - [x] **Screenshots**: This PR includes screenshots or GIFs of the changes made or an explanation of why it does not - [ ] **Accessibility**: The code in this PR follows [accessibility best practices](https://github.com/mozilla-mobile/shared-docs/blob/master/android/accessibility_guide.md) or does not include any user facing features. In addition, it includes a screenshot of a successful [accessibility scan](https://play.google.com/store/apps/details?id=com.google.android.apps.accessibility.auditor&hl=en_US) to ensure no new defects are added to the product. ### To download an APK when reviewing a PR: 1. click on Show All Checks, 2. click Details next to "Taskcluster (pull_request)" after it appears and then finishes with a green checkmark, 3. click on the "Fenix - assemble" task, then click "Run Artifacts". 4. the APK links should be on the left side of the screen, named for each CPU architecture Co-authored-by: sijanr <sijan1.rijal@gmail.com>
Codecov Report
@@ Coverage Diff @@
## master #15667 +/- ##
============================================
+ Coverage 29.79% 29.80% +0.01%
- Complexity 1180 1182 +2
============================================
Files 452 452
Lines 18394 18401 +7
Branches 2376 2381 +5
============================================
+ Hits 5481 5485 +4
- Misses 12525 12528 +3
Partials 388 388
Continue to review full report at Codecov.
|
Pull Request checklist
To download an APK when reviewing a PR: