Closed
Bug 1196809
Opened 9 years ago
Closed 9 years ago
Pick best available icon for pinned sites on homescreen
Categories
(Firefox OS Graveyard :: Gaia::Homescreen, defect, P2)
Tracking
(Not tracked)
RESOLVED
FIXED
FxOS-S9 (16Oct)
People
(Reporter: benfrancis, Assigned: gmarty)
References
Details
(Whiteboard: [systemsfe][p=3])
Attachments
(2 files, 1 obsolete file)
Currently bookmarks use the .icon property of an object stored in the bookmarks DataStore which is set to a single icon when the bookmark is saved.
In bug 1168960 we are saving pinned sites in the bookmarks DataStore using a siteObject which may include multiple .icons specified in <link rel=icon> tags and also .webManifest metadata if provided by the site, which may also specify multiple icons of different sizes.
Instead of using the .icon property, the (new) homescreen should use the IconsHelper to extract, fetch and cache the best available icon from the site object for the size required at runtime.
It may need to fall back to the .icon property for existing bookmarks if no migration is carried out.
Assignee | ||
Updated•9 years ago
|
Assignee: nobody → gmarty
Assignee | ||
Comment 1•9 years ago
|
||
I've started working on it. The very early work in progress is in this branch:
https://github.com/gmarty/gaia/tree/Bug-1196809-Pick-best-available-icon-for-pinned-sites-on-homescreen
Reporter | ||
Updated•9 years ago
|
Whiteboard: [systemsfe] → [systemsfe][p=3]
Assignee | ||
Comment 2•9 years ago
|
||
The patch is looking good but now the homescreen crashes whenever a bookmark is opened (repro 100% of the time).
Chris, it's very likely to be a Gecko bug, can you help me debugging this? I need to decrypt the logcat.
Flags: needinfo?(chrislord.net)
Comment 3•9 years ago
|
||
(In reply to Guillaume Marty [:gmarty] from comment #2)
> The patch is looking good but now the homescreen crashes whenever a bookmark
> is opened (repro 100% of the time).
> Chris, it's very likely to be a Gecko bug, can you help me debugging this? I
> need to decrypt the logcat.
Are you running a debug build ? If so, then the leak in bug 1202592 on debug build will produce this kind of crash. It should be explicit when looking at logcat.
Updated•9 years ago
|
Flags: needinfo?(gmarty)
Assignee | ||
Comment 4•9 years ago
|
||
That's a regular build but the logcat show these lines:
I/Gecko ( 318): -*- SettingsManager: WARNING: MORE THAN 10 OBSERVERS FOR dev.gaia.pinning_the_web: 23 FROMaddObserver@jar:file:///system/b2g/omni.ja!/components/SettingsManager.js:382:48
I/Gecko ( 318): sl_observe@app://system.gaiamobile.org/shared/js/settings_listener.js:58:5
I/Gecko ( 318): BrowserContextMenu@app://system.gaiamobile.org/js/browser_context_menu.js:21:1
...
I/Gecko ( 318): -*- SettingsManager: WARNING: MORE THAN 10 OBSERVERS FOR dev.gaia.pinning_the_web: 24 FROMaddObserver@jar:file:///system/b2g/omni.ja!/components/SettingsManager.js:382:48
I/Gecko ( 318): sl_observe@app://system.gaiamobile.org/shared/js/settings_listener.js:58:5
I/Gecko ( 318): ac__registerEvents@app://system.gaiamobile.org/js/app_chrome.js:608:7
And there's no way there are more than 2 of these observers when on startup there only a couple instances of appChrome objects.
Also commenting out the lines using SettingsListener prevents the crash. So there's definitely an issue here.
Flags: needinfo?(gmarty)
Comment 5•9 years ago
|
||
Assignee | ||
Comment 6•9 years ago
|
||
Comment on attachment 8662956 [details] [review]
[gaia] gmarty:Bug-1196809-Pick-best-available-icon-for-pinned-sites-on-homescreen > mozilla-b2g:master
I can't reproduce the crash in the latest master, so it's ready to review.
Attachment #8662956 -
Flags: review?(chrislord.net)
Comment 7•9 years ago
|
||
Comment on attachment 8662956 [details] [review]
[gaia] gmarty:Bug-1196809-Pick-best-available-icon-for-pinned-sites-on-homescreen > mozilla-b2g:master
I've added comments on github - there are outstanding issues/questions before I can r+ this.
Flags: needinfo?(chrislord.net)
Attachment #8662956 -
Flags: review?(chrislord.net)
Comment 8•9 years ago
|
||
(In reply to Guillaume Marty [:gmarty] from comment #2)
> The patch is looking good but now the homescreen crashes whenever a bookmark
> is opened (repro 100% of the time).
> Chris, it's very likely to be a Gecko bug, can you help me debugging this? I
> need to decrypt the logcat.
I am wondering if you are not just seeing another instance of bug 1206485. Attaching a gdb might help.
Flags: needinfo?(gmarty)
Assignee | ||
Comment 9•9 years ago
|
||
Comment on attachment 8662956 [details] [review]
[gaia] gmarty:Bug-1196809-Pick-best-available-icon-for-pinned-sites-on-homescreen > mozilla-b2g:master
I reworked the logic as discussed with Alberto.
Before going deeper in refining the code and writing test, can you take a look to see if the patch is going in the right direction?
Flags: needinfo?(gmarty)
Attachment #8662956 -
Flags: feedback?(chrislord.net)
Comment 10•9 years ago
|
||
Comment on attachment 8662956 [details] [review]
[gaia] gmarty:Bug-1196809-Pick-best-available-icon-for-pinned-sites-on-homescreen > mozilla-b2g:master
This looks good to me - left a couple of comments, but likely just over WIP stuff.
Attachment #8662956 -
Flags: feedback?(chrislord.net) → feedback+
Assignee | ||
Comment 11•9 years ago
|
||
Comment on attachment 8662956 [details] [review]
[gaia] gmarty:Bug-1196809-Pick-best-available-icon-for-pinned-sites-on-homescreen > mozilla-b2g:master
Chris, how does it look like now?
Attachment #8662956 -
Flags: review?(chrislord.net)
Comment 12•9 years ago
|
||
Comment on attachment 8662956 [details] [review]
[gaia] gmarty:Bug-1196809-Pick-best-available-icon-for-pinned-sites-on-homescreen > mozilla-b2g:master
I think this is mostly ok, but:
- This doesn't actually switch over homescreen from using gaia-app-icon in its bower_components to gaia-site-icon?
- If the former is done, the icon-loaded handler will need to be modified so that it doesn't cache icons that we just set (because Alberto changed gaia-site-icon so that icon-loaded is always fired, even when the icon is user-set)
- We also need to not cache bookmark icons I guess, if they're cached by IconsHelper?
Attachment #8662956 -
Flags: review?(chrislord.net)
Assignee | ||
Comment 13•9 years ago
|
||
Comment on attachment 8662956 [details] [review]
[gaia] gmarty:Bug-1196809-Pick-best-available-icon-for-pinned-sites-on-homescreen > mozilla-b2g:master
Ready for another round of review.
I made the changes you pointed and reworked the dependencies to avoid useless duplication with /shared/elements.
Attachment #8662956 -
Flags: review?(chrislord.net)
Comment 14•9 years ago
|
||
Comment on attachment 8662956 [details] [review]
[gaia] gmarty:Bug-1196809-Pick-best-available-icon-for-pinned-sites-on-homescreen > mozilla-b2g:master
One nit, but lgtm :) Re-flag me if there are failing tests that you need to make significant changes to get to pass.
Attachment #8662956 -
Flags: review?(chrislord.net) → review+
Assignee | ||
Updated•9 years ago
|
Keywords: checkin-needed
Updated•9 years ago
|
Priority: -- → P2
Comment 15•9 years ago
|
||
seems there are merge conflicts, could you take a look, thanks!
Flags: needinfo?(gmarty)
Keywords: checkin-needed
Comment 16•9 years ago
|
||
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Reverted this in https://github.com/mozilla-b2g/gaia/commit/356d5fabeb4e06097ae595f01f4b78c0af93d770 for gij(7) failures.
https://treeherder.mozilla.org/logviewer.html#?job_id=2970204&repo=b2g-inbound
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Comment 18•9 years ago
|
||
Assignee | ||
Comment 19•9 years ago
|
||
Comment on attachment 8671825 [details] [review]
[gaia] gmarty:Bug-1196809-Pick-best-available-icon-for-pinned-sites-on-homescreen-new > mozilla-b2g:master
Carrying r+ from Chris.
Flags: needinfo?(gmarty)
Attachment #8671825 -
Flags: review+
Assignee | ||
Comment 20•9 years ago
|
||
I double checked and the tests are green on treeherder. Also the failing Gij test passes locally.
Keywords: checkin-needed
Assignee | ||
Updated•9 years ago
|
Attachment #8662956 -
Attachment is obsolete: true
Comment 21•9 years ago
|
||
Status: REOPENED → RESOLVED
Closed: 9 years ago → 9 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → FxOS-S9 (16Oct)
Comment 22•9 years ago
|
||
Hmm, looking at the tests on the PR, it looks like we have a failing test:
https://treeherder.mozilla.org/#/jobs?repo=gaia&revision=37ff7d9cd0c8b163d1dc4ee058ca6de432d10e82
And this test is now failing on gaia-master:
https://treeherder.mozilla.org/#/jobs?repo=gaia-master&revision=8e503650edcf7392349f68d845f36f35ddfb91fb
Flags: needinfo?(gmarty)
Comment 23•9 years ago
|
||
Updated•9 years ago
|
Attachment #8673101 -
Flags: review?(chrislord.net)
Updated•9 years ago
|
Attachment #8673101 -
Flags: review?(chrislord.net) → review+
Comment 24•9 years ago
|
||
Assignee | ||
Updated•9 years ago
|
Flags: needinfo?(gmarty)
You need to log in
before you can comment on or make changes to this bug.
Description
•