Closed
Bug 1091587
Opened 10 years ago
Closed 10 years ago
Improve Private tabs's empty view layout on new tablet UI
Categories
(Firefox for Android Graveyard :: General, defect, P1)
Tracking
(Not tracked)
RESOLVED
FIXED
Firefox 37
People
(Reporter: lucasr, Assigned: mcomella)
References
Details
Attachments
(5 files, 9 obsolete files)
Looks clunky right now (see screenshot).
Reporter | ||
Updated•10 years ago
|
Assignee: lucasr.at.mozilla → nobody
Assignee | ||
Updated•10 years ago
|
Assignee: nobody → michael.l.comella
Status: NEW → ASSIGNED
Assignee | ||
Comment 1•10 years ago
|
||
Assignee | ||
Comment 2•10 years ago
|
||
Assignee | ||
Comment 3•10 years ago
|
||
This is a little awful but since you can't specify styles dynamically, seems better than copy-pastaing the layout. Still needs 10" tab values.
Attachment #8521090 -
Flags: review?(lucasr.at.mozilla)
Assignee | ||
Comment 4•10 years ago
|
||
What say you, antlam?
Attachment #8521093 -
Flags: feedback?(alam)
Assignee | ||
Comment 5•10 years ago
|
||
Attachment #8521094 -
Flags: feedback?(alam)
Reporter | ||
Comment 6•10 years ago
|
||
Comment on attachment 8521090 [details] [diff] [review]
Dynamically layout private tabs panel on 7" tablet
Review of attachment 8521090 [details] [diff] [review]:
-----------------------------------------------------------------
I assume this is necessary because we don't re-inflate the tabs panel container on device rotation? This looks ok as a temporary solution.
Attachment #8521090 -
Flags: review?(lucasr.at.mozilla) → review+
Assignee | ||
Comment 7•10 years ago
|
||
(In reply to Lucas Rocha (:lucasr) from comment #6)
> I assume this is necessary because we don't re-inflate the tabs panel
> container on device rotation? This looks ok as a temporary solution.
What do you mean by this? The dynamic styling?
The tabs panel is re-constructed on device rotation (as opposed to just re-inflated).
Comment 8•10 years ago
|
||
Comment on attachment 8521093 [details]
Patch: 7" tab portrait
I think as a temporary solution, this is fine. But I should add some sort of image there too now that we have all that space. That way, we could be more consistent with the "empty" state of our panels UI too.
Could we vertically center this now that we use the full screen or?
Flags: needinfo?(michael.l.comella)
Attachment #8521093 -
Flags: feedback?(alam) → feedback+
Comment 9•10 years ago
|
||
Comment on attachment 8521094 [details]
Patch: 7" tab landscape
Maybe we could use the same width from the portrait mode to constrain this content a bit.
As with the vertical screen shot, could we center this?
I can come up with specs if you need. :)
Attachment #8521094 -
Flags: feedback?(alam) → feedback-
Assignee | ||
Comment 10•10 years ago
|
||
(In reply to Anthony Lam (:antlam) from comment #9)
> I can come up with specs if you need. :)
That would be very helpful. :) Can you do some for 10" tab too (if it's not the same)?
Flags: needinfo?(michael.l.comella) → needinfo?(alam)
Assignee | ||
Comment 11•10 years ago
|
||
(In reply to Anthony Lam (:antlam) from comment #8)
> Could we vertically center this now that we use the full screen or?
We should be able to do that.
The specs don't need to be visual if that's more difficult - I just need values.
Comment 12•10 years ago
|
||
(In reply to Michael Comella (:mcomella) from comment #10)
> (In reply to Anthony Lam (:antlam) from comment #9)
> > I can come up with specs if you need. :)
>
> That would be very helpful. :) Can you do some for 10" tab too (if it's not
> the same)?
I think we constrain max width for the content at 300 dp in the Sync Panels (from bug 1014994), let's try that!
Flags: needinfo?(alam)
Assignee | ||
Comment 13•10 years ago
|
||
Centering issues, wip.
Attachment #8523014 -
Flags: feedback?(lucasr.at.mozilla)
Assignee | ||
Updated•10 years ago
|
Attachment #8521090 -
Attachment is obsolete: true
Reporter | ||
Comment 14•10 years ago
|
||
As discussed on IRC, this is likely happening because we're ignoring the toolbar size when calculating the height of the tabs panel's content area.
Reporter | ||
Updated•10 years ago
|
Attachment #8523014 -
Flags: feedback?(lucasr.at.mozilla)
Reporter | ||
Comment 15•10 years ago
|
||
Reporter | ||
Updated•10 years ago
|
Priority: -- → P1
Assignee | ||
Comment 16•10 years ago
|
||
(In reply to Lucas Rocha (:lucasr) from comment #15)
> For reference:
> https://mxr.mozilla.org/mozilla-central/source/mobile/android/base/tabs/
> TabsPanel.java#246
I believe that DisplayMetrics.heightPixels, which we use to determine the size of the view, also includes the notification bar as well as the Android soft system buttons (e.g. back, home, recent apps).
Assignee | ||
Comment 17•10 years ago
|
||
According to the docs [1]:
The application display area specifies the part of the display that may contain an application window, excluding the system decorations. The application display area may be smaller than the real display area because the system subtracts the space needed for decor elements such as the status bar. Use the following methods to query the application display area: getSize(Point), getRectSize(Rect) and getMetrics(DisplayMetrics).
---
So DisplayMetrics.heightPixels - actionBarHeight should give the tab container height, however making the correction still does not fully fix the view.
Martyn, you mentioned in the tablet meeting that there was another issue you found with regards to this offset while investigating bug 1100317 - what is that? Does that apply here?
[1]: https://developer.android.com/reference/android/view/Display.html
Flags: needinfo?(mhaigh)
Assignee | ||
Comment 18•10 years ago
|
||
My fix, to make sure I'm not doing something silly.
screenHeight is 1824 pixels here where 1920 pixels is height of the physical
display. ~100 pixels is large enough that I imagine it'd include both the soft
system buttons and the system status bar.
Assignee | ||
Comment 19•10 years ago
|
||
This cooky patch is what I'm using to test whether or not the container is the right size by ensuring the private tabs panel, with layout_gravity=bottom, is fully shown at the bottom - perhaps there's an error here as well?
Assignee | ||
Updated•10 years ago
|
Attachment #8523014 -
Attachment is obsolete: true
Comment 20•10 years ago
|
||
The issue I mentioned was Bug 1100317 - it seems the fix you mention in comment 17 (DisplayMetrics.heightPixels - actionBarHeight) was enough to fix my issue - at least I'm getting the expected results with a similar patch
Flags: needinfo?(mhaigh)
Assignee | ||
Comment 21•10 years ago
|
||
After pulling the latest fx-team, including the patch from bug 1100317, I can confirm Martyn's issue is fixed, but mine is not - there must be something else going on in the layout.
Assignee | ||
Comment 22•10 years ago
|
||
Actually, seems we're a few pixels short - see the next image.
Assignee | ||
Comment 23•10 years ago
|
||
There's still padding missing at the bottom of the container.
I suppose this isn't actually worth all the time I've been spending on it, considering all we want to do is center the content - I'm sure I can eyeball the offset (actionBarHeight - eyeballedHeight).
Assignee | ||
Comment 24•10 years ago
|
||
(In reply to Michael Comella (:mcomella) from comment #23)
> There's still padding missing at the bottom of the container.
Filed bug 1104133.
Assignee | ||
Comment 25•10 years ago
|
||
300dp width. Let me know if the vertical centering looks off - I had to offset the centering due to bug 1104133.
Attachment #8521093 -
Attachment is obsolete: true
Attachment #8521094 -
Attachment is obsolete: true
Attachment #8527788 -
Flags: feedback?(alam)
Assignee | ||
Comment 26•10 years ago
|
||
Attachment #8527789 -
Flags: feedback?
Assignee | ||
Comment 27•10 years ago
|
||
The patch, if the antlam approves.
Assignee | ||
Updated•10 years ago
|
Attachment #8525703 -
Attachment is obsolete: true
Comment 28•10 years ago
|
||
Comment on attachment 8527788 [details]
Patch: 7" tab portrait (v2)
Nicely done!
Attachment #8527788 -
Flags: feedback?(alam) → feedback+
Comment 29•10 years ago
|
||
Comment on attachment 8527789 [details]
Patch: 7" tab landscape (v2)
I assume this Feedback was for me :) Thanks Michael! looks great.
Attachment #8527789 -
Flags: feedback? → feedback+
Assignee | ||
Comment 30•10 years ago
|
||
Comment on attachment 8527806 [details] [diff] [review]
Dynamically layout private tabs panel on new tablet
Despite the description, this should also apply to 10" tablets.
Attachment #8527806 -
Flags: review?(lucasr.at.mozilla)
Assignee | ||
Updated•10 years ago
|
Attachment #8525676 -
Attachment is obsolete: true
Assignee | ||
Updated•10 years ago
|
Attachment #8527116 -
Attachment is obsolete: true
Assignee | ||
Updated•10 years ago
|
Attachment #8527117 -
Attachment is obsolete: true
Assignee | ||
Updated•10 years ago
|
Attachment #8527806 -
Attachment description: Dynamically layout private tabs panel on 7" tablet → Dynamically layout private tabs panel on new tablet
Reporter | ||
Comment 31•10 years ago
|
||
Comment on attachment 8527806 [details] [diff] [review]
Dynamically layout private tabs panel on new tablet
Review of attachment 8527806 [details] [diff] [review]:
-----------------------------------------------------------------
Yep.
::: mobile/android/base/resources/layout/tabs_panel_default.xml
@@ +5,5 @@
>
> <merge xmlns:android="http://schemas.android.com/apk/res/android"
> xmlns:gecko="http://schemas.android.com/apk/res-auto">
>
> + <!-- This value is used in TabsPanel.getTabsLayoutContainerHeight
What value?
::: mobile/android/base/tabs/PrivateTabsPanel.java
@@ +116,5 @@
> +
> + // The tabs panel header is not taken into account
> + // when centering, so add padding to compensate.
> + lp.gravity = Gravity.CENTER;
> + emptyTabsFrame.setPadding(0, 0, 0, emptyTabsFrameVerticalOffset);
Is this still necessary even with the patch from bug 1100317?
@@ +120,5 @@
> + emptyTabsFrame.setPadding(0, 0, 0, emptyTabsFrameVerticalOffset);
> +
> + emptyTabsHeader.setVisibility(View.VISIBLE);
> +
> + requestLayout();
This is not strictly necessary as setPadding() and setVisibility() will trigger requestLayout() under the hood.
Attachment #8527806 -
Flags: review?(lucasr.at.mozilla) → review+
Assignee | ||
Comment 32•10 years ago
|
||
(In reply to Lucas Rocha (:lucasr) from comment #31)
> What value?
Fixed.
> ::: mobile/android/base/tabs/PrivateTabsPanel.java
> > + emptyTabsFrame.setPadding(0, 0, 0, emptyTabsFrameVerticalOffset);
>
> Is this still necessary even with the patch from bug 1100317?
Yes, we're trying to center the content on the screen, not in the View, so
we offset for the parent container.
Adjusted the comment to make this more clear.
> @@ +120,5 @@
> > + requestLayout();
>
> This is not strictly necessary as setPadding() and setVisibility() will
> trigger requestLayout() under the hood.
Removed.
Assignee | ||
Updated•10 years ago
|
Attachment #8527806 -
Attachment is obsolete: true
Assignee | ||
Updated•10 years ago
|
Attachment #8532348 -
Flags: review+
Assignee | ||
Comment 33•10 years ago
|
||
Comment 34•10 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 37
Updated•4 years ago
|
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•