If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

Show an indicator when geolocation is in use




Site Identity and Permission Panels
7 years ago
11 months ago


(Reporter: limi, Unassigned)


(Depends on: 1 bug)

Dependency tree / graph
Bug Flags:
firefox-backlog +

Firefox Tracking Flags

(Not tracked)


(Whiteboard: [fxprivacy] )


(4 attachments)

After giving a site permission to get your geolocation, the icon that indicates that you did so doesn't stick around — so it's hard to tell that the site has the permission, and hard to remove that permission later.

Nominating as blocker (requested by Beltzner).

Steps to reproduce:

1. http://maps.google.com
2. Click the "Show my location" dot in the map controls,
3. Answer "Share location" when asked,
4. Geolocation indicator disappears.

Expected result:

4. Geolocation stays around for as long as the site has this permission.
What should the notification popup look like after the decision has been made? When should it finally disappear? Implementing this would require some new strings, so I don't think it's feasible to block on it at this point.
blocking2.0: ? → -
We can get away without using any new strings (although these interfaces are always kind of a hack).  I'll attach a mockup.
Depends on: 630769
Created attachment 508992 [details]
UI for always and never share location

This shows how we can potentially reuse strings to build the UI.
Note that this bug should also cover the "never share" state, where the request icon is shown, but the panel is not displayed.
Do we have different icon/indicators for "am currently sharing" and "am being asked to share"?
Not yet, creating those two icons is dependent bug 630769


7 years ago
blocking2.0: - → ?
Whiteboard: [strings]
Target Milestone: --- → Firefox 4.0b11
Argh, didn't mean to do that. Damn form autocomplete. :)
blocking2.0: ? → ---
Whiteboard: [strings]
Target Milestone: Firefox 4.0b11 → ---


7 years ago
Depends on: 641892

Comment 8

7 years ago
Updating bug summary to match proposed solution.
Component: General → Location Bar
QA Contact: general → location.bar
Summary: Geolocation indicator doesn't stick around → Create persistent indicator for geolocation sharing


6 years ago
Duplicate of this bug: 572972
Created attachment 621196 [details] [diff] [review]
v.1 WIP for the always allow case

Adds a dismissed notification when geolocation is accessed and it is set to always allow for the site.  There was a mention of having it not be dismissed for the allow case but that seems like it may be too annoying without bug 596723 fixed.  It's easy to change though if that's still what is wanted.  Since we aren't required to re-use strings at this point, I went with the normal doorhanger layout with a menu-button rather than the checkbox.

The disallow case still needs to be implemented.  I'll wait for feedback on the approach before doing that since it's mostly the same.  That will also require an inactive geolocation icon (bug 630769) or applying a different style to the existing icon in that case.

Tests are also needed.
Assignee: nobody → mnoorenberghe+bmo
Attachment #621196 - Flags: feedback?(margaret.leibovic)
Created attachment 621199 [details]
Screenshot of v.1 WIP

Now that we don't have a string freeze, what is the desired UI/strings for this notification (and the always disallow for this site case)?
Attachment #621199 - Flags: ui-review?(ux-review)
Created attachment 621202 [details]
Screenshot of v.1 WIP in private browsing mode

In private browsing mode we don't show the Always/Never allow options so it seems like we shouldn't allow revoking them either.  Does it make sense to just let the user know their location is shared?  Alternatively, we could just show the icon and not provide a message at all (using the "neverShow" option). 

Note that the notifications are dismissed by default in the patch but I'm showing them open for review.

Comment 13

5 years ago
Comment on attachment 621196 [details] [diff] [review]
v.1 WIP for the always allow case

Pending UX input to make the strings sound better, this looks like a good start to me. I'm not sure what our customs are on using var/let in old files that already use var everywhere, but I'd think we'd prefer to just use let.

>diff --git a/browser/components/nsBrowserGlue.js b/browser/components/nsBrowserGlue.js
>@@ -1606,39 +1611,85 @@ ContentPermissionPrompt.prototype = {

>+      let that = this;
>       if (!inPrivateBrowsing) {
>         secondaryActions.push({
>           label: browserBundle.GetStringFromName("geolocation.alwaysShareLocation"),
>           accessKey: browserBundle.GetStringFromName("geolocation.alwaysShareLocation.accesskey"),
>           callback: function () {
>             Services.perms.add(requestingURI, "geo", Ci.nsIPermissionManager.ALLOW_ACTION);
>             request.allow();
>+            that._alreadyAllowedPrompt(requestingURI, chromeWin, browser);

You could use .bind(this) instead of making a "that" variable.

>diff --git a/browser/locales/en-US/chrome/browser/browser.properties b/browser/locales/en-US/chrome/browser/browser.properties

>+geolocation.alwaysSharingWithSitePB=You are always sharing your location with %S.
>+geolocation.alwaysSharingWithFilePB=You are always sharing your location with the file %S.

Add a localization note about how these are used in private browsing mode, and that's why we can't offer to change the permission.
Attachment #621196 - Flags: feedback?(margaret.leibovic) → feedback+
Comment on attachment 621199 [details]
Screenshot of v.1 WIP

I think “Stop sharing location” is better as a button string, the “always” is implied, as well as clarified in the dialog body text. 

WFM with those changes.
Attachment #621199 - Flags: ui-review?(ux-review) → ui-review+
Blocks: 950073
Whiteboard: p=0


4 years ago
No longer blocks: 950073
Flags: firefox-backlog+
I still think we should do this as every other platform (desktop and mobile) has this already but I'm not actively working on it.
Assignee: MattN+bmo → nobody
Component: Location Bar → Site Identity and Permission Panels
Summary: Create persistent indicator for geolocation sharing → Show an indicator when geolocation is in use
Whiteboard: p=0


11 months ago
Whiteboard: [fxprivacy] [triage]

Comment 16

11 months ago
We want to do this but not right now.
Priority: -- → P4
Whiteboard: [fxprivacy] [triage] → [fxprivacy]
You need to log in before you can comment on or make changes to this bug.