Closed
Bug 968156
Opened 11 years ago
Closed 10 years ago
Store multiple icons from mozbrowsericonchange events
Categories
(Firefox OS Graveyard :: Gaia::Search, defect)
Tracking
(feature-b2g:2.1, b2g-v2.0 affected, b2g-v2.1 affected)
People
(Reporter: sergi, Assigned: daleharvey)
References
Details
(Whiteboard: [systemsfe][tako])
Attachments
(1 file, 1 obsolete file)
We should be storing different icons that we receive on mozbrowsericonchange event so that we can later select the best icon to show in different scenarios.
Reporter | ||
Updated•11 years ago
|
Assignee: nobody → sergi.mansilla
Reporter | ||
Comment 1•11 years ago
|
||
Store an array of icons for each URL if necessary. It probably needs more tests, but I'd like to know if the approach is valid.
Attachment #8370777 -
Flags: review?(dale)
Reporter | ||
Updated•11 years ago
|
Attachment #8370777 -
Flags: review?(dale)
Assignee | ||
Comment 2•10 years ago
|
||
Sergi, apologies I dont really know what happened with this review, but looking to get this functionality implemented at some point, so you fancy reviving this or want me to?
I am not 100% on storing the sizes as integer representations, I think we should probably store things as directly as possible and let the client do any logic / processing, so I think we should probably just use the sizes as the key
Sadly there isnt a decent solution for testing datastore yet so I think this would have to use a mocked datastore
Flags: needinfo?(sergi.mansilla)
Reporter | ||
Comment 3•10 years ago
|
||
Hi Dale,
I don't even remember what I did there. I will take a look again and get back to you :) Thanks for the reply though!
Sergi
Flags: needinfo?(sergi.mansilla)
Updated•10 years ago
|
status-b2g-v2.0:
--- → affected
status-b2g-v2.1:
--- → affected
Assignee | ||
Comment 4•10 years ago
|
||
Sorry, screwed up the blocking, this is gonna block enabling places as changing it after would require a schema change / duck typing, Sergi I am gonna steal since we want to get places enabled within the next few days, apologies
Assignee: sergi.mansilla → dale
Blocks: 1041618
Assignee | ||
Comment 5•10 years ago
|
||
I have changed search/js/providers/places.js and browser_context_menu.js to just use the first icon it finds, these will be fixed by https://bugzilla.mozilla.org/show_bug.cgi?id=1042027
This changes app_window to maintain a list of icons for a current session of a mozbrowser window, places.js uses that list to construct the places store and other components (browser_context_menu), can use that to pick the highest quality available icon
Attachment #8370777 -
Attachment is obsolete: true
Attachment #8460222 -
Flags: review?(alive)
Comment 6•10 years ago
|
||
Comment on attachment 8460222 [details] [review]
https://github.com/mozilla-b2g/gaia/pull/22035
Let's
* Store favicon in AppWindow.prototype.favicons
* have unit test in app_window_test
* implement getIconBySize() not necessary but if you want to fetch icon by size in the future.
Attachment #8460222 -
Flags: review?(alive)
Assignee | ||
Comment 7•10 years ago
|
||
Comment on attachment 8460222 [details] [review]
https://github.com/mozilla-b2g/gaia/pull/22035
Thanks for the comments
I renamed and moved to app.favicons and added unit tests for app_window
I didnt add the getIcon function, we need to share the implementation between apps that dont have access to app_window (the search app), so at the least it will need to be a shared function, the implementation is being done in https://bugzilla.mozilla.org/show_bug.cgi?id=1042027 so I think best discussed there
Attachment #8460222 -
Flags: review?(alive)
Updated•10 years ago
|
feature-b2g: --- → 2.1
Whiteboard: [systemsfe][tako]
Target Milestone: --- → 2.1 S1 (1aug)
Comment 8•10 years ago
|
||
Comment on attachment 8460222 [details] [review]
https://github.com/mozilla-b2g/gaia/pull/22035
r+ with nit: don't put object in prototype :/ Initial it in mozbrowsericonchange handler would be fine.
Attachment #8460222 -
Flags: review?(alive) → review+
Assignee | ||
Comment 9•10 years ago
|
||
Fixed nit, cheers for the review
landed in: https://github.com/mozilla-b2g/gaia/commit/e80dc912903ecafbeff4229af5d6bd4daaf7812b
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Comment 10•10 years ago
|
||
This patch has caused https://bugzilla.mozilla.org/show_bug.cgi?id=1044227
Updated•10 years ago
|
You need to log in
before you can comment on or make changes to this bug.
Description
•