Closed Bug 529769 Opened 15 years ago Closed 15 years ago

notify observers when lightweight theme is selected

Categories

(Toolkit :: Add-ons Manager, defect)

1.9.2 Branch
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.9.3a1
Tracking Status
status1.9.2 --- beta5-fixed

People

(Reporter: myk, Assigned: dao)

References

Details

(Keywords: dev-doc-complete)

Attachments

(1 file)

For the purposes of extending the core lightweight theme functionality in Firefox, it would be very useful for there to be a notification when a lightweight theme is selected in addition to when it changes, since the "changed" notification happens both when lightweight themes are previewed and when they are selected, but extensions (like Personas) want to distinguish between previews and selections.
Blocks: 511104
Component: Theme → Add-ons Manager
Product: Firefox → Toolkit
QA Contact: theme → add-ons.manager
Version: unspecified → 1.9.2 Branch
Attached patch patchSplinter Review
Assignee: nobody → dao
Status: NEW → ASSIGNED
Attachment #413595 - Flags: review?(dtownsend)
Dao, does this give me what I asked for in that previous bug? The changed notification now is only used to notify outside sources, not internal sources?
Blocks: 530146
(In reply to comment #0) > For the purposes of extending the core lightweight theme functionality in > Firefox, it would be very useful for there to be a notification when a > lightweight theme is selected in addition to when it changes, since the > "changed" notification happens both when lightweight themes are previewed and > when they are selected, but extensions (like Personas) want to distinguish > between previews and selections. This affects the add-ons manager too. It observes lightweight-theme-changed but doesn't really care about previews there.
Attachment #413595 - Flags: review?(dtownsend) → review+
Comment on attachment 413595 [details] [diff] [review] patch Huh, I could've sworn we only sent the notification when actually changing.
Attachment #413595 - Flags: approval1.9.2?
Comment on attachment 413595 [details] [diff] [review] patch Why are we changing the name of the observer? Won't that cause add-on compatibility problems?
I doubt there are many extensions using this, since there isn't any documentation on the new observer messages yet (that I could find), although I'm using it for Brand Thunder 3.6 compatibility. But that's a good question. Why don't we leave the old one in place and create a name for the new one? Then we're keeping the old name and simply adding a new notification? I realize that the naming will be wrong/inconsistent, but since we are supposed to be API frozen for extensions at this point, it would be a more correct change.
The name change does break the latest Personas development builds, which observe the current notification, but I'm ok with that, since we plan to update Personas to use the new notification when it becomes available anyway (bug 530146), given that it's so much more reliable than how we currently detect persona changes. I personally think we're better off making the name change now than forever holding our peace, and while it might break some extensions (if there are any besides Personas that are observing the notification), it might just as easily fix others that treat the notification as if it really did what it says it does (i.e. the other way to look at this is that it is a bug fix, not an API change, that makes the API actually do what extension developers expect from it).
It should be OK with me to. We have six extensions out so far that use this and I think they will work correctly - my only concern is that preview will work incorrectly now. I won't really know until this fix drops.
I'd concur that we we should take this change now, but lets get some kind of mention of it out there
Keywords: dev-doc-needed
Comment on attachment 413595 [details] [diff] [review] patch a192=beltzner, against my better judgement. Please do make sure that you blog the hell out of this change. And Myk, please make sure that by the time we launch Firefox 3.6 there's a compatible version of Personas out there.
Attachment #413595 - Flags: approval1.9.2? → approval1.9.2+
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.3a1
(In reply to comment #11) > And Myk, please make sure that by the time we launch Firefox 3.6 there's a > compatible version of Personas out there. Roger that. Shirley, I'll do so. To wit, Personas compatibility with Firefox 3.6 is being tracked in bug 521913, whose dependencies are all actively being worked on, and we're planning to push a release candidate for Personas 1.5 (with all known compatibility issues resolved) this week.
These bugs landed after b4 was cut. Moving flag out.
(In reply to comment #16) > These bugs landed after b4 was cut. Moving flag out. That's a real bummer. That means extension developers won't be able to test with this before final. Ouch.
This needs one more change. In order to maintain compatibility with previous consumers, the changed message needs to pass in stringified theme data.
anyway this fix can be tested manually? Is there a way i can distinguish the notification actions are updating in the json data?
The add-ons manager uses this notification... If you open the add-ons manager and select a theme on getpersonas.com, the add-ons manager should reflect that change.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: