Closed Bug 1298785 Opened 8 years ago Closed 7 years ago

AS highlights: Group history by hostname

Categories

(Firefox for Android Graveyard :: General, defect, P2)

All
Android
defect

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: sebastian, Assigned: ahunt)

References

Details

(Whiteboard: [MobileAS])

Attachments

(1 file)

In bug 1293710 we added a basic query for loading "highlights" from the database. The desktop version groups history by hostname to avoid showing multiple highlights for the same domain. It is using the 'rev_host' (reversed hostname) column for that. Such a column does not exist in the mobile database.
See also Bug 1237038 (Android), Bug 1184582 (iOS).
See Also: → 1311150
Priority: P3 → P2
(Based on IRC discussion) My current plan here is to follow the iOS example of adding a domain_id column to the history table + a domains table containing the actual domains, which should allow for simple grouping as needed. (We'll probably need to add the same for bookmarks, since we also query unvisited bookmarks in the highlights query.)
Assignee: nobody → ahunt
Iteration: --- → 1.8
Priority: P2 → P1
Iteration: 1.8 → 1.9
Depends on: 1319485
I've got a very simplistic implementation to prevent multiple URLs from one domain. As far as I can tell, in the case of multiple URLs for a domain this would result in prioritising a bookmarked URL, followed by the most recently visited page for a given domain. I'm not sure what the longer term plans for highlights-generation are though so this might be good enough for now (especially if we end up using the weighted highlights algorithm from desktop, in which case we'd rewrite the queries anyways)?

The actual domain/host handling code is being added in Bug 1319485.
Comment on attachment 8809988 [details]
Bug 1298785 - Group highlights by domain

https://reviewboard.mozilla.org/r/92462/#review95240

This is based on the domain table - is this already reviewed/landed?

The desktop add-on actually groups by rev_host one level higher:
https://github.com/mozilla/activity-stream/blob/9eb9f451b553bb62ae9b8d6b41a8ef94a2e020ea/addon/PlacesProvider.js#L578
Attachment #8809988 - Flags: review?(s.kaspari) → review+
(In reply to Sebastian Kaspari (:sebastian) from comment #6)
> Comment on attachment 8809988 [details]
> Bug 1298785 - Group highlights by domain
> 
> https://reviewboard.mozilla.org/r/92462/#review95240
> 
> This is based on the domain table - is this already reviewed/landed?
> 
> The desktop add-on actually groups by rev_host one level higher:
> https://github.com/mozilla/activity-stream/blob/
> 9eb9f451b553bb62ae9b8d6b41a8ef94a2e020ea/addon/PlacesProvider.js#L578
I'm still working on the domain table (Bug 1319485). It's mostly done, but waiting for review, and I still need to add a few more tests to ensure everything is working as expected.

I.e. it's going to be at least a few more days before the domain table lands.
Iteration: 1.9 → 1.10
Iteration: 1.10 → 1.11
Iteration: 1.11 → 1.12
Iteration: 1.12 → 1.13
Priority: P1 → P2
Iteration: 1.13 → ---
This won't be needed anymore: With the new algorithm (bug 1312016) we explicitly want to select items with the same host, rank them and then remove the ones that have a low score. So we won't need to filter them as part of the query.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → WONTFIX
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: