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

[Desktop] Top sites on New Tab Page are missing #11500

Closed
MikeScotty opened this issue Aug 28, 2020 · 24 comments · Fixed by brave/brave-core#6584
Closed

[Desktop] Top sites on New Tab Page are missing #11500

MikeScotty opened this issue Aug 28, 2020 · 24 comments · Fixed by brave/brave-core#6584

Comments

@MikeScotty
Copy link

MikeScotty commented Aug 28, 2020

Test plan

See brave/brave-core#6584

Description

The top sites disappear after closing and opening brave

Steps to Reproduce

  1. Browse a website until it comes up in the top sites list
  2. Pin the site in the top sites list
  3. Close then reopen brave

Actual result:

Top sites are gone

Expected result:

Top sites remain where they #were

Reproduces how often:

Easily reproduced

Brave version (brave://version info)

1.13.82 Chromium: 85.0.4183.83 (Official Build) (64-bit)

Version/Channel Information:

  • Can you reproduce this issue with the current release? Yes
  • Can you reproduce this issue with the beta channel? N/A
  • Can you reproduce this issue with the nightly channel? N/A

Other Additional Information:

  • Does the issue resolve itself when disabling Brave Shields? N/A
  • Does the issue resolve itself when disabling Brave Rewards? N/A
  • Is the issue reproducible on the latest version of Chrome? Yes

Miscellaneous Information:

I also have brave set to delete history after closing the app but that never caused the top sites to disappear before

@themew
Copy link

themew commented Aug 28, 2020

Seeing this as well in 1 out of 3 desktop linux machines. Top sites, even toggled on and off have disappeared.

@rebron
Copy link
Collaborator

rebron commented Aug 31, 2020

cc: @simonhong

@rebron rebron added priority/P2 A bad problem. We might uplift this to the next planned release. feature/new-tab labels Aug 31, 2020
@simonhong
Copy link
Member

@MikeScotty The fix for #9929 is landed in stable(1.13).
With this fix, sites that cleared from history will be deleted from top site in NTP because top sites data is generated from history service.
I think we need to provide the way to add sites to top sites tiles in NTP manually and these manually added sites should be managed differently from sites comes from top sites history.

@bsclifton
Copy link
Member

bsclifton commented Sep 1, 2020

We definitely have some work to do on new tab page ☹️ A while back, @karenkliu had worked with @rebron, @bradleyrichter, and others to put together a spec for new tab page enhancements, specifically with top site tiles (specifically being able to add)

I think the right solution here might be to match the logic Chromium has:

  • New profile is in My shortcuts mode
  • By default My shortcuts mode will query topsites API and show those results. If there are less than 6 (or whatever maximum number is), show an Add site button
  • If user never touches the tiles (ex: deletes or moves), they will continue to match the output from the topsites API
  • As soon as user touches the tiles, topsites API is not called anymore
  • Allow an option to switch back to the topsites API (Most visited sites)

We might be able to get all of this logic for free. You can demo yourself by visiting brave://new-tab-page which is the Chromium new tab page and compare this to what Brave is showing. Since our page is React, we might have some implementation work to do- but I think the polymer code is storing the custom tiles as a profile preference. We can make those same calls and eliminate the janky code that we have in place (using Redux)

@rebron @karenkliu WDYT? 😄

@bsclifton bsclifton changed the title [Desktop] Where the heck are my top sites??? [Desktop] Top sites on New Tab Page are missing Sep 1, 2020
@karenkliu
Copy link

@bsclifton Yep - this is pretty much what we had planned in top sites spec and it's just been waiting to be implemented. I agree with most of what you said, except these two points:

  • By default My shortcuts mode will query topsites API and show those results. If there are less than 6 (or whatever maximum number is), show an Add site button
  • If user never touches the tiles (ex: deletes or moves), they will continue to match the output from the topsites API

In our spec, we've defined that the default top sites behavior is shown by frecency until the user indicates they would like to customize their shortcuts themselves instead of having it be shown automatically by Brave (this is the way it works in Chrome as well).

While the top sites are shown by frecency, there is a maximum of 6 tiles displayed. But no matter how many displayed, the Add site function is available to the user. Once they add a site, the top sites behavior switches from frecency to user-curated.

Along with that user action, these are the other actions that causes the top sites behavior to switch from frecency to user-curated:

  • Adds a new site with their own URL or picks from auto-populated suggestions. The user can add unlimited top site tiles; we have UI to handle this.
  • Edits a frequently visited site and puts in a site of their own choosing
  • Deletes any of the frequently visited sites
  • Reorders a site by dragging and dropping

@bsclifton
Copy link
Member

Working through a proof of concept on this. I currently have the NTP showing the same results as Chromium (deleting all of the bug ridden custom code we have for maintaining this list and allowing pinning, etc). Fully matching the Chromium behavior should be quite easy and would be a nice cleanup (will fix a LOT of bugs)

Very early preview work in progress branch viewable here:
https://github.com/brave/brave-core/compare/bsc-top-sites-rework

Will continue to check this out. Thanks for your patience folks 😄

@bsclifton
Copy link
Member

If I finish the work on this branch (above), it should fix:

and then it makes future work easier

@MikeScotty
Copy link
Author

So you're saying that in the next version of brave will those problems fixed?

@bsclifton
Copy link
Member

@MikeScotty I can't promise a version, but I am working through this and will try to finish ASAP

@MikeScotty
Copy link
Author

@bsclifton ok

bsclifton added a commit to brave/brave-core that referenced this issue Oct 6, 2020
- Move gridSiteState to sessionStorage (not localStorage) and default value for "use custom links".
  Includes cleanup of previous localStorage value (if user has one).
  sessionStorage seems to be persisted between tabs and should be cleaned
  up when browser is closed.
- X to remove tiles is now right aligned
- Update top sites mode/visible setting when NTP gets updates
- Fixed disabled icon showing when tiles are movable (condition was reversed)
- Title case the new preference (to match existing preference)

And of course, closing keywords for this PR:
Fixes brave/brave-browser#11500
Fixes brave/brave-browser#9788
Fixes brave/brave-browser#9457
Fixes brave/brave-browser#11551
@bsclifton bsclifton added this to the 1.17.x - Nightly milestone Oct 7, 2020
@GeetaSarvadnya
Copy link

GeetaSarvadnya commented Oct 29, 2020

Verification passed on

Brave | 1.17.53 Chromium: 86.0.4240.111 (Official Build) dev (64-bit)
-- | --
Revision | b8c36128a06ebad76af51591bfec980224db5522-refs/branch-heads/4240@{#1290}
OS | Windows 10 OS Version 1903 (Build 18362.1139)


Verified passed with

Brave	1.17.69 Chromium: 87.0.4280.60 (Official Build) (x86_64)
Revision	12697cfeb273d7de95cf9b18350d2c457f58224c-refs/branch-heads/4280@{#1352}
OS	macOS Version 10.14.6 (Build 18G6042)

Verified test plan from brave/brave-core#6584
Testing notes can be found under #9457 (comment)
Additional notes that may be helpful: there is no more pinning top site tiles with 1.17.x. Additionally, modifications to top site tiles made with 1.16.x (and before) are not retained when upgrading to 1.17.x.

@SXMacdara
Copy link

Has this actually been fixed?

@MikeScotty
Copy link
Author

@SXMacdara Nope. The problem is still there.

@SXMacdara
Copy link

@MikeScotty why is this closed if the issue is not fixed?

@MikeScotty
Copy link
Author

@SXMacdara I have no idea. Maybe because it's been added to the to-do list?

@bsclifton
Copy link
Member

@MikeScotty this will roll out with the 1.17 release which is due to be released today. It's already fixed in Beta and Nightly

@SXMacdara
Copy link

SXMacdara commented Nov 19, 2020 via email

@MikeScotty
Copy link
Author

I have version 1.17.73 and the problem is STILL occurring. JSYK I'm using linux mint 20.

@SXMacdara
Copy link

@bsclifton I am hoping you are the right person to address about this. I guess I am unsure as to why this is closed. I have the latest version of Brave V1.17.73. Top Sites is not fixed. In this latest version you can't even pin or rearrange your Top Sites anymore. Whatever was done in the way of improvement didn't work. At also appears as if the reviewer above has stated that from their perspective/experience this has not been fixed on their end either.

@bsclifton
Copy link
Member

bsclifton commented Nov 23, 2020

@SXMacdara the not being able to move will be addressed with #7493, which also will allow for adding your own top sites. This is the next work I'll be looking at. Are you experiencing a problem with sites missing?

@MikeScotty I can create a new issue for the problem you're experiencing. After updating to 1.17.73, you're seeing the top sites shown on new tab page be removed every time you quit/relaunch? If this is the case, can you please check to see if you have browsing history clearing on exit? You can see this on brave://settings/clearBrowserData under On exit tab. If history is cleared, I am not sure if there is a way to keep the top sites

Basically, the behavior should be matching Chromium completely now (well, except that Brave is missing customize feature which Chromium has, captured with #7493). You can test which tiles Chrome would show by visiting brave://new-tab-page and you should see the same tiles there

@MikeScotty
Copy link
Author

@bsclifton I have brave set to delete history when the app closes. And as for that new tab, I don't use google. Maybe make something like that except with duckduckgo or qwant?

@bsclifton
Copy link
Member

@MikeScotty you don't have to use Google - you can open brave://new-tab-page in Brave and just verify the same thing shows for you there (should be the same as brave://newtab)

@MikeScotty
Copy link
Author

Is this problem likely to be fixed?

@bsclifton
Copy link
Member

@MikeScotty we just landed a new top sites experience in Nightly which you can check out - I'm curious if this works any better. It should now have the customize mode which may persist after history is cleared. If you're on release channel, it'll be working it's way down on April 13th

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

Successfully merging a pull request may close this issue.

9 participants