Closed Bug 965437 Opened 8 years ago Closed 8 years ago

[New Tab Page] Determine tile behavior when users delete tiles on First Run

Categories

(Firefox :: General, defect)

defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 975213

People

(Reporter: Mardak, Unassigned)

Details

Attachments

(1 file)

For new profiles, most tiles will be blank and aren't useful to users. We can put something more useful.

Code pointers:
browser (rendering) new tab related code is here http://mxr.mozilla.org/mozilla-central/source/browser/base/content/newtab/
various files are #included from http://mxr.mozilla.org/mozilla-central/source/browser/base/content/newtab/newTab.js
the data comes from http://mxr.mozilla.org/mozilla-central/source/toolkit/modules/NewTabUtils.jsm
in particular http://mxr.mozilla.org/mozilla-central/source/toolkit/modules/NewTabUtils.jsm#550 Links object has a _provider: PlacesProvider
where PlacesProvider.getLinks does a PlacesUtils.history query sorted by frecency desc

Ideas
- insert some default places that happen to be ranked high enough on a new profile
- augment PlacesProvider
- augment Links (might be useful down the line for retaining 1 tile)

A note about the default places approach is nsINavHistoryQuery currently only includes visited pages (unless we search for something by annotation). Although having a separate piece of logic to combine places-frecency items with "other" data sources would work by detecting if there's fewer than 9 entries then adds some more. Although it then gets tricky with some ordering issues as random page visits would definitely kick out the "other."
http://mxr.mozilla.org/mozilla-central/source/toolkit/modules/NewTabUtils.jsm#511

PlacesProvider could be modified to include the frecency of the page with row.getResultByIndex(12) then Links can use that signal to place "other" content above frecency <= 100 or some threshold.
Fennec has a similar bug 966129 that we should keep in mind especially for shared server pieces.
Whiteboard: p=0
(In reply to Edward Lee :Mardak from comment #1)
> PlacesProvider could be modified to include the frecency of the page with
> row.getResultByIndex(12)

The patch I'm working on in bug 911307 does that FWIW.
Attached image sponsored tiles mock v1
AliceWyman mentioned in  https://support.mozilla.org/en-US/forums/contributors/709999?last=57428#post-57427 

wondering which are the sponsored links? Are they the ones with the yellow arrow at the right bottom corner of Facebook, Amazon, and Yahoo? If so, how about labeling them?
Blocks: 972913
Summary: [New Tab Page] Populate tab tiles if they would be empty otherwise → [New Tab Page] Determine tile behavior when users delete tiles on First Run
Just to clarify the purpose of this bug - 

When users first download Firefox, they'll see a filled tile grid.  If they delete a few tiles, we'd like to populate those missing tiles with other tiles.

This bug should clarify how many tiles we should fill when users delete them, and what should happen when all of those "extra" tiles are used up.
Fyi, you just repurposed this bug to be the first part of Bug 975213 - Decide behavior of user removing/dragging Top/Sponsored Tiles. Should I repurpose that bug to be just the behavior of dragging (i.e., pinning tile to a new spot)
Do we have another bug covering comment 0? I don't think we need to distinguish this (now-morphed) bug from bug 975213, so we should either un-morph or dupe this, I think.
(In reply to :Gavin Sharp (email gavin@gavinsharp.com) from comment #8)
> Do we have another bug covering comment 0?
Yes. This bug was filed before the [story] bug 972913 which has been broken down to bug 975210, bug 975211, bug 975228 for engineering tasks.

> I don't think we need to distinguish this (now-morphed) bug from bug 975213
Agreed. Duping.
No longer blocks: fxdesktopbacklog, 972913
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 975213
Whiteboard: p=0
You need to log in before you can comment on or make changes to this bug.