Android equivalent: https://bugzilla.mozilla.org/show_bug.cgi?id=1293710 Part of the Activity Stream UI is surfacing 'highlights' from the user's past visits. Currently there's some work underway on Desktop to revise the way they surface this through tweaks in their SQL query and weighting algorithm. At the moment on iOS, our Activity Stream panel displays 'Recent History'. This bug is to track work against implementing a new SQL query to pull the data needed for highlights. Some resources: Desktop WIP: Scoring: https://github.com/piatra/activity-stream/blob/new-highlights-query/common/recommender/Baseline.js Query: https://github.com/piatra/activity-stream/blob/b4b0fadbe27973a5df59278bdb0fb4a5e12cd00f/addon/PlacesProvider.js#L685 Tests: https://github.com/piatra/activity-stream/blob/new-highlights-query/content-test/common/Baseline.test.js Android WIP: https://reviewboard.mozilla.org/r/74968/diff/1#index_header
For phase 1 we can display recent history instead of highlights. This will let us ship AS faster and we can work on smarter highlights for phase 2.
Both Desktop  and Android  know when a bookmark was created but I can't seem to find this on iOS. The best thing I can find is the local_modified/sync_status properties that might be used to infer the creation date but doesn't seem reliable. Do we just not store this information on iOS?  https://github.com/piatra/activity-stream/blob/b4b0fadbe27973a5df59278bdb0fb4a5e12cd00f/addon/PlacesProvider.js#L700  https://dxr.mozilla.org/mozilla-central/source/mobile/android/base/java/org/mozilla/gecko/db/BrowserProvider.java#1177
At present we only store modified times. Creation time isn't present in the Sync bookmark record format, so we wouldn't be able to sync it in or out. Bug 676563. We could add it as a local column, or as a table with ON DELETE CASCADE to associate a GUID to a creation time, but of course we'd only know the creation time for bookmarks created on the local device. Android and desktop either lie, using server-clock modified timestamps, or return NULL.
Created attachment 8789024 [details] [review] Link to Github pull-request: https://github.com/mozilla/firefox-ios/pull/2084 :rnewman mind checking out my SQLite queries? I'm not the greatest at SQL and you wrote most of it in the codebase so far :)
For easier reading of the full query: https://gist.github.com/sleroux/8653b0de73f44423b3941ff61cadbaa0
Comment on attachment 8789024 [details] [review] Link to Github pull-request: https://github.com/mozilla/firefox-ios/pull/2084 See final comment on PR!