Closed Bug 1206251 Opened 4 years ago Closed 4 years ago

Refresh the identity block when permissions change

Categories

(Firefox :: General, defect, P1)

defect

Tracking

()

VERIFIED FIXED
Firefox 50
Iteration:
50.2 - Jul 4
Tracking Status
firefox50 --- fixed

People

(Reporter: MarcoM, Assigned: johannh)

References

Details

(Whiteboard: [fxprivacy])

Attachments

(3 files)

No description provided.
Flags: qe-verify?
Priority: P3 → P2
Priority: P2 → P3
Assignee: nobody → paolo.mozmail
Status: NEW → ASSIGNED
Iteration: --- → 49.1 - May 9
Priority: P3 → P1
Flags: qe-verify? → qe-verify-
Iteration: 49.1 - May 9 → 49.2 - May 23
Since we have an observer notification for permissions. and permissions change rarely, we can simply listen for any changes in the front-end and refresh the identity block when that happens.
Summary: Code module should listen to permission changes and relay them → Refresh the identity block when permissions change
Iteration: 49.2 - May 23 → 49.3 - Jun 6
Assignee: paolo.mozmail → nobody
Status: ASSIGNED → NEW
Iteration: 49.3 - Jun 6 → ---
Priority: P1 → P2
Assignee: nobody → jhofmann
Status: NEW → ASSIGNED
Ash, here's something you might want to be aware of with this patch applied.
Flags: needinfo?(agrigas)
Iteration: --- → 49.3 - Jun 6
Priority: P2 → P1
Comment on attachment 8760590 [details]
Old behavior

Because I'm not sure the intention of the original GIF was clear, here's the interaction on stable. Note how at the end I select "Always Ask" and the select box and "Receive Notifications" text doesn't go away.
Attachment #8760590 - Attachment description: debug2.gif → Old behavior
Matt pointed out on IRC that the select box is going to be replaced with an [x] button in Bug 1203292. We'll have to see how that mixes with this bug.
I realize I'm mistaking identity block for identity popup here. The identity popup should probably not be automatically updated. I'll upload another patch as soon as Bug 1206246 is resolved
Depends on: 1206246
Flags: needinfo?(agrigas)
Attachment #8760688 - Flags: review?(paolo.mozmail)
Ah, yes, this bug is about catching permission changes during browser usage. It will probably not even result in any visible user interface change until we have implemented the blocked permissions, because blocked permissions are not shown in the identity block yet. Note that notification anchors are technically not a part of the identity block.

Unless there are other reasons to do so, we can just refresh everything including the panel contents, and performance shouldn't be a concern. Permission changes should be rare as they only happen on explicit user action, and even if theoretically an add-on could make several calls to the permissions API in sequence, we shouldn't tune our code to hypothetical use cases.
And yeah, bug 1206246 is a good way to make this bug actually do something visible.
Iteration: 49.3 - Jun 6 → 50.1
Comment on attachment 8760688 [details]
1206251 - Add a permission change observer to refresh the identity block.

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/58196/diff/1-2/
Attachment #8760688 - Flags: review?(paolo.mozmail)
After a chat with MattN I decided to not reload the identity popup (only the identity block) until we see how that interoperates with the changes in Bug 1203292. Reloading the popup would be easy to add. r? :)
Comment on attachment 8760688 [details]
1206251 - Add a permission change observer to refresh the identity block.

https://reviewboard.mozilla.org/r/58196/#review56722

Sorry for the delay!
Attachment #8760688 - Flags: review?(paolo.mozmail) → review+
Pushed by cbook@mozilla.com:
https://hg.mozilla.org/integration/fx-team/rev/1176a934e5ba
Add a permission change observer to refresh the identity block. r=paolo
Keywords: checkin-needed
Iteration: 50.1 → 50.2
https://hg.mozilla.org/mozilla-central/rev/1176a934e5ba
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 50
Depends on: 1282223
I have successfully reproduced this issue on Nightly according to(2015-09-18)

Fixing bug is verified on Latest Developer Edition--  Build ID:( 20160826004001 ), User Agent: Mozilla/5.0 (Windows NT 10.0; rv:50.0) Gecko/20100101 Firefox/50.0

Tested OS -- Windows10 32bit
QA Whiteboard: [testday-20160826]
Thanks!
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.