Closed Bug 901383 Opened 11 years ago Closed 11 years ago

Some permissions dialogs should have a 'more info' capability.

Categories

(Firefox OS Graveyard :: Gaia::System, defect)

x86
macOS
defect
Not set
normal

Tracking

(blocking-b2g:leo+, b2g18 verified, b2g-v1.1hd fixed)

RESOLVED FIXED
blocking-b2g leo+
Tracking Status
b2g18 --- verified
b2g-v1.1hd --- fixed

People

(Reporter: dougt, Assigned: fabrice)

References

Details

(Keywords: late-l10n)

Attachments

(3 files, 4 obsolete files)

For geolocation, it is important that we offer the user a way to see more information about the permission they are granting. On ff desktop, the door hanger for geolocation we offer an informational link.
Assignee: nobody → doug.turner
Attachment #785555 - Flags: ui-review?
Attachment #785555 - Flags: feedback?(fabrice)
jachen, can you review for UI. I'd like feedback.
Stephany - Who on the UX team would be good to review a permission prompt change?
Flags: needinfo?(swilkes)
Attachment #785555 - Attachment is patch: true
Attachment #785555 - Attachment mime type: text/x-patch → text/plain
Comment on attachment 785555 [details] [diff] [review] rough draft of gaia changes to support this. Review of attachment 785555 [details] [diff] [review]: ----------------------------------------------------------------- ::: apps/system/index.html @@ +723,5 @@ > <div class="inner"> > <h2 id="permission-message"></h2> > + <div id="permission-more-info"> > + <a id="permission-more-info-link" data-l10n-id="permission-more-info-link">More Info...</a> > + <iframe id="permission-more-info-frame" frameborder="0" scrolling=auto></iframe> minor nit: trailing whitespace. ::: apps/system/js/permission_manager.js @@ +55,4 @@ > str = _(permissionID + '-webRequest', { 'site': detail.origin }); > } > > + var moreInfoUrl = ""; s/""/ @@ +57,5 @@ > > + var moreInfoUrl = ""; > + if (detail.permission = "geolocation") { > + moreInfoUrl = "http://dougt.org"; > + } In general it would be better to not hard code these permission -> url mapping, but that can be done in a followup. @@ +173,5 @@ > // Note plain text since this may include text from > // untrusted app manifests, for example. > message.textContent = msg; > > + if (moreInfoUrl != "") { if (moreInfoUrl) { ... @@ +175,5 @@ > message.textContent = msg; > > + if (moreInfoUrl != "") { > + moreInfo.style.display = "block"; > + moreInfo.addEventListener('click', function(event) { nit: trailing ws @@ +178,5 @@ > + moreInfo.style.display = "block"; > + moreInfo.addEventListener('click', function(event) { > + event.preventDefault(); > + > + // I am sure there is a better way. changing the class instead of explicitly setting the display value may be better, but you'll still need to switch to about:blank ::: apps/system/style/permission_manager/permission_manager.css @@ +82,5 @@ > + > +#permission-more-info iframe { > + display: none; > + overflow: hidden; > + frameboarder: 0; I guess you meant border?
Attachment #785555 - Flags: ui-review?(firefoxos-ux-bugzilla)
Attachment #785555 - Flags: ui-review?
Attachment #785555 - Flags: feedback?(fabrice)
Attachment #785555 - Flags: feedback+
Flags: needinfo?(swilkes)
Attached patch prompt-more-info.patch (obsolete) — Splinter Review
Updated patch, with generic support for "More info..." links if the appropriate l10n strings are there. The two "new" strings are just copied from https://github.com/mozilla-b2g/gaia/blob/master/apps/communications/ftu/locales/ftu.en-US.properties#L96 so we should not have to ask anything to localizers.
Assignee: doug.turner → fabrice
Attachment #785553 - Attachment is obsolete: true
Attachment #785554 - Attachment is obsolete: true
Attachment #785555 - Attachment is obsolete: true
Attachment #785555 - Flags: ui-review?(firefoxos-ux-bugzilla)
Attachment #786616 - Flags: review?(gal)
Attached image screenshot
The new geolocation prompt
(In reply to Fabrice Desré [:fabrice] from comment #7) > Created attachment 786616 [details] [diff] [review] > prompt-more-info.patch > > Updated patch, with generic support for "More info..." links if the > appropriate l10n strings are there. > > The two "new" strings are just copied from > https://github.com/mozilla-b2g/gaia/blob/master/apps/communications/ftu/ > locales/ftu.en-US.properties#L96 so we should not have to ask anything to > localizers. Aren't those strings in combination too long for the permission prompt? The screenshot seems to imply the strings exceed the length of the prompt.
(In reply to Jason Smith [:jsmith] from comment #9) > > Aren't those strings in combination too long for the permission prompt? The > screenshot seems to imply the strings exceed the length of the prompt. The text area is scrollable to let you read the full story.
Attachment #786616 - Flags: review?(gal) → review?(21)
blocking-b2g: --- → leo?
Whats the localization story here? Anything new to localize here? I am not good at reviewing this. Pick anyone else. Feedback+ from me.
Keywords: late-l10n
Comment on attachment 786616 [details] [diff] [review] prompt-more-info.patch Review of attachment 786616 [details] [diff] [review]: ----------------------------------------------------------------- There's significant l10n impact in this patch. ::: apps/system/js/permission_manager.js @@ +60,5 @@ > + if (moreInfoText) { > + var evenMoreText = _(permissionID + '-more-info2'); > + if (evenMoreText) { > + moreInfoText += " " + evenMoreText; > + } hard-coding the " " is not a good idea, not all languages use whitespace. ::: shared/locales/permissions/permissions.en-US.properties @@ +41,5 @@ > perm-geolocation=Geolocation > perm-geolocation-appRequest={{app}} would like to know your location. > perm-geolocation-webRequest={{site}} would like to know your location. > +perm-geolocation-more-info = {{brandShortName}} uses data such as GPS, Wi-Fi, and mobile networks near you to help determine your approximate location. > +perm-geolocation-more-info2=Data is sent to Mozilla and other service providers and will be used in the aggregate to improve those location databases. Data may be stored on your device and data collection may occur even when no apps are running. I'd not use '2' here, it's often used to mean something else.
(In reply to Axel Hecht [:Pike] from comment #12) > ::: apps/system/js/permission_manager.js > @@ +60,5 @@ > > + if (moreInfoText) { > > + var evenMoreText = _(permissionID + '-more-info2'); > > + if (evenMoreText) { > > + moreInfoText += " " + evenMoreText; > > + } > > hard-coding the " " is not a good idea, not all languages use whitespace. What is the usual way to do that then? > > I'd not use '2' here, it's often used to mean something else. And... what will you use?
Comment on attachment 786616 [details] [diff] [review] prompt-more-info.patch Etienne is the permission dialog guy. He is already a fan of your trailing whitespaces :)
Attachment #786616 - Flags: review?(21) → review?(etienne)
required for 1.1 to ship geolocation w/ agps. let's move.
blocking-b2g: leo? → leo+
Comment on attachment 786616 [details] [diff] [review] prompt-more-info.patch Review of attachment 786616 [details] [diff] [review]: ----------------------------------------------------------------- ::: apps/system/js/permission_manager.js @@ +36,4 @@ > // The message to be displayed on the approval UI. > var message = > _('fullscreen-request', { 'origin': detail.fullscreenorigin }); > + fullscreenRequest = requestPermission(message, "", single quotes, or the linter won't let you commit :) @@ +60,5 @@ > + if (moreInfoText) { > + var evenMoreText = _(permissionID + '-more-info2'); > + if (evenMoreText) { > + moreInfoText += " " + evenMoreText; > + } I really wish we'd just use one |perm-geolocation-more-info| l10n key here. We need to add the |more-info| key anyway, and the l10n team is advising against the |*-more-info2| so it sounds like a no-brainer :) @@ +119,5 @@ > yes.callback = null; > no.removeEventListener('click', clickHandler); > no.callback = null; > + > + moreInfoLink.removeEventListener('click', clickHandler); we need to |moreInfo.classList.add('hidden');| here so the next permission request doesn't automatically get a more info link. @@ +186,5 @@ > > + if (moreInfoText) { > + // Show the "More info…" link. > + moreInfo.classList.remove('hidden'); > + moreInfoLink.classList.add('visible'); and we don't need to toggle the class on the link
Attachment #786616 - Flags: review?(etienne)
Attached patch updated patchSplinter Review
Addressing review comments, and switching back to using a single string.
Attachment #786616 - Attachment is obsolete: true
Attachment #787043 - Flags: review?(etienne)
FTR, this is still two added strings to the product. There's little confidence that I can give about those being localized by monday.
Comment on attachment 787043 [details] [diff] [review] updated patch Review of attachment 787043 [details] [diff] [review]: ----------------------------------------------------------------- All good, thanks!
Attachment #787043 - Flags: review?(etienne) → review+
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Keywords: verifyme
QA Contact: jsmith
[v1-train b4c80f5]
v1.1.0hd: b4c80f5f124ac10a320312d5c636f47f8e1042cb
Sanity checks look okay on b2g18 on a leo comm ril device on 8/9.
After going through all locales for this bug, seems like Turkish language "More Info" dialog is not localized on Leo B2G18 COM RIL, due to this a new bug was opened https://bugzilla.mozilla.org/show_bug.cgi?id=905421 Environmental Variables Build ID: 20130814041202 Gecko: http://hg.mozilla.org/releases/mozilla-b2g18/rev/15813d776a69 Gaia: dd3959fa74e356a528daa76ffee14c2c728a4b56 Platform Version: 18.1 RIL Version: 01.01.00.019.190 Firmware verision: D300f080
Depends on: 905421
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: