Closed Bug 813436 Opened 12 years ago Closed 12 years ago

Tools > Facebook Messenger menu shown when Social API is disabled

Categories

(Firefox Graveyard :: SocialAPI, defect)

19 Branch
defect
Not set
normal

Tracking

(firefox19+ verified, firefox20+ verified)

VERIFIED FIXED
Firefox 20
Tracking Status
firefox19 + verified
firefox20 + verified

People

(Reporter: heycam, Assigned: markh)

References

Details

Attachments

(2 files)

I updated my Nightly just now, and I got a Tools > Facebook Messenger menu with a single item in it "Remove from Nightly".  I haven't enabled the Social API, so I think the menu shouldn't be shown at all.
I see this on Windows too.
OS: Mac OS X → All
Hardware: x86 → All
Looks like it was caused by bug 805217
Depends on: 805217
Actually, it looks like we might want a new Social:Active command to hide the entire menu, but I'm sure Jaws will have his own thoughts...

Jaws: feel free to assign to me if you think this is the right approach.
Assignee: nobody → jaws
Yeah, splitting this out to a Social:Active command would provide a nice separation of concerns, and the SocialToolbarButton could use this command as well.
Assignee: jaws → mhammond
Version: unspecified → 19 Branch
This adds a new broadcaster socialActiveBroadcaster and both the tools menu and toolbar item observes this for the "hidden" attribute.  browser-social.js adds a new pref observer for Social.active and updates this broadcaster accordingly (I did consider a new observer specifically for the active attribute, but that doesn't really seem worth it).  Note that Social.active is now set *before* setting the pref so the observer sees the correct value for Social.active.

A related issue I also rolled into this patch is that if you just disable Facebook (ie, social.enabled=false, social.active=true) the Tools menu continues to show the ambient stuff - this is fixed by calling SocialMenu.populate() as .enabled is toggled and having SocialMenu.populate() check provider.enabled - which will be false when either Social.active or Social.enabled is false.
Attachment #683830 - Flags: review?(jaws)
Comment on attachment 683830 [details] [diff] [review]
various ui tweaks

Review of attachment 683830 [details] [diff] [review]:
-----------------------------------------------------------------

::: browser/base/content/browser-social.js
@@ +94,5 @@
> +          this.updateActiveBroadcaster();
> +          this.updateToggleCommand();
> +          // even though the above will hide/show most elements we care about,
> +          // we fall through so elements can actually be removed if !active.
> +        }

I don't see any problems with always doing the |this.updateActiveBroadcaster(); this.updateToggleCommand();| and it can make sure that this code path is always hit when one of the prefs is changed. What do you think?
Attachment #683830 - Flags: review?(jaws) → review+
https://hg.mozilla.org/mozilla-central/rev/1f5142a46e4a
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 20
Same patch as landed on m-c, but rebased to apply on Aurora

[Approval Request Comment]
Bug caused by (feature/regressing bug #): 805217
User impact if declined: Toolbar and Tools menu has social elements even when social is disabled.
Testing completed (on m-c, etc.): Landed on m-c
Risk to taking this patch (and alternatives if risky): Low risk, only social elements impacted
String or UUID changes made by this patch: None
Attachment #685891 - Flags: approval-mozilla-aurora?
Attachment #685891 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Blocks: 817790
No longer blocks: 817790
Depends on: 817790
Verified as fixed on Firefox 19 beta 5.

Windows 7 - User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:19.0) Gecko/20100101 Firefox/19.0
Mac OS X - User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:19.0) Gecko/20100101 Firefox/19.0
Linux - User Agent: Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:19.0) Gecko/20100101 Firefox/19.0

Build ID: 20130206083616
User Agent: Mozilla/5.0 (Windows NT 6.1; rv:20.0) Gecko/20100101 Firefox/20.0
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:20.0) Gecko/20100101 Firefox/20.0
User Agent: Mozilla/5.0 (X11; Linux i686; rv:20.0) Gecko/20100101 Firefox/20.0

Verified as fixed on Firefox 20 beta 6 (Build ID: 20130320062118).
Status: RESOLVED → VERIFIED
Product: Firefox → Firefox Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: