-
Notifications
You must be signed in to change notification settings - Fork 472
Issue #6331: Add isDefault bool to TopSiteEntity and APIs for flagging default top sites #6715
Conversation
Codecov Report
@@ Coverage Diff @@
## master #6715 +/- ##
============================================
- Coverage 77.57% 77.38% -0.19%
+ Complexity 4748 4676 -72
============================================
Files 629 605 -24
Lines 23219 22877 -342
Branches 3418 3402 -16
============================================
- Hits 18012 17704 -308
+ Misses 3787 3755 -32
+ Partials 1420 1418 -2 Continue to review full report at Codecov.
|
@ekager When you have a chance, please take a scan of the PR and let me know if you have any feedback. In the migration of the database schema, we retroactively go back and set My hope as a next step is to add a |
Migration looks great 🙌🏻 thank you for that! This all makes sense to me, but would it also be helpful to add fun to |
@ekager Just wanted to understand your use case a bit more about having a separate method for My only worry was that we added this method and it turns out we didn't need it. In future iterations where we look at adding reordering of top sites, we would add |
@Amejia481 It will be helpful to read the first comment for more context about this PR and what we're trying to achieve. |
My thought for a use case would be sending the default top site telemetry if we needed to send the size, but just reread the telemetry ticket and it sounds like we don't actually need to send how many defaults a user has still. Nevermind! |
@Amejia481 This should be ready for review! |
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 found a couple of nits, apart from that it looks pretty good.
I tested it locally and it worked pretty well 👍 , just one thing, please open a pr on Fenix to address the TopSiteItem breaking change
components/feature/top-sites/src/main/java/mozilla/components/feature/top/sites/TopSite.kt
Outdated
Show resolved
Hide resolved
...nts/feature/top-sites/src/main/java/mozilla/components/feature/top/sites/db/TopSiteEntity.kt
Outdated
Show resolved
Hide resolved
…Is for flagging default top sites
bors r=ekager,Amejia481 |
Build succeeded: |
6767: Close #6674: Don't crash in AppLinksUsesCases with illegal Intent URI format r=csadilek a=rocketsroger 6794: GeckoView update (nightly) (20200428-140644) r=psymoon a=MickeyMoz 6795: Issue #6331: Update the generated top sites schemas r=Amejia481 a=gabrielluong This is a follow up to #6715, where the top sites schema did not regenerate after fixing the review comments. Co-authored-by: Roger Yang <[email protected]> Co-authored-by: MickeyMoz <[email protected]> Co-authored-by: Gabriel Luong <[email protected]>
Fixes #6331.
@Amejia481 Just to give you some context about the changes in this PR:
In Fenix, we have added 3 default top sites (Pocket, Wikipedia, YouTube) along with telemetry.
It is not enough to just have a hardcoded list of these 3 default top sites since we can't differentiate from the user added top sites and top sites migrated from fennec.
We want to add this isDefault boolean to each TopSiteEntity so that in telemetry we can easily just query if the top site is a default top site added by the application. On the front end, we can also sort all the isDefault top sites to the beginning when we are showing the list of top sites.
In this PR, we did the following:
Pull Request checklist
After merge