Closed Bug 940997 Opened 11 years ago Closed 11 years ago

The new quick share row in the menu looks visually unbalanced

Categories

(Firefox for Android Graveyard :: General, defect)

All
Android
defect
Not set
normal

Tracking

(firefox29 verified, fennec29+)

VERIFIED FIXED
Firefox 29
Tracking Status
firefox29 --- verified
fennec 29+ ---

People

(Reporter: lucasr, Assigned: sriram)

References

Details

Attachments

(6 files, 12 obsolete files)

44.36 KB, patch
mfinkle
: review+
Details | Diff | Splinter Review
44.78 KB, patch
mfinkle
: review+
Details | Diff | Splinter Review
8.65 KB, patch
mfinkle
: review+
Details | Diff | Splinter Review
8.58 KB, patch
mfinkle
: review+
Details | Diff | Splinter Review
6.29 KB, patch
mfinkle
: review+
Details | Diff | Splinter Review
218.47 KB, image/png
Details
From IRC:

<lucasr> ibarlow, first a more high-level impression: the composition looks a bit unbalanced (visually)
<lucasr> ibarlow, there's too much weight at the top of the menu now
<lucasr> and the two first rows don't have the same height which is kinda strange
<lucasr> and the separators are different too
<lucasr> the visual flow looks a bit inconsistent
<lucasr> maybe it wouldn't feel this way if the share buttons were, say, in the middle of the menu or something
<lucasr> but because they come just after the top buttons, your brain kinda expects them to feel like the same type of thing
<lucasr> what about the separators?
<ibarlow> either the two rows need to be separated, or more visually distinct from each other
<lucasr> different bg color?
<mfinkle> maybe a thicker separator line for the top row of buttons?
<ibarlow> yeah that's kind of what i was thinking. different background colour, possibly a thicker separator between the rows
tracking-fennec: ? → 28+
Assignee: nobody → ibarlow
Lucas and I landed on this as the new menu design that cleans up a lot of visual clutter. http://cl.ly/image/3z3Y1V241J3H

Changes in these designs:
* Remove arrow pointer from the top of the menu
* Use different background colour for top row
* Add a back arrow into menu
* Place Bookmark and Share on the same row
* Add a "more" arrow next to the generic share icon
* Replace airplane with generic share icon
* Populate quick share items to the left of the share icon instead of the right 
* Remove all other menu list icons (new tab, find in page etc)

Note that tablets will behave a little differently here

* Small tablets will simply hide the row with [back/fwd/refresh], since those controls are in the title bar
* For large tablets, we'll need to decide whether we want to move the quick share items out into the title bar to sit with [bookmark], or if we want to leave them in the menu.
Assignee: ibarlow → lucasr.at.mozilla
tracking-fennec: 28+ → ?
tracking-fennec: ? → 28+
Wes, could you have a look at this one? You're probably more familiar with this code than me.
Assignee: lucasr.at.mozilla → wjohnston
We decided to revert FF28 to use the single quickshare UI (see bug 946233). Re-nominating.
tracking-fennec: 28+ → ?
tracking-fennec: ? → 29+
Uploading WIP patches.

These are just basic coloring/divider changes.
This removes the old bookmark item
This lets action item's assign listeners that can cancel the normal handling of clicks.
Attached patch Patch 4/12 (obsolete) — Splinter Review
This adds "back" to the menu.
This may need to be reworked. It forces addActionButton to return the new view, and forces it to always create/return one. It also modifies the order views are added.
This allows you to add your own, non-intent actions to the provider. These are treated a bit different than normal items. i.e. They're always shown and don't reorder themselves. I think that matches what we want with "Bookmark" (i.e. "Bookmark" should never be booted from the menu if you don't use it?) but wouldn't necessarily match what we'd want with ALL of these types of items.
This adds the bookmark action
Updated
Attachment #8343623 - Attachment is obsolete: true
This just removes the arrow from this menu.
This adds the "more" arrow to the action menu button, even when its in icon mode.
Attached patch Patch 10/12 (obsolete) — Splinter Review
Make the number of action items shown before we flip the share icon to "small" mode configurable. I'm probably trying to hard to support the old configuration here, but I wanted these changes to be easy to turn on/off while we work on 'em.
This disables icons in menus. It uses a static const to determine what we do. I don't love that. Looking for smarter ways...
Whoops. There was no patch 12 :)
This kills icons in the long share menu. We should probably not do that (its hard to identify apps without icons).
(In reply to Ian Barlow (:ibarlow) from comment #1)
> Changes in these designs:
> * Replace airplane with generic share icon

This bug also covering the one used in the reader-mode toolbar?
Someone had already changed the share icon. I don't know who/how.
Architectural design & concerns:
--------------------------------

As per the new mockup,
1. The first row has the browser controls - back/forward/refresh.
2. The second row has 'save' related controls.
   -- Bookmark as an icon.
   -- Share (and frequently used apps) as icons, provided by an ActionProvider.

In the earlier design, the first row icons were treated as "action-items". The "Share" was a special kind of row, as it was backed by an ActionProvider. The first row was as "header" to the ListView that shows the menu. Note: The "Share" was a row in the ListView.

What this means:
1. The header is a View, that has ImageViews added to it. They are not backed by an adapter. They live in the app's lifecycle always.
2. The ListView is inflated, only when the menu is about to be shown. This is backed by an adapter, and the UI is inflated only when an user presses the "menu" button.
   -- The "Share" is a row in the ListView. This means, the menu will ask the provider to give the "latest" View, based on the Intent and the apps, right before the ListView is about to be shown. In other words, this row is inflated only once -- right before UI is shown -- every time the ListView is shown.

What changes now:
1. The first row has a blue background to group few controls.
2. The second row has the usual color.
   -- Bookmark and Share occupies the same row.

Proposal:
1. As earlier, the first row can still represent the "action-items". They will now represent only the "action-items" that have a value of "always" for "showAsAction". This way, either the url-bar or the ICS-action-mode or this first row can be an ActionItemBarPresenter. Everything works as before without any problem.
2. The second row can represent "action-items" that have a value of "ifRoom" for "showAsAction".
   -- Strictly speaking, "ifRoom" doesn't mean this. However, we made a decision to use only android's menu attributes in menu.xml. This helps in parsing the XML files. So, re-using "ifRoom" seems a better option.
   -- Every menu will have a "secondary ActionItemBarPresenter" that shows the "ifRoom" action-items. These entries will never show up in the primary presenter -- url-bar, first row in main menu, ICS-action-mode.
   -- Since they are still action-items, more than one MenuItem can share a single row.
   -- ActionItemBarPresenter is still a(nother) header in the ListView.

This approaches works and produces an output like above.

Problems:
1. Since the Presenter is a "header" for the ListView, the views are held in the app's lifecycle always. They are not backed by the ListView's adapter.
2. Bookmark and Share are "action-items" and not rows in the ListView.
3. Whenever there is a change in the webpage shown, like location change, we call invalidateOptionsMenu() to trigger update of menu items. This is what ensures the proper state of action-items -- like reflecting if a page is bookmarked or not.
4. This invalidateOptionsMenu() will now cause inflate the "Share" menu again and again, as this is an "action-item".
   -- This doesn't seem good for performance. There could be as much as 8-10 invalidateOptionsMenu() for a simple page load.
   -- Entries in the ListView are not affected as they are not inflated-and-refreshed until shown.
5. Making "bookmark" another entry in ActionProvider, and making Share just another row in ListView doesn't feel right.
   -- Quick share is available only 14+
   -- Messing up with the history.xml (of the ActionProvider) by injecting our own entries doesn't feel safe and good.

To summarize:
1. Having "bookmark" and "share" in the same row makes it use "action-items" concept.
2. This causes these views to be in memory always.
3. "share" and the app-icons are re-inflated every time something changes in the webpage. Typically 8-10 for a page load.

Options:
1. They both can be in two different rows, so they are part of ListViews as before.
   -- In the future, if "bookmark", "add to reading list", "add to home screen" are grouped into a single row, then that could be backed by an ActionProvider. Share will be backed by an ActionProvider. And each of these entries "backed by an ActionProvider" will take one row each in the ListView. And they won't be inflated-or-refreshed unless they are shown.
Assignee: wjohnston → sriram
This patch changes the look and feel of first row in the custom menu. Additionally a "back" menu is added. Hence, in this patch, the bookmark is downgraded to be just another row in the main menu. (this will be reverted in next patch -- but for completion sake, this is so, in this patch).
Attachment #8349692 - Flags: review?(mark.finkle)
As per IRC discussions, the second row has entries from menu items that describes themselves as "ifRoom" action-items. This patch works as expected.
Attachment #8349694 - Flags: review?(mark.finkle)
Attachment #8349692 - Flags: review?(mark.finkle) → review+
Comment on attachment 8349694 [details] [diff] [review]
Part (2/2): Support "ifRoom"

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

>+        if (historySize > dataModel.getActivityCount()) {
>+            return view;
>+        }

Add a comment about  why this code is returning early without adding an action button

Someday we need to document how the GeckoMenu system works, why it exists and how the main menu uses "action bar".
Attachment #8349694 - Flags: review?(mark.finkle) → review+
This removes icons from the main menu. These are shown only for the GeckoActionProvider's sub menu (basically the apps).

The actual PNG resources are left behind -- as discussed.
Attachment #8349725 - Flags: review?(mark.finkle)
Attachment #8349725 - Flags: review?(mark.finkle) → review+
Depends on: 952112
There's so much magic in here!

As per Ian's mockup,
1. Center the "Share" icon, place the arrow at 5dp to its right.
2. If the width is too small, and the arrow is getting pushed to its edges, then center the "share + arrow" as a whole.

And that required a lot of math. Had to use a paint for disabled option, as we are using the bitmap directly.

The arrow is off-centered a bit. That's a resource problem and will be fixed by replacing images.
Attachment #8343616 - Attachment is obsolete: true
Attachment #8343617 - Attachment is obsolete: true
Attachment #8343618 - Attachment is obsolete: true
Attachment #8343619 - Attachment is obsolete: true
Attachment #8343621 - Attachment is obsolete: true
Attachment #8343622 - Attachment is obsolete: true
Attachment #8343624 - Attachment is obsolete: true
Attachment #8343627 - Attachment is obsolete: true
Attachment #8343628 - Attachment is obsolete: true
Attachment #8343629 - Attachment is obsolete: true
Attachment #8343630 - Attachment is obsolete: true
Attachment #8350344 - Flags: review?(mark.finkle)
Attachment #8350344 - Flags: review?(mark.finkle) → review+
(In reply to Sriram Ramasubramanian [:sriram] from comment #28)

> The arrow is off-centered a bit. That's a resource problem and will be fixed
> by replacing images.

Have you asked for new images?

Also, a different question: Is it possible to display the share image, ">", in a disabled state? When using Guest Browsing, only the bookmark star is shown on that row of the menu, since sharing is not allowed in as a Guest. It makes the menu look a bit weird. If we could show the disabled share image, it might be more balanced.

Maybe Ian has other ideas for that situation.
Flags: needinfo?(ibarlow)
Here are some new arrow images, Sriram http://cl.ly/0s0P2I2t012c Just bear in mind that this will also affect the "Tools" arrow, you'll need to move that down a bit because it's already centered with the current assets we use.

(In reply to Mark Finkle (:mfinkle) from comment #29)
> Also, a different question: Is it possible to display the share image, ">",
> in a disabled state? When using Guest Browsing, only the bookmark star is
> shown on that row of the menu, since sharing is not allowed in as a Guest.
> It makes the menu look a bit weird. If we could show the disabled share
> image, it might be more balanced.
> 
> Maybe Ian has other ideas for that situation.

Thats a good point. I would suggest either showing disabled Share, *or* hiding the bookmarks option from Guest Browsing as well (do guests really need to be able to bookmark?).
Flags: needinfo?(ibarlow)
(In reply to Ian Barlow (:ibarlow) from comment #30)
> Here are some new arrow images, Sriram http://cl.ly/0s0P2I2t012c Just bear
> in mind that this will also affect the "Tools" arrow, you'll need to move
> that down a bit because it's already centered with the current assets we use.
> 
> (In reply to Mark Finkle (:mfinkle) from comment #29)
> > Also, a different question: Is it possible to display the share image, ">",
> > in a disabled state? When using Guest Browsing, only the bookmark star is
> > shown on that row of the menu, since sharing is not allowed in as a Guest.
> > It makes the menu look a bit weird. If we could show the disabled share
> > image, it might be more balanced.
> > 
> > Maybe Ian has other ideas for that situation.
> 
> Thats a good point. I would suggest either showing disabled Share, *or*
> hiding the bookmarks option from Guest Browsing as well (do guests really
> need to be able to bookmark?).

Disabling share is a better option. I was discussing the possibility of having each row show either text or icon. But that's going to bloat the hierarchy a lot. I guess, it's safe to just disable the share.
There was an issue with translation. Since we should not move the background, but only the image, "onDraw" should be overriden. That's fixed in this.

I can fold this with the other one and push it.
Attachment #8350715 - Flags: review?(mark.finkle)
Attachment #8350715 - Flags: review?(mark.finkle) → review+
Attached image UXproposal.png
Copy of http://cl.ly/image/3z3Y1V241J3H/o for archival purposes, because external services can go away.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Whiteboard: [leave-open]
Target Milestone: --- → Firefox 29
Depends on: 958121
Nightly 29.0a1 2014-01-14 
I can see the changes (mentioned in the UX proposals) in the latest build. 

Is this going to be uplifted to Aurora too?
(In reply to Ioana Chiorean from comment #36)
> Nightly 29.0a1 2014-01-14 
> I can see the changes (mentioned in the UX proposals) in the latest build. 
> 
> Is this going to be uplifted to Aurora too?

Nope, we've reverted the feature entirely from 28 (see bug 946233)
Thanks Lucas, saw the bug only after I've post the comment. 

Setting bug as verified fixed.
Status: RESOLVED → VERIFIED
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: