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

Userlytics feedback android #7513

Merged
merged 5 commits into from
Jan 5, 2021
Merged

Userlytics feedback android #7513

merged 5 commits into from
Jan 5, 2021

Conversation

deeppandya
Copy link
Contributor

Resolves brave/brave-browser#11939

Submitter Checklist:

  • There is a ticket for my issue.
  • Used Github auto-closing keywords in the commit message.
  • Wrote a good PR/commit description
  • 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).
  • Requested a security/privacy review as needed.

Reviewer Checklist:

  • 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:

@deeppandya deeppandya 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 Jan 3, 2021
@deeppandya deeppandya added this to the 1.20.x - Nightly milestone Jan 3, 2021
@deeppandya deeppandya self-assigned this Jan 3, 2021
* An internal version of {@link #addBookmarkSilently(Context, BookmarkModel, String, String)}.
* Will reset last used parent if it fails to add a bookmark
*/
private static BookmarkId addBookmarkInternal(
Copy link
Contributor Author

@deeppandya deeppandya Jan 4, 2021

Choose a reason for hiding this comment

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

@samartnik Created an issue to add support for static functions. brave/brave-browser#13359 so instead of adding a patch, i have copied the function here.

Copy link
Member

Choose a reason for hiding this comment

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

does that function somehow different of what we have inside BookmarkUtils.java? Why do we need to duplicate it as we can call it via that BookmarkUtils.addBookmarkInternal as it's static.

@@ -0,0 +1,153 @@
// Copyright 2020 The Chromium Authors. All rights reserved.
Copy link
Contributor

Choose a reason for hiding this comment

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

Should be our header

public BraveBookmarkUtilsClassAdapter(ClassVisitor visitor) {
super(visitor);
changeMethodOwner(
sBookmarkUtilsClassName, "addOrEditBookmark", sBraveBookmarkUtilsClassName);
Copy link
Contributor

Choose a reason for hiding this comment

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

Please add checks in testClassesExist and testMethodsExist in brave/android/javatests/org/chromium/chrome/browser/BytecodeTest.java

Copy link
Contributor

Choose a reason for hiding this comment

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

And whitelist it for tests here brave/android/java/apk_for_test.flags

changeMethodOwner(
sBookmarkUtilsClassName, "addOrEditBookmark", sBraveBookmarkUtilsClassName);
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: last empty line

<solid android:color="@color/onboarding_bg_color"/>
<stroke android:width="1dp" android:color="#E9E9F4" />
<corners android:radius="10dp"/>
</shape>
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: last empty line

},
Snackbar.TYPE_NOTIFICATION, Snackbar.UMA_BOOKMARK_ADDED)
.setSingleLine(false);
RecordUserAction.record("EnhancedBookmarks.AddingFailed");
Copy link
Member

Choose a reason for hiding this comment

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

let's remove that, it's used to track user's activity in chrome

return new SnackbarController() {
@Override
public void onDismissNoAction(Object actionData) {
RecordUserAction.record("EnhancedBookmarks.EditAfterCreateButtonNotClicked");
Copy link
Member

Choose a reason for hiding this comment

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

the same as a previous comment about RecordUserAction


@Override
public void onAction(Object actionData) {
RecordUserAction.record("EnhancedBookmarks.EditAfterCreateButtonClicked");
Copy link
Member

Choose a reason for hiding this comment

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

the same as a previous comment about RecordUserAction

Copy link
Member

@SergeyZhukovsky SergeyZhukovsky left a comment

Choose a reason for hiding this comment

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

++

Copy link
Contributor

@samartnik samartnik left a comment

Choose a reason for hiding this comment

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

lgtm

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.

[Android] UI changes to address Userlytics feedback in mobile onboarding v2
3 participants