-
Notifications
You must be signed in to change notification settings - Fork 224
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
Add an API to get the top frecent sites #3144
Conversation
@linacambridge This should be ready for review. I don't have permissions to request reviews. |
A bit of a drive-by - I don't think the name |
Totally understandable. Some of the options and naming that were used here originated from prior art of NewTabUtils.jsm#getTopFrecentSites https://searchfox.org/mozilla-central/rev/fc91a093e40dde71d10ad219946b8ae775aca9eb/toolkit/modules/NewTabUtils.jsm#1279-1284,1367-1390. I don't personally feel too strongly about adding this as part of the API. My main concern was that Let me know if this additional information changes your thoughts on the API, happy to make any changes to it and get some additional eyes on this APi. Thanks! |
My main concern is that if Fenix starts specifying a frecency of (say) 200 to avoid this problem, it means we will be largely unable to ever change the algorithm - and we certainly want to reserve the right to change it (eg, see #610) Indeed, this would argue for never actually returning the frecency - if we return the value it's inevitable that it will end up with meaning. I wonder if we should just return the order? While I don't see that behaviour on a fresh profile as an actual problem, if we really do want to prevent that, I guess there are a couple of options:
@lina probably has opinions here and I'll be happy to defer to them, so let's see what she says tomorrow. |
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.
This looks great, modulo comments about hiding the frecency threshold param. Thanks so much for working on this, @gabrielluong!
components/places/android/src/main/java/mozilla/appservices/places/PlacesConnection.kt
Outdated
Show resolved
Hide resolved
components/places/android/src/main/java/mozilla/appservices/places/PlacesConnection.kt
Outdated
Show resolved
Hide resolved
components/places/android/src/main/java/mozilla/appservices/places/PlacesConnection.kt
Outdated
Show resolved
Hide resolved
Thanks for the reviews and comments. I will make the changes to remove the frecency params before asking for this to land. |
The pull request has been modified, dismissing previous reviews.
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.
Fixes #2163
Pull Request checklist
automation/all_tests.sh
runs to completion and produces no failures[ci full]
to the PR title.