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

[Android] Fix Load new content behaviour correctly #12852

Merged
merged 3 commits into from
Apr 5, 2022

Conversation

tapanmodh
Copy link
Contributor

Resolves brave/brave-browser#21403

Submitter Checklist:

  • I confirm that no security/privacy review is needed, or that I have requested one
  • There is a ticket for my issue
  • Used Github auto-closing keywords in the PR description above
  • Wrote a good PR/commit description
  • Squashed any review feedback or "fixup" commits before merge, so that history is a record of what happened in the repo, not your PR
  • Added appropriate labels (QA/Yes or QA/No; release-notes/include or release-notes/exclude; OS/...) to the associated issue
  • Checked the PR locally: npm run test -- brave_browser_tests, npm run test -- brave_unit_tests, npm run lint, npm run gn_check, npm run tslint
  • [] Ran git rebase master (if needed)

Reviewer Checklist:

  • A security review is not needed, or a link to one is included in the PR description
  • New files have MPL-2.0 license header
  • Adequate test coverage exists to prevent regressions
  • Major classes, functions and non-trivial code blocks are well-commented
  • Changes in component dependencies are properly reflected in gn
  • Code follows the style guide
  • Test plan is specified in PR before merging

After-merge Checklist:

Test Plan:

@tapanmodh tapanmodh added CI/skip-linux CI/skip-macos-x64 Do not run CI builds for macOS x64 CI/skip-ios Do not run CI builds for iOS labels Mar 31, 2022
@tapanmodh tapanmodh added this to the 1.38.x - Beta milestone Mar 31, 2022
@tapanmodh tapanmodh self-assigned this Mar 31, 2022
@@ -938,8 +926,6 @@ public void onClick(View v) {
new SettingsLauncherImpl();
settingsLauncher.launchSettingsActivity(
getContext(), BraveNewsPreferences.class);
mParentScrollView.getViewTreeObserver()
.removeOnGlobalLayoutListener(listener);
Copy link
Contributor

Choose a reason for hiding this comment

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

@tapanmodh yeah makes sense :)

- mParentScrollView
.getMaxScrollAmount()
+ dpToPx(getContext(), 90));
}
}
}, 300);
Copy link
Contributor

Choose a reason for hiding this comment

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

@tapanmodh did you try with 100 here?maybe it can work the same way a be a bit faster. wdyt?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

good idea. Let me try with 100 and see.

@tapanmodh tapanmodh merged commit 51331ad into master Apr 5, 2022
@tapanmodh tapanmodh deleted the load_new_content_behaviour_fix_android branch April 5, 2022 17:07
brave-builds pushed a commit that referenced this pull request Apr 7, 2022
@kjozwiak
Copy link
Member

kjozwiak commented Apr 8, 2022

Verification PASSED on Pixel 6 running Android 12 using the following build:

1.39.42 Chromium: 100.0.4896.79

Verified using the STR/Cases outlined via brave/brave-browser#21403 (comment). It's working a lot better on the phone but there's still some issues. Filed brave/brave-browser#22182 as a follow up.

screen-20220408-003237.mp4

@kjozwiak
Copy link
Member

kjozwiak commented Apr 8, 2022

Verification FAILED on Samsung Galaxy Tablet A running Android 12 using the following build:

1.39.42 Chromium: 100.0.4896.79

Verified using the STR/Cases outlined via brave/brave-browser#21403 (comment). This still doesn't seem to be working. Rather than refreshing the Brave News feed and moving the user to the top of the feed, it looks like we're moving the user on the second card rather than at the top of the feed. Created tapping on Load new content takes users to second card in feed rather than at the beginning of feed #22183 - brave/brave-browser#22183 as a follow up.

Example of this not working correctly on the tablet:

XRecorder_08042022_011228.mp4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI/skip-ios Do not run CI builds for iOS CI/skip-macos-x64 Do not run CI builds for macOS x64
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Follow up #20408] Fix Load new content behaviour correctly
3 participants