Closed Bug 968156 Opened 11 years ago Closed 10 years ago

Store multiple icons from mozbrowsericonchange events

Categories

(Firefox OS Graveyard :: Gaia::Search, defect)

x86
macOS
defect
Not set
normal

Tracking

(feature-b2g:2.1, b2g-v2.0 affected, b2g-v2.1 affected)

RESOLVED FIXED
2.1 S1 (1aug)
feature-b2g 2.1
Tracking Status
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.
Blocks: 963047
Assignee: nobody → sergi.mansilla
Attached file GitHub PR (obsolete) —
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)
Attachment #8370777 - Flags: review?(dale)
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)
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)
See Also: → 1041482
Blocks: 1041618
No longer blocks: 963047
No longer blocks: 1041618
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
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 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)
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)
feature-b2g: --- → 2.1
Whiteboard: [systemsfe][tako]
Target Milestone: --- → 2.1 S1 (1aug)
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+
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Depends on: 104227
Depends on: 1044227
No longer depends on: 104227
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: