Closed
Bug 1025829
Opened 11 years ago
Closed 11 years ago
[Single Variant] Top Sites are not ordered correctly
Categories
(Firefox OS Graveyard :: Gaia::Browser, defect)
Tracking
(blocking-b2g:2.0+, b2g-v2.0 fixed, b2g-v2.1 fixed)
People
(Reporter: rafael.marquez, Assigned: albert)
References
Details
(Whiteboard: [systemsfe])
Attachments
(1 file)
*Pre-requisites
topsites_movistar.json:
{
"topSites": [
{
"title": "Movistar",
"uri": "http://www.movistar.es/",
"iconPath": "resources/movistar.ico"
},
{
"title": "Betis",
"uri": "http://www.realbetisbalompie.es/es/",
"iconPath": "resources/pig.ico"
},
{
"title": "Marca",
"uri": "http://www.marca.com/",
"iconPath": "resources/pig.ico"
},
{
"title": "As",
"uri": "http://as.com/",
"iconPath": "resources/movistar.ico"
}
]
}
*Procedure
1. Complete the FTE with a configured sim card
2. Open browser app
*Expected Result
Top Sites are ordered correctly: Movistar, Betis, Marca and AS
*Actual Result
Top Sites are not ordered correctly: Betis, Movistar, Marca and AS
Reporter | ||
Updated•11 years ago
|
blocking-b2g: --- → 2.0?
Whiteboard: [systemsfe]
Assignee | ||
Updated•11 years ago
|
Assignee: nobody → acperez
Assignee | ||
Comment 1•11 years ago
|
||
Currently database returns elements with same frequency sorted alphabetically in inverse order.
Assignee | ||
Comment 2•11 years ago
|
||
Used negative values to sort topsites.
Attachment #8440785 -
Flags: review?(bfrancis)
Updated•11 years ago
|
blocking-b2g: 2.0? → 2.0+
Comment 3•11 years ago
|
||
Comment on attachment 8440785 [details]
Patch
R+ with nits and failing tests fixed, thanks.
Attachment #8440785 -
Flags: review?(bfrancis) → review+
Updated•11 years ago
|
Target Milestone: --- → 2.0 S4 (20june)
Assignee | ||
Comment 4•11 years ago
|
||
Comment on attachment 8440785 [details]
Patch
Sorry for requesting review again Ben, but I had to modify some code because travis error was produced by a race condition. When opening the database first time callback is called before database is populated and this was causing the error.
Updated patch simplifies single variant population, instead of search default topsites in the database before saving the single variant ones, I assign a frequency of -20 (max history) to the default topsites, then I can save single variant topsites faster.
I also added small piece of code that fixes bug 1026439, when calling initTopSite if frequency for that place exists and it is bigger than 0 the topsite is not overridden.
Attachment #8440785 -
Flags: review+ → review?(bfrancis)
Comment 5•11 years ago
|
||
Comment on attachment 8440785 [details]
Patch
Hmm, the number 20 is a bit arbitrary and overloading the frecency value like this is a bit of hack, but let's go with this for 2.0. It will be different if we implement it in the system browser anyway.
Attachment #8440785 -
Flags: review?(bfrancis) → review+
Assignee | ||
Comment 6•11 years ago
|
||
(In reply to Ben Francis [:benfrancis] from comment #5)
> Comment on attachment 8440785 [details]
> Patch
>
> Hmm, the number 20 is a bit arbitrary and overloading the frecency value
> like this is a bit of hack, but let's go with this for 2.0. It will be
> different if we implement it in the system browser anyway.
I agree, I used 20 because is the default value for topsites in the awesome screen https://github.com/mozilla-b2g/gaia/blob/master/apps/browser/js/awesomescreen.js#L13
Assignee | ||
Comment 7•11 years ago
|
||
Assignee | ||
Updated•11 years ago
|
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Reporter | ||
Comment 8•11 years ago
|
||
when you will do the merge to v2.0?
Updated•11 years ago
|
status-b2g-v2.0:
--- → affected
Flags: needinfo?(ryanvm)
Comment 11•11 years ago
|
||
You need to log in
before you can comment on or make changes to this bug.
Description
•