Closed
Bug 1402481
Opened 8 years ago
Closed 8 years ago
Fix overlap of divider in highlight empty state
Categories
(Firefox for Android Graveyard :: General, defect, P1)
Tracking
(firefox57 verified, firefox58 fixed)
VERIFIED
FIXED
Firefox 58
People
(Reporter: liuche, Assigned: liuche)
Details
(Whiteboard: [MobileAS])
Attachments
(2 files)
|
156.22 KB,
image/png
|
Details | |
|
59 bytes,
text/x-review-board-request
|
mcomella
:
review+
Sylvestre
:
approval-mozilla-beta+
|
Details |
This is a regression from bug 1400950 where I forgot to reverse the sign of the divider calculation.
| Assignee | ||
Comment 1•8 years ago
|
||
| Comment hidden (mozreview-request) |
| Assignee | ||
Updated•8 years ago
|
Assignee: nobody → liuche
Comment 3•8 years ago
|
||
| mozreview-review | ||
Comment on attachment 8911348 [details]
Bug 1402481 - Reverse incorrect sign of margin calculation.
https://reviewboard.mozilla.org/r/182824/#review188070
lgtm! The biggest problem this solved was the reversed sign when adding/subtracting the margin.
::: mobile/android/base/java/org/mozilla/gecko/activitystream/homepanel/HighlightsDividerItemDecoration.java:63
(Diff revision 1)
> }
>
> final RecyclerView.LayoutParams params = (RecyclerView.LayoutParams) child
> .getLayoutParams();
> - final int topOfDivider = child.getTop() + params.topMargin;
> + final int dividerHeight = divider.getIntrinsicHeight();
> + // Calculate draw position of divider by accounting for margin and half the divider height.
nit: this comment is redundant to the code. I think it would be useful to describe why we're using the dividerHeight / 2 (in order to span two children views).
::: mobile/android/base/java/org/mozilla/gecko/activitystream/homepanel/HighlightsDividerItemDecoration.java:64
(Diff revision 1)
>
> final RecyclerView.LayoutParams params = (RecyclerView.LayoutParams) child
> .getLayoutParams();
> - final int topOfDivider = child.getTop() + params.topMargin;
> + final int dividerHeight = divider.getIntrinsicHeight();
> + // Calculate draw position of divider by accounting for margin and half the divider height.
> + final int topOfDivider = child.getTop() - params.topMargin - dividerHeight/2;
nit: `dividerHeight / 2`
Attachment #8911348 -
Flags: review?(michael.l.comella) → review+
| Comment hidden (mozreview-request) |
Pushed by cliu@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/2b59b2d150ce
Reverse incorrect sign of margin calculation. r=mcomella
| Assignee | ||
Comment 6•8 years ago
|
||
Comment on attachment 8911348 [details]
Bug 1402481 - Reverse incorrect sign of margin calculation.
Approval Request Comment
[Feature/Bug causing the regression]: bug 1400950, swapped sign of calculation (+ instead -)
[User impact if declined]: divider line runs through "empty content" text - see screenshot
[Is this code covered by automated tests?]: no
[Has the fix been verified in Nightly?]: local testing, no longer overlapping
[Needs manual test from QE? If yes, steps to reproduce]: no
[List of other uplifts needed for the feature/fix]: no
[Is the change risky?]:no
[Why is the change risky/not risky?]: swap a + and - sign
[String changes made/needed]: none
Attachment #8911348 -
Flags: approval-mozilla-beta?
Comment 7•8 years ago
|
||
| bugherder | ||
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 58
Comment 8•8 years ago
|
||
Comment on attachment 8911348 [details]
Bug 1402481 - Reverse incorrect sign of margin calculation.
Fix a visual regression, taking it.
Should be in 57b3
Attachment #8911348 -
Flags: approval-mozilla-beta? → approval-mozilla-beta+
Comment 9•8 years ago
|
||
| bugherder uplift | ||
status-firefox57:
--- → fixed
Comment 10•8 years ago
|
||
Verified as fixed in Beta 57.0b3.
Devices:
Asus ZenPad 8.0 Z380KL (Android 6.0.1)
LG G4 (Android 6.0)
Lenovo A536 (Android 4.4.2)
Status: RESOLVED → VERIFIED
Updated•5 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
•