Closed
Bug 775773
Opened 13 years ago
Closed 12 years ago
Add "Copy Image Location" to long press context menu
Categories
(Firefox for Android Graveyard :: General, enhancement)
Tracking
(firefox18 verified)
VERIFIED
FIXED
Firefox 18
Tracking | Status | |
---|---|---|
firefox18 | --- | verified |
People
(Reporter: mcomella, Assigned: mcomella)
References
Details
Attachments
(1 file, 3 obsolete files)
3.22 KB,
patch
|
mcomella
:
review+
|
Details | Diff | Splinter Review |
A long press on an image should open the context menu with a "Copy Image Location" option.
Assignee | ||
Updated•13 years ago
|
Severity: normal → enhancement
Updated•13 years ago
|
Assignee: michael.l.comella → blyakher.a
Comment 1•13 years ago
|
||
Attachment #644414 -
Flags: review?(wjohnston)
Assignee | ||
Comment 2•13 years ago
|
||
While I know it's not my review, there are a couple changes I would like to this:
0) wesj moved some of this code around. Make sure you pull the latest changes and rebase.
1) The context menu string should be "Copy Image Location" as opposed to "Copy Image Link". If the image is a link, "Copy Link" will still appear. If it is not a link, seeing "Copy Image Link" can be ambiguous. The associated variable names should also be changed.
2) With the patch in bug 775766, I added a NativeWindow.contextmenus._copyStringToDefaultClipboard function which can be used here. It would good if you could either wait for those to land in inbound or apply them yourself and update your callback function.
Comment 3•13 years ago
|
||
Comment on attachment 644414 [details] [diff] [review]
copy the link of an image into the clipboard
Review of attachment 644414 [details] [diff] [review]:
-----------------------------------------------------------------
Looks good! I agree with mcomella's comments though.
::: mobile/android/chrome/content/browser.js
@@ +1140,5 @@
> + this.imageLinkCopyableContext,
> + function(aTarget) {
> + let url = aTarget.src;
> + let clipboard = Cc["@mozilla.org/widget/clipboardhelper;1"].getService(Ci.nsIClipboardHelper);
> + clipboard.copyString(url);
If we've got new helper functions, let's use 'em.
::: mobile/android/locales/en-US/chrome/browser.properties
@@ +209,5 @@
> # Context menu
> contextmenu.openInNewTab=Open Link in New Tab
> contextmenu.share=Share
> contextmenu.copyLink=Copy Link
> +contextmenu.copyImageLink=Copy Image Link
I agree about the naming. "Copy Image Location" is what we have on desktop. I'm worried that's too long, but i can't think of anything smarter.... Changing the other names to match (i.e. imageLocationCopyableContext) would be good.
I hate that we've got so many context's now.... Maybe we can do something like imageContext.extend(function() smallFunction)... That's a different problem though.
Attachment #644414 -
Flags: review?(wjohnston) → review+
Assignee | ||
Comment 4•13 years ago
|
||
My patches were just pushed to inbound so you'll be able to use that helper function when you pull.
(In reply to Wesley Johnston (:wesj) from comment #3)
> I agree about the naming. "Copy Image Location" is what we have on desktop.
> I'm worried that's too long, but i can't think of anything smarter....
To break it up, we definitely need the word "Copy" and we need the word "Location" or some variant of it. You might be able to get away with removing "Image" ("Copy Location") but it gets ambiguous if it's an image link.
The best I can do is "Copy Image URL" but URL may be considered too technical.
Assignee | ||
Updated•12 years ago
|
Assignee: blyakher.a → michael.l.comella
Assignee | ||
Comment 5•12 years ago
|
||
Took into account the comments above and reorganized some other code elements.
Note this patch builds upon the changes in bug 776064 and bug 744662 so those should be pushed before this patch, in that order.
Attachment #644414 -
Attachment is obsolete: true
Attachment #654341 -
Flags: review?(wjohnston)
Assignee | ||
Comment 6•12 years ago
|
||
I should mention, I left it as "Copy Image Location" and would like to create a followup UX bug to consolidate and polish the context menu entries.
Comment 7•12 years ago
|
||
Comment on attachment 654341 [details] [diff] [review]
Patch
Review of attachment 654341 [details] [diff] [review]:
-----------------------------------------------------------------
I think this patch is fine. I hate adding to the context menus. mfinnkle, ian (if you're not gone yet) do we want this?
::: mobile/android/chrome/content/browser.js
@@ -430,5 @@
> });
> });
>
> - NativeWindow.contextmenus.add(Strings.browser.GetStringFromName("contextmenu.fullScreen"),
> - NativeWindow.contextmenus.SelectorContext("video:not(:-moz-full-screen)"),
Don't delete this stuff. Its nice to keep the blame clean in hg if possible and you're just moving it below.
::: mobile/android/locales/en-US/chrome/browser.properties
@@ +209,5 @@
> # Context menu
> contextmenu.openInNewTab=Open Link in New Tab
> +contextmenu.copyLink=Copy Link
> +contextmenu.copyEmailAddress=Copy Email Address
> +contextmenu.copyPhoneNumber=Copy Phone Number
Same here. No need to move this stuff around.
Attachment #654341 -
Flags: review?(wjohnston)
Attachment #654341 -
Flags: review+
Attachment #654341 -
Flags: feedback?(mark.finkle)
Attachment #654341 -
Flags: feedback?(ibarlow)
Assignee | ||
Comment 8•12 years ago
|
||
Moved r+. As per wesj's comment, undid reorganization to better preserve hg history.
Attachment #654341 -
Attachment is obsolete: true
Attachment #654341 -
Flags: feedback?(mark.finkle)
Attachment #654341 -
Flags: feedback?(ibarlow)
Attachment #655221 -
Flags: review+
Assignee | ||
Comment 9•12 years ago
|
||
Moved r+. Accidentally left rkd's name on the patch.
Attachment #655221 -
Attachment is obsolete: true
Attachment #655225 -
Flags: review+
Assignee | ||
Comment 10•12 years ago
|
||
Try: https://tbpl.mozilla.org/?tree=Try&rev=ab6bd050d093
Parent commit looks okay: https://tbpl.mozilla.org/?rev=eccef9b3f1f1
Keywords: checkin-needed
Comment 11•12 years ago
|
||
(In reply to Michael Comella (:mcomella) from comment #10)
> Try: https://tbpl.mozilla.org/?tree=Try&rev=ab6bd050d093
Green on Try.
https://hg.mozilla.org/integration/mozilla-inbound/rev/1d702ef4214a
Flags: in-testsuite-
Keywords: checkin-needed
Comment 12•12 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 18
Comment 13•12 years ago
|
||
Care for channel uplift here?
Comment 14•12 years ago
|
||
(In reply to Aaron Train [:aaronmt] from comment #13)
> Care for channel uplift here?
Nope. It can ride the trains.
Updated•12 years ago
|
Status: RESOLVED → VERIFIED
status-firefox14:
affected → ---
status-firefox15:
affected → ---
status-firefox16:
affected → ---
status-firefox17:
affected → ---
status-firefox18:
--- → verified
Flags: in-moztrap?(fennec)
Comment 15•12 years ago
|
||
Behavior covered by the existing test case in the Context Menu testsuite under the BFTs testrun: https://moztrap.mozilla.org/manage/cases/_detail/5513/
Flags: in-testsuite-
Flags: in-moztrap?(fennec)
Flags: in-moztrap+
Updated•4 years ago
|
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•