Closed Bug 1016226 Opened 6 years ago Closed 6 years ago

[Vertical] Homescreen Icon should update when Collection's data changes

Categories

(Firefox OS Graveyard :: Gaia, defect)

x86
macOS
defect
Not set

Tracking

(feature-b2g:2.0, tracking-b2g:backlog, b2g-v2.0 fixed, b2g-v2.1 fixed)

RESOLVED FIXED
2.0 S4 (20june)
feature-b2g 2.0
tracking-b2g backlog
Tracking Status
b2g-v2.0 --- fixed
b2g-v2.1 --- fixed

People

(Reporter: amirn, Assigned: kgrandon)

References

Details

(Whiteboard: [systemsfe])

Attachments

(1 file)

No description provided.
No longer blocks: 1016227
I believe this is only needed when third party homescreens are used, and we want to sync collections with them. I think this can be a 2.1 feature as we won't have full third party homescreen support till then?
(In reply to Kevin Grandon :kgrandon from comment #2)
> I believe this is only needed when third party homescreens are used, and we
> want to sync collections with them. I think this can be a 2.1 feature as we
> won't have full third party homescreen support till then?

I might have referenced the wrong code. What I meant is that the homescreen grid should update when Collection's icon or name changes.
It does not seems to be working currently.
Ah, that makes sense. We'll want to follow what bookmarks does, and update the title/icon of the collection.

Bookmarks example: https://github.com/mozilla-b2g/gaia/blob/master/shared/elements/gaia_grid/js/items/bookmark.js#L46
Summary: [Vertical Homescreen] CollectionSource sync method → [Vertical Homescreen] Collection update from datastore method
blocking-b2g: --- → backlog
feature-b2g: --- → 2.0
Whiteboard: [systemsfe]
Assignee: nobody → dale
Blocks: 1016227
Target Milestone: --- → 2.0 S3 (6june)
This bug has gotten a bit confusing, due to the fact that the original description links to a different piece of code than the title. I think this has already been implemented, and when we get a change event the collection should update on the homescreen. See:

https://github.com/mozilla-b2g/gaia/blob/master/dev_apps/home2/js/sources/collection.js#L74
https://github.com/mozilla-b2g/gaia/blob/master/shared/elements/gaia_grid/js/items/collection.js#L56

Please file a new bug if we still need to do something here.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WORKSFORME
(In reply to Kevin Grandon :kgrandon from comment #5)
> This bug has gotten a bit confusing, due to the fact that the original
> description links to a different piece of code than the title. I think this
> has already been implemented, and when we get a change event the collection
> should update on the homescreen. See:
> 
> https://github.com/mozilla-b2g/gaia/blob/master/dev_apps/home2/js/sources/
> collection.js#L74
> https://github.com/mozilla-b2g/gaia/blob/master/shared/elements/gaia_grid/js/
> items/collection.js#L56
> 
> Please file a new bug if we still need to do something here.

This is not working.
To test, apply https://github.com/EverythingMe/gaia/commit/09f00248d88530971a5530588bc6970c23ab1dc8

Dale, can you take this?
Status: RESOLVED → REOPENED
Flags: needinfo?(dale)
Resolution: WORKSFORME → ---
Summary: [Vertical Homescreen] Collection update from datastore method → [Vertical] Homescreen Icon should update when Collection's data changes
Target Milestone: 2.0 S3 (6june) → 2.0 S4 (20june)
Yup I can take this
Flags: needinfo?(dale)
QA Whiteboard: [VH-FL-blocking+][VH-FC-blocking+]
I will steal if that's ok.
Assignee: dale → kgrandon
Status: REOPENED → ASSIGNED
Attached file Github pull request
Amir - Could you review? Thanks!
Attachment #8442343 - Flags: review?(amirn)
Comment on attachment 8442343 [details] [review]
Github pull request

I can't get it working on my device, vertical keeps crashing,
might be a gecko issue (I'm using an OWD build):
E/GeckoConsole( 1671): [JavaScript Error: "NS_ERROR_NOT_INITIALIZED: Component returned failure code: 0xc1f30001 (NS_ERROR_NOT_INITIALIZED) [nsIMessageSender.sendAsyncMessage]" {file: "resource://gre/modules/ActivitiesService.jsm" line: 334}]
E/GeckoConsole( 1671): [JavaScript Error: "NS_ERROR_NOT_INITIALIZED: Component returned failure code: 0xc1f30001 (NS_ERROR_NOT_INITIALIZED) [nsIMessageSender.sendAsyncMessage]" {file: "resource://gre/modules/ActivitiesService.jsm" line: 365}]

Kevin can't reproduce.
James, do you mind taking a shot at it?

I'm using this branch for testing: https://github.com/EverythingMe/gaia/commits/bug_1016226
it changes the collection's name every time it opens

thanks.
Attachment #8442343 - Flags: review?(amirn) → review?(jlal)
Comment on attachment 8442343 [details] [review]
Github pull request

Or maybe you could review this Ran? Thanks!
Attachment #8442343 - Flags: review?(ran)
Attachment #8442343 - Flags: review?(ran) → review+
Attachment #8442343 - Flags: review?(jlal)
Landed: https://github.com/mozilla-b2g/gaia/commit/fa2df1e5206b7634e50a6c3e3cb4dc76e7ac223b
Status: ASSIGNED → RESOLVED
Closed: 6 years ago6 years ago
Resolution: --- → FIXED
Comment on attachment 8442343 [details] [review]
Github pull request

This is needed for the vertical homescreen.
Attachment #8442343 - Flags: approval-gaia-v2.0?(bbajaj)
Flags: needinfo?(johan.lorenzo)
Keywords: verifyme
Attachment #8442343 - Flags: approval-gaia-v2.0?(bbajaj) → approval-gaia-v2.0+
Sorry, this one is an infrastructure piece, and can not be verified on it's own.
Flags: needinfo?(johan.lorenzo)
Keywords: verifyme
Flags: in-moztrap?(jlorenzo)
Flags: in-moztrap?(jlorenzo) → in-moztrap-
blocking-b2g: backlog → ---
You need to log in before you can comment on or make changes to this bug.