Closed Bug 802148 Opened 12 years ago Closed 11 years ago

Offer a long-tap context menu for about:home top-site thumbnails

Categories

(Firefox for Android Graveyard :: General, enhancement)

ARM
Android
enhancement
Not set
normal

Tracking

(Not tracked)

VERIFIED WORKSFORME

People

(Reporter: aaronmt, Assigned: wesj)

References

Details

Attachments

(1 file)

Currently there is no context menu for long-tap holding on thumbnails on about:home. It would be nice they had them.

* "Open in New Tab"
* "Share"
* "Remove" (might be plans elsewhere)
* "Add to Home Screen"
(In reply to Aaron Train [:aaronmt] from comment #0)

> * "Remove" (might be plans elsewhere)

This would probably be a part of bug 783312. However, we already have code to remove an entry from the awesomescreen top sites, so this shouldn't be hard to implement.
I always imagined we'd use long press to activate a "customize" mode on about:home. Sorta like the Android homescreen.
(In reply to Wesley Johnston (:wesj) from comment #2)
> I always imagined we'd use long press to activate a "customize" mode on
> about:home. Sorta like the Android homescreen.

Ian does have plans for customizing the home page.
(In reply to Mark Finkle (:mfinkle) from comment #3)

> Ian does have plans for customizing the home page.

Yeah, it's more along the lines of what Wes is suggesting, the ability to customize what you see on this page. Some rough sketching here: http://cl.ly/image/1F1R2J1W1d1c/o
While I can see the value of more link-style long tap actions (open in new tab, share etc), it's Customization that people are really asking for on an ongoing basis.
Attached patch PatchSplinter Review
This adds "Open in New Tab", "Open in Private Tab", "Share", and "Add to homescreen". I reused the same strings we show in other context menus. We do the same thing in desktop Firefox when Context menu items are shown in different places, so I think that's fine.
Attachment #697295 - Flags: review?(mark.finkle)
I am not against adding these, but I'd like Ian to provide feedback too. I don't want to crowd the menu now that we support "Edit", "Pin Site", etc.
Flags: needinfo?(ibarlow)
Comment on attachment 697295 [details] [diff] [review]
Patch

>diff --git a/mobile/android/base/AboutHomeContent.java b/mobile/android/base/AboutHomeContent.java

>+    public void newTab() {
>+        newTab(Tabs.LOADURL_NEW_TAB);
>+    }
>+
>+    public void newPrivateTab() {
>+        newTab(Tabs.LOADURL_NEW_TAB | Tabs.LOADURL_PRIVATE);
>+    }
>+
>+    public void newTab(int flags) {
>+        int position = mTopSitesGrid.getSelectedPosition();
>+        View v = mTopSitesGrid.getChildAt(position);
>+
>+        TopSitesViewHolder holder = (TopSitesViewHolder) v.getTag();
>+        Tabs.getInstance().loadUrl(holder.url, flags);
>+    }

Bug 826273 adds some code for dealing with normal/private tabs, but not the same as what you are doing. I don't think there is any overlap with bug 826273, so this code is fine.

>+    public void share() {
>+        int position = mTopSitesGrid.getSelectedPosition();
>+        View v = mTopSitesGrid.getChildAt(position);
>+
>+        TopSitesViewHolder holder = (TopSitesViewHolder) v.getTag();
>+        mActivity.shareUrl(holder.url, holder.titleView.getText().toString());

We show the list of "shareable" apps in our own menu for other actions. Does this use our menu, or just open Android's activity handler for sharing?

>diff --git a/mobile/android/base/BrowserApp.java b/mobile/android/base/BrowserApp.java

>+            case R.id.abouthome_topsites__new_tab:
>+            case R.id.abouthome_topsites__new_private_tab:

why a double __ before "new"? Also, Sriram is changing "xxx_new_private_tab" to "xxx_private_tab" (dropping the "new")

r- for the figuring out the "share" behavior and fixing the string/menu IDs. Once we figure out what "Share" should do we can move forward with this.
Attachment #697295 - Flags: review?(mark.finkle) → review-
(In reply to Mark Finkle (:mfinkle) from comment #9)

> >+            case R.id.abouthome_topsites__new_tab:
> >+            case R.id.abouthome_topsites__new_private_tab:
> 
> why a double __ before "new"? Also, Sriram is changing "xxx_new_private_tab"
> to "xxx_private_tab" (dropping the "new")

That's in bug 826487
I am a little worried about the menu people will see now. Adding these items will make it harder to understand that these boxes are customizable, and the menu will simply be too long as well:


-------------------
Open in new tab
Open in private tab
Share
Add to homescreen
Edit
Pin site
Unpin all sites
-------------------


Do we really think Share and Add to Homescreen are necessary in this context? I've always looked at about:home as a starting point, and not a place where I would be inclined to share something from directly, nor add a page to my home screen. I could, however, see value in being able to open things in new tabs. 

What if we pared the list down a bit, and looked at adding some kind of divider between kinds of list items?


-------------------
Open in new tab
Open in private tab
-------------------
Edit
Pin site
Unpin all sites
-------------------


I'm still not 100% crazy about this, but it does feel a little more manageable at least.
Flags: needinfo?(ibarlow)
Assignee: nobody → wjohnston
Summary: Offer a long-tap context menu for about:home screenshots → Offer a long-tap context menu for about:home top-site thumbnails
Based on ian's feedback, I'm just going to mark this WONTFX.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → WONTFIX
heh, I'd settle for just having open in a new background tab
Lies. This is fixed.
Status: RESOLVED → VERIFIED
Resolution: WONTFIX → WORKSFORME
(In reply to Ian Barlow (:ibarlow) from comment #11)
> I am a little worried about the menu people will see now. Adding these items
> will make it harder to understand that these boxes are customizable, and the
> menu will simply be too long as well:
> 
> 
> -------------------
> Open in new tab
> Open in private tab
> Share
> Add to homescreen
> Edit
> Pin site
> Unpin all sites
> -------------------
> 
> 
> Do we really think Share and Add to Homescreen are necessary in this
> context? I've always looked at about:home as a starting point, and not a
> place where I would be inclined to share something from directly, nor add a
> page to my home screen. I could, however, see value in being able to open
> things in new tabs. 
> 
> What if we pared the list down a bit, and looked at adding some kind of
> divider between kinds of list items?
> 
> 
> -------------------
> Open in new tab
> Open in private tab
> -------------------
> Edit
> Pin site
> Unpin all sites
> -------------------
> 
> 
> I'm still not 100% crazy about this, but it does feel a little more
> manageable at least.

Yaaay! Custom dialog popups!
Blocks: 931021
No longer blocks: 931021
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: