Closed Bug 1206251 Opened 4 years ago Closed 4 years ago
Refresh the identity block when permissions change
No description provided.
Assignee: nobody → paolo.mozmail
Status: NEW → ASSIGNED
Iteration: --- → 49.1 - May 9
Priority: P3 → P1
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
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.
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.
Review commit: https://reviewboard.mozilla.org/r/58196/diff/#index_header See other reviews: https://reviewboard.mozilla.org/r/58196/
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
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.
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/
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 firstname.lastname@example.org: https://hg.mozilla.org/integration/fx-team/rev/1176a934e5ba Add a permission change observer to refresh the identity block. r=paolo
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]
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.