Closed Bug 921468 Opened 11 years ago Closed 10 years ago

[tablet] Empty space at the top of about:home list views

Categories

(Firefox for Android Graveyard :: Awesomescreen, defect, P5)

ARM
Android
defect

Tracking

(fennec+)

RESOLVED WORKSFORME
Tracking Status
fennec + ---

People

(Reporter: gcp, Unassigned, Mentored)

References

Details

(Whiteboard: [lang=java])

Attachments

(2 files)

Attached image Screenshot of glitch
Android 3.2, Galaxy Tab 10.1

Note the top part of the Twitter URL+favicon is cut off.
I kind of see the same thing when viewing an about:home snippet banner, maybe related?
tracking-fennec: --- → ?
gcp, is the list scrolled a bit or is it just cut off when it's initially displayed?
Flags: needinfo?(gpascutto)
Looks cut off to me, see screenshot.
Flags: needinfo?(gpascutto)
GCP, can you add STR?
Flags: needinfo?(gpascutto)
Margaret has a 10.1 device to try as well.
Flags: needinfo?(margaret.leibovic)
Keywords: qawanted
I can reproduce this. I'll see if I can figure out how to fix it.
Assignee: nobody → margaret.leibovic
Flags: needinfo?(margaret.leibovic)
Keywords: qawanted
Also reproducible on a Nexus 10.
Flags: needinfo?(gpascutto)
So, this same issue happens if you scroll any list in the tablet UI because we have a space at the top of the page. I agree it does look weird, but I don't know what the solution should be. Maybe instead of creating a thin gray border for the top item in the list, we should make sure that space just has a bottom gray border. However, this would only work for the regular list pages, not the page with thumbnails.

I'm not familiar with what we decided to do for tablets, maybe Sriram would know more.
Flags: needinfo?(sriram)
Flags: needinfo?(ibarlow)
(In reply to :Margaret Leibovic from comment #8)
> So, this same issue happens if you scroll any list in the tablet UI because
> we have a space at the top of the page. I agree it does look weird, but I
> don't know what the solution should be. Maybe instead of creating a thin
> gray border for the top item in the list, we should make sure that space
> just has a bottom gray border. However, this would only work for the regular
> list pages, not the page with thumbnails.
> 
> I'm not familiar with what we decided to do for tablets, maybe Sriram would
> know more.

If you want the top padding to go away when you scroll the list down, you could remove the padding from the listview itself...

http://mxr.mozilla.org/mozilla-central/source/mobile/android/base/resources/values-large-v11/styles.xml#65

...and move it to the top divider view (which we add a header view):

http://mxr.mozilla.org/mozilla-central/source/mobile/android/base/home/HomeListView.java#70

If you do that, it would be nice if we could set the "top divider's top padding" independently via styles.xml.
(In reply to Lucas Rocha (:lucasr) from comment #9)
> (In reply to :Margaret Leibovic from comment #8)
> > So, this same issue happens if you scroll any list in the tablet UI because
> > we have a space at the top of the page. I agree it does look weird, but I
> > don't know what the solution should be. Maybe instead of creating a thin
> > gray border for the top item in the list, we should make sure that space
> > just has a bottom gray border. However, this would only work for the regular
> > list pages, not the page with thumbnails.
> > 
> > I'm not familiar with what we decided to do for tablets, maybe Sriram would
> > know more.
> 
> If you want the top padding to go away when you scroll the list down, you
> could remove the padding from the listview itself...
> 
> http://mxr.mozilla.org/mozilla-central/source/mobile/android/base/resources/
> values-large-v11/styles.xml#65
> 
> ...and move it to the top divider view (which we add a header view):
> 
> http://mxr.mozilla.org/mozilla-central/source/mobile/android/base/home/
> HomeListView.java#70
> 
> If you do that, it would be nice if we could set the "top divider's top
> padding" independently via styles.xml.

Thanks for the suggestion, this appears to be a good solution. Setting padding on the top divider view doesn't seem to be working for me, but setting the height of the view to include the space we'd want for padding is working. However, I found that with this approach the space at the top of the top sites grid view disappears, so maybe HomeListView isn't the right place to be adding this space.

Aside: it's pretty non-intuitive that removing the top padding in the "Widget.BookmarksListView" style removes the top padding from all of the pages in about:home. Why is this?
Attached patch WIPSplinter Review
Here's what I was working with.
Attachment #819174 - Flags: feedback?(lucasr.at.mozilla)
tracking-fennec: ? → ---
tracking-fennec: --- → ?
(In reply to :Margaret Leibovic from comment #10)
> (In reply to Lucas Rocha (:lucasr) from comment #9)
> > (In reply to :Margaret Leibovic from comment #8)
> > > So, this same issue happens if you scroll any list in the tablet UI because
> > > we have a space at the top of the page. I agree it does look weird, but I
> > > don't know what the solution should be. Maybe instead of creating a thin
> > > gray border for the top item in the list, we should make sure that space
> > > just has a bottom gray border. However, this would only work for the regular
> > > list pages, not the page with thumbnails.
> > > 
> > > I'm not familiar with what we decided to do for tablets, maybe Sriram would
> > > know more.
> > 
> > If you want the top padding to go away when you scroll the list down, you
> > could remove the padding from the listview itself...
> > 
> > http://mxr.mozilla.org/mozilla-central/source/mobile/android/base/resources/
> > values-large-v11/styles.xml#65
> > 
> > ...and move it to the top divider view (which we add a header view):
> > 
> > http://mxr.mozilla.org/mozilla-central/source/mobile/android/base/home/
> > HomeListView.java#70
> > 
> > If you do that, it would be nice if we could set the "top divider's top
> > padding" independently via styles.xml.
> 
> Thanks for the suggestion, this appears to be a good solution. Setting
> padding on the top divider view doesn't seem to be working for me, but
> setting the height of the view to include the space we'd want for padding is
> working. However, I found that with this approach the space at the top of
> the top sites grid view disappears, so maybe HomeListView isn't the right
> place to be adding this space.

What I had in mind was a new style attribute in HomeListView called inContentMarginTop or something. This would be a separate view from the divider. You'd add another header view before the current top divider one with the height defined by inContentMarginTop. This way you can set the in-content top margin for each pane without having to show a top divider (which is why the space at the top of top sites grid disappears with your patch). 

> Aside: it's pretty non-intuitive that removing the top padding in the
> "Widget.BookmarksListView" style removes the top padding from all of the
> pages in about:home. Why is this?

BookmarksListView should probably be renamed to something more generic. Please file a follow-up to track this.
Comment on attachment 819174 [details] [diff] [review]
WIP

This is roughly the idea but defining a separate style attribute which controls a different header view is probably a better way to go.
Attachment #819174 - Flags: feedback?(lucasr.at.mozilla) → feedback+
Flags: needinfo?(ibarlow)
tracking-fennec: ? → +
Flags: needinfo?(sriram)
I haven't had time to work on this. IIRC, this bug only affects honeycomb, which makes me think we should just WONTFIX it.
Assignee: margaret.leibovic → nobody
Earlier it was said it reproduces on the Nexus 10, so it's not Honeycomb specific but affects all big tablets, AFAIK.
(In reply to Gian-Carlo Pascutto (:gcp) from comment #15)
> Earlier it was said it reproduces on the Nexus 10, so it's not Honeycomb
> specific but affects all big tablets, AFAIK.

Margaret, could you actually reproduce this bug on a Nexus 10?
Flags: needinfo?(margaret.leibovic)
(In reply to Lucas Rocha (:lucasr) from comment #16)
> (In reply to Gian-Carlo Pascutto (:gcp) from comment #15)
> > Earlier it was said it reproduces on the Nexus 10, so it's not Honeycomb
> > specific but affects all big tablets, AFAIK.
> 
> Margaret, could you actually reproduce this bug on a Nexus 10?

wesj said he could reproduce this on a Nexus 10... and I see now I actually said that in comment 7 as well. I must be misremembering our past conversations, or maybe there was some confusion about what exactly the problem is here.

In any case, we should keep this open and try to fix it.

I'm busy with other things right now, but I'll mark it as a mentor bug because it's a well-scoped issue. However, anyone who wants to work on this bug will need a tablet to test.
Flags: needinfo?(margaret.leibovic)
Summary: Layout glitch in about:home display → [tablet] Empty space at the top of about:home list views
Whiteboard: [mentor=margaret][lang=java]
Mentor: margaret.leibovic
Whiteboard: [mentor=margaret][lang=java] → [lang=java]
filter on [mass-p5]
Priority: -- → P5
This appears to have been fixed at some point.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → WORKSFORME
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: