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

Hide topsite customization option till we have add shortcut feature #7105

Merged
merged 1 commit into from
Nov 12, 2020

Conversation

simonhong
Copy link
Member

@simonhong simonhong commented Nov 10, 2020

Resolves brave/brave-browser#12378
Resolves brave/brave-browser#12354

image

Submitter Checklist:

Test Plan:

A. Check customization toggle is hidden always.

B. Check most visited sites mode is on by default

  1. Launch browser with clean profile
  2. Load brave://prefs-internals/
  3. check use_most_visited_tiles is set to true.

C. npm run test brave_browser_tests -- --filter=BraveProfilePrefsBrowserTest.*

Reviewer Checklist:

  • New files have MPL-2.0 license header.
  • Request a security/privacy review as needed.
  • Adequate test coverage exists to prevent regressions
  • Verify test plan is specified in PR before merging to source

After-merge Checklist:

  • The associated issue milestone is set to the smallest version that the
    changes has landed on.
  • All relevant documentation has been updated.

@simonhong simonhong self-assigned this Nov 10, 2020
@simonhong simonhong force-pushed the ntp_topsites branch 3 times, most recently from 4879cd7 to c61ae03 Compare November 11, 2020 11:32
@simonhong simonhong added CI/skip-ios Do not run CI builds for iOS CI/skip-linux CI/skip-macos-x64 Do not run CI builds for macOS x64 labels Nov 11, 2020
#if !defined(OS_ANDROID)
// Turn on most visited mode on NTP by default.
// We can turn customization mode on when we have add-shortcut feature.
registry->SetDefaultPrefValue(prefs::kNtpUseMostVisitedTiles,
Copy link
Member

Choose a reason for hiding this comment

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

This value might be getting overridden by Chromium (I'm not 100% sure)

Basically in https://github.com/brave/brave-core/blob/master/components/brave_new_tab_ui/containers/newTab/gridSites.tsx#L78, the tile is becoming draggable. If you drag this tile, it does actually move it and then it seems to activate custom links mode

Copy link
Member

Choose a reason for hiding this comment

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

After troubleshooting, I re-ran npm run init for this branch and built... and it worked perfectly 😄 I believe the problem was on my side. Everything looks great!

@simonhong simonhong removed CI/skip-ios Do not run CI builds for iOS CI/skip-linux CI/skip-macos-x64 Do not run CI builds for macOS x64 labels Nov 12, 2020
Copy link
Member

@bsclifton bsclifton left a comment

Choose a reason for hiding this comment

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

Works perfect! Nice and easy solution

@kjozwiak
Copy link
Member

kjozwiak commented Nov 17, 2020

Verification PASSED on macOS 10.15.7 x64 using the following build:

Brave | 1.19.13 Chromium: 87.0.4280.60 (Official Build) nightly (x86_64)
-- | --
Revision | 12697cfeb273d7de95cf9b18350d2c457f58224c-refs/branch-heads/4280@{#1352}
OS | macOS Version 10.15.7 (Build 19H2)

Case A

Ensured that the Customize Top Sites toggle under the Customization modal as been removed as per the following:

Screen Shot 2020-11-17 at 11 01 03 AM

Case B

Ensured that use_most_visited_tiles is set as true under brave://prefs-internals as per the following:

Screen Shot 2020-11-17 at 11 01 25 AM

However, I did run into brave/brave-browser#12739 while attempting to verify brave/brave-browser#12378. I think there's still some issues there re: re-adding websites into Top Sites once they've been removed.

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.

Top sites are not re-added once all the top sites are removed Enable customise top tiles hide it completely
3 participants