Closed Bug 1210242 Opened 9 years ago Closed 9 years ago

Support assist icon for Search Activity in Lollipop

Categories

(Firefox for Android Graveyard :: Search Activity, defect)

defect
Not set
normal

Tracking

(firefox45 fixed)

RESOLVED FIXED
Firefox 45
Tracking Status
firefox45 --- fixed

People

(Reporter: tynn, Assigned: tynn)

Details

Attachments

(2 files, 3 obsolete files)

AOSP removed the generic assist icon in Lollipop. If Fennec is the default application for ACTION_ASSIST intents, only the white circle is displayed. Instead an icon should be defined and displayed.
Attached image search_panel_view_assist.png (obsolete) —
I've referenced icon_search_empty_firefox for this shot. Setting the same reference to 0 for pre Lollipop keeps things unchanged there.
Attachment #8668189 - Flags: feedback?(michael.l.comella)
Comment on attachment 8668189 [details] search_panel_view_assist.png Oh cool! Anthony is our UX designer and would be a better person to ask here.
Attachment #8668189 - Flags: feedback?(michael.l.comella) → feedback?(alam)
Comment on attachment 8668189 [details] search_panel_view_assist.png Neat! Though I'm not sure this is the best icon to use in this situation. We have an app icon for the Search Activity. Could we try that? It's the orange circle with our Search icon inside.
Attachment #8668189 - Flags: feedback?(alam) → feedback-
Attachment #8668189 - Attachment is obsolete: true
Attachment #8671541 - Flags: feedback?(alam)
Comment on attachment 8671541 [details] search_panel_view_assist.png Nice! What's limiting the size here? Or is that the way all icons sit inside this white circle?
Attachment #8671541 - Flags: feedback?(alam) → feedback+
Attached patch bug1210242.patch (obsolete) — Splinter Review
The size is limited by the actual size of the icon itself. Additionally the white circle has its maximum expansion of the image. But I'm not entirely sure if there's a maximum size. Usually the size of the assist icon is larger than the launcher icon. That's why I chose the gray firefox for the first image. The SystemUI reads the resource as integer and using 0 for pre Lollipop ensures the usage of the generic assist icon like before.
Attachment #8674385 - Flags: review?(alam)
Comment on attachment 8674385 [details] [diff] [review] bug1210242.patch Handing off to mcomella for the review here.
Attachment #8674385 - Flags: review?(alam) → review?(michael.l.comella)
Hey tynn, So, just to clarify... are we using our largest available asset there? The icon looks a bit small and I know that the white area grows as the user drags further away. I just want to make sure we're aligned with system conventions here in terms of how big this icon should be appearing.
Flags: needinfo?(tynn.dev)
I don't think there's a system convention for this. I don't even know of any official documentation. The SystemUI itself is heavily modified by some manufacturers; on my phone I'm not even able to replace the icon. The search_launcher is the only icon like this, so I would say it's the largest available asset. I ran a test and replaced this 48dp icon with a 64dp version, which looked a little nicer. But this would mean to add additional assets. In contrast, most of the icons used by other apps for the assist action are monochrome, making them look bigger in the context of the circle.
Flags: needinfo?(tynn.dev) → needinfo?(alam)
Comment on attachment 8674385 [details] [diff] [review] bug1210242.patch I'm going to wait until this discussion is finished before reviewing – Christian, can you flag me for review when that is?
Attachment #8674385 - Flags: review?(michael.l.comella)
(In reply to Christian Schmitz (:tynn) from comment #9) > I don't think there's a system convention for this. I don't even know of any > official documentation. The SystemUI itself is heavily modified by some > manufacturers; on my phone I'm not even able to replace the icon. > > The search_launcher is the only icon like this, so I would say it's the > largest available asset. I ran a test and replaced this 48dp icon with a > 64dp version, which looked a little nicer. But this would mean to add > additional assets. > > In contrast, most of the icons used by other apps for the assist action are > monochrome, making them look bigger in the context of the circle. Right, I see what you mean now. My concern is just visual polish in relation to this dynamic white circle that expands as the user drags their finger. Could I see a build? it will help me see this on my devices to be sure it looks OK.
Flags: needinfo?(alam) → needinfo?(tynn.dev)
Flags: needinfo?(tynn.dev) → needinfo?(alam)
Christian showed me more higher res screenshots and he confirmed that he's using our largest build icon with out scaling. So, I'm ok with this. It looks to be a nice added touch. Thanks Christian!
Flags: needinfo?(alam)
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment on attachment 8674385 [details] [diff] [review] bug1210242.patch Review of attachment 8674385 [details] [diff] [review]: ----------------------------------------------------------------- fwiw, it doesn't mean we can't have this but StackOverflow notes this is not official: http://stackoverflow.com/a/22571545 Please flag me for review again when you have a chance to respond. ::: mobile/android/search/manifests/SearchAndroidManifest_activities.xml.in @@ +13,5 @@ > </intent-filter> > > + <meta-data > + android:name="com.android.systemui.action_assist_icon" > + android:resource="@integer/search_assist_launch_res"/> Why is `@integer` necessary? Why can't we use `@drawable` directly here?
Attachment #8674385 - Flags: review?(michael.l.comella)
The provided patch also doesn't work on my N9 5.0.1 – are there specific devices this works on, Christian? (In reply to Christian Schmitz (:tynn) from comment #6) > The SystemUI reads the resource as integer and using 0 for pre Lollipop > ensures the usage of the generic assist icon like before. If I'm understanding correctly, there is a generic icon pre-Lollipop and we don't want to overwrite that so we use integers to ensure we only replace the icon on Lollipop+? If so, add a comment to explain the use of integers and flag me for re-review please.
Flags: needinfo?(tynn.dev)
(In reply to Michael Comella (:mcomella) from comment #13) > fwiw, it doesn't mean we can't have this but StackOverflow notes this is not > official: http://stackoverflow.com/a/22571545 There's no official documentation about this I know about, but considering the default implementation of SystemUI, it was not changed much the last years: For Marshmallow+: https://android.googlesource.com/platform/frameworks/base/+/android-cts-6.0_r1/packages/SystemUI/src/com/android/systemui/assist/AssistManager.java For Lollipop-: https://android.googlesource.com/platform/frameworks/base/+/android-5.1.1_r24/packages/SystemUI/src/com/android/systemui/SearchPanelView.java Only the default icon was remove in Lollipop. > > + android:resource="@integer/search_assist_launch_res"/> > > Why is `@integer` necessary? Why can't we use `@drawable` directly here? <meta-data> is passed as a Bundle and the resource must be retrieved with Bundle.getInt(). I chose to use integer over drawable, because the value 0 for a drawable, or just not providing one for lower API levels, could result in an error when used as real drawable in code or xml. (In reply to Michael Comella (:mcomella) from comment #14) > The provided patch also doesn't work on my N9 5.0.1 – are there specific > devices this works on, Christian? What result did you see? The Google icon or none at all? Or did the assistant fail completely due to some exceptions? This should work for any device using the AOSP implementation of SystemUI. If it's a modified version, it might not work though. But most importantly Firefox Search must be the only or the default assistant to make the icon show. But the main reason I proposed this is, that it's almost impossible to break something. You only gain a better UX for all the devices supporting the default implementation, while nothing changes for all the others. At the end it's just a little meta data tag added to the Activity. > If I'm understanding correctly, there is a generic icon pre-Lollipop and we > don't want to overwrite that so we use integers to ensure we only replace > the icon on Lollipop+? If so, add a comment to explain the use of integers > and flag me for re-review please. I will update the patch with it later tomorrow, but where can I set the flag for re-review of it? I didn't find it this morning.
Flags: needinfo?(tynn.dev) → needinfo?(michael.l.comella)
Attached patch bug1210242.patchSplinter Review
Ok, I've added the comment now. Thank you for all the feedback!
Attachment #8674385 - Attachment is obsolete: true
Flags: needinfo?(michael.l.comella)
Attachment #8677657 - Flags: review?(michael.l.comella)
Attached image N9 blank assist intent (obsolete) —
This is what I get, Christian. NI self to try more devices tomorrow.
Flags: needinfo?(tynn.dev)
Flags: needinfo?(michael.l.comella)
Comment on attachment 8680402 [details] N9 blank assist intent I'm out of ideas. This should be a vanilla and work. Let's defer the testing until I've access to a Nexus device or walk through it together later today.
Flags: needinfo?(tynn.dev)
Christian, I'll get to this tomorrow for sure.
I can't repro this on my Lollipop N4 either. Can you emulate a Nexus device on the emulator, Christian?
Flags: needinfo?(tynn.dev)
Comment on attachment 8677657 [details] [diff] [review] bug1210242.patch Review of attachment 8677657 [details] [diff] [review]: ----------------------------------------------------------------- Clear review flag until we figure out why this isn't working for me.
Attachment #8677657 - Flags: review?(michael.l.comella)
I think I got it! I was building with gradle & Intellij which probably was not building the search activity – d'oh! It works now, yay! :) Sorry about that Christian – let me get to that review.
Flags: needinfo?(tynn.dev)
Flags: needinfo?(michael.l.comella)
Comment on attachment 8677657 [details] [diff] [review] bug1210242.patch Review of attachment 8677657 [details] [diff] [review]: ----------------------------------------------------------------- Looks good – thanks Christian!
Attachment #8677657 - Flags: review+
Keywords: checkin-needed
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 45
No longer depends on: 1223082
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: