Closed Bug 1348716 Opened 3 years ago Closed 3 years ago

Copy link in CustomTabsActivity by long-clicking in Title

Categories

(Firefox for Android :: General, enhancement)

enhancement
Not set

Tracking

()

VERIFIED FIXED
Firefox 55
Tracking Status
firefox55 --- verified

People

(Reporter: walkingice, Assigned: walkingice)

References

(Blocks 2 open bugs)

Details

Attachments

(1 file)

A feature to implement. If user long-click title of ActionBar, we should copy current page link to clipboard and give a prompt 'URL Copied'
Assignee: nobody → walkingice0204
Comment on attachment 8850975 [details]
Bug 1348716 - Long click to copy URL in custom tabs

https://reviewboard.mozilla.org/r/123474/#review125910

::: mobile/android/base/java/org/mozilla/gecko/customtabs/CustomTabsActivity.java:468
(Diff revision 1)
> +                Toast.makeText(getContext(),
> +                        R.string.custom_tabs_toast_url_copy,
> +                        Toast.LENGTH_SHORT)
> +                        .show();

We replaced most of our toasts with Snackbar. Consider using our SnackbarBuilder class (but this is something for UX to decide).

::: mobile/android/base/locales/en-US/android_strings.dtd:289
(Diff revision 1)
>  <!ENTITY pref_custom_tabs_summary3 "Allow apps to open websites using a customized version of &brandShortName;">
>  <!-- Localization note (custom_tabs_menu_item_open_in): The variable is replaced by the name of
>       default browser from user's preference, such as "Open in Firefox" -->
>  <!ENTITY custom_tabs_menu_item_open_in "Open in &formatS;">
>  <!ENTITY custom_tabs_menu_footer "Powered by &brandShortName;">
> +<!ENTITY custom_tabs_toast_url_copy "URL copied">

Please add a localization note describing when and how this string is disabled so that our translators know the context of this string.
Attachment #8850975 - Flags: review?(s.kaspari)
Comment on attachment 8850975 [details]
Bug 1348716 - Long click to copy URL in custom tabs

https://reviewboard.mozilla.org/r/123474/#review125910

> We replaced most of our toasts with Snackbar. Consider using our SnackbarBuilder class (but this is something for UX to decide).

OK! That's my bad. I asked designer and he said using Snackbar is good. Updated.
Comment on attachment 8850975 [details]
Bug 1348716 - Long click to copy URL in custom tabs

https://reviewboard.mozilla.org/r/123474/#review126768

Yay! \o/

::: mobile/android/base/java/org/mozilla/gecko/customtabs/CustomTabsActivity.java:22
(Diff revision 2)
>  import android.os.Bundle;
>  import android.support.annotation.ColorInt;
>  import android.support.annotation.NonNull;
>  import android.support.annotation.StyleRes;
>  import android.support.annotation.VisibleForTesting;
> +import android.support.design.widget.Snackbar;

nit: This import might be unused? (But I didn't verify)
Attachment #8850975 - Flags: review?(s.kaspari) → review+
Comment on attachment 8850975 [details]
Bug 1348716 - Long click to copy URL in custom tabs

https://reviewboard.mozilla.org/r/123474/#review126768

> nit: This import might be unused? (But I didn't verify)

Thanks. I'd use Snackbar.LENGTH_SHORT as duration :-)
Keywords: checkin-needed
Pushed by ryanvm@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/35b016df8beb
Long click to copy URL in custom tabs r=sebastian
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/35b016df8beb
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 55
Verified as fixed in build 55.0a1 (2017-04-02), by long click on a URL a snackbar is displayed with the following message "URL copied". 
Device: Huawei Honor (Android 5.1.1).
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.