Closed
Bug 1325931
Opened 8 years ago
Closed 8 years ago
Activity stream - Title is not centred in the Top sites tile when website is pinned
Categories
(Firefox for Android Graveyard :: General, defect, P1)
Tracking
(firefox53 affected, firefox54 verified)
VERIFIED
FIXED
Firefox 54
People
(Reporter: cfat, Assigned: ahunt)
Details
(Whiteboard: [MobileAS])
Attachments
(5 files)
Environment:
Device: Prestigio Grace 5x (Android 4.4.2);
Build: latest Nightly 53.0a1 (2016-12-26);
Steps to reproduce:
1. Launch Firefox;
2. Tap on the 3 dots menu of a website from Top sites area;
3. Tap on “Pin site” option.
Expected result:
Website is pinned and the title remains centred inside the tile.
Actual result:
Website is pinned, but the title is moved a bit to the right side of the tile.
Notes:
Please see the screenshot attached.
Reporter | ||
Updated•8 years ago
|
Whiteboard: [MobileAS]
Comment 1•8 years ago
|
||
Bryan, do we have mocks for this somewhere?
Flags: needinfo?(bbell)
Priority: -- → P2
Assignee | ||
Comment 2•8 years ago
|
||
I've been playing with this a little, and it's slightly tricky (Android doesn't seem to support the concept of centering text relative to the parent View, it insists on centering within the available area - which gets reduced when we add a drawable - even if it's in a separate ImageView). One option is to have hardcoded padding on both sides (where we can then draw the pin), but that might look odd too. Or we can do dynamic calculations, but those will be tricky to perform correctly.
Or we can make the pin float (i.e. not make it aligned to the left of the card), which make it easier to center things.
Or we could align the text to the left (which is what conventional topsites does)
Assignee | ||
Comment 3•8 years ago
|
||
Heh, old topsites on desktop does _exactly_ the same thing (which makes me wonder if this is MVP-worthy).
I've managed to create an incredibly hacky fix, I'll leave this as P2 until I decide if it's really the right approach. (I'll probably move the code involved into ViewUtil, mainly for cleanliness, and also in case we ever need it elsewhere.)
Assignee: nobody → ahunt
Iteration: --- → 1.15
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Assignee | ||
Updated•8 years ago
|
Priority: P2 → P1
Assignee | ||
Comment 8•8 years ago
|
||
A screenshot from when I was testing with a drawable on the right (my patches keep it on the left, I was just verifying that my code covers both sides as needed).
Assignee | ||
Updated•8 years ago
|
Attachment #8835613 -
Flags: review?(s.kaspari)
Attachment #8835738 -
Flags: review?(s.kaspari)
Attachment #8835739 -
Flags: review?(s.kaspari)
Assignee | ||
Comment 9•8 years ago
|
||
mozreview-review |
Comment on attachment 8835613 [details]
Bug 1325931 - Pre: add drawable padding to pin
https://reviewboard.mozilla.org/r/111288/#review113000
::: mobile/android/base/resources/layout/activity_stream_topsites_card.xml:33
(Diff revision 2)
> android:layout_below="@id/favicon"
> android:background="@color/activity_stream_divider" />
>
> <TextView
> android:id="@+id/title"
> + android:drawablePadding="2dp"
I'm not sure what the "right" value would be, but currently we have no padding which can look bad.
Comment 10•8 years ago
|
||
mozreview-review |
Comment on attachment 8835613 [details]
Bug 1325931 - Pre: add drawable padding to pin
https://reviewboard.mozilla.org/r/111288/#review113812
Attachment #8835613 -
Flags: review?(s.kaspari) → review+
Comment 11•8 years ago
|
||
mozreview-review |
Comment on attachment 8835738 [details]
Bug 1325931 - Implement ViewUtil.setCenteredText() for TextViews with compound drawables
https://reviewboard.mozilla.org/r/111352/#review113814
Attachment #8835738 -
Flags: review?(s.kaspari) → review+
Comment 12•8 years ago
|
||
mozreview-review |
Comment on attachment 8835739 [details]
Bug 1325931 - Use compound drawable text centering hack for AS Topsites
https://reviewboard.mozilla.org/r/111354/#review113816
Attachment #8835739 -
Flags: review?(s.kaspari) → review+
Comment 13•8 years ago
|
||
Pushed by ahunt@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/d5d12ac7e213
Pre: add drawable padding to pin r=sebastian
https://hg.mozilla.org/integration/autoland/rev/596c114a2524
Implement ViewUtil.setCenteredText() for TextViews with compound drawables r=sebastian
https://hg.mozilla.org/integration/autoland/rev/7697b05969f8
Use compound drawable text centering hack for AS Topsites r=sebastian
Comment 14•8 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/d5d12ac7e213
https://hg.mozilla.org/mozilla-central/rev/596c114a2524
https://hg.mozilla.org/mozilla-central/rev/7697b05969f8
Status: NEW → RESOLVED
Closed: 8 years ago
status-firefox54:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 54
Reporter | ||
Comment 15•8 years ago
|
||
Tested using the latest Nightly build 54.0a1 (2017-02-16) with the following devices:
- Oneplus Two (Android 6.0.1);
- Samsung Galaxy Note 4 (Android 5.0.1);
- Huawei MediaPad M2 (Android 5.1.1).
After pinning a website, it's title stays centred into the tile as in the next Screenshot: http://imgur.com/a/sKW1A
I'm marking this as Verified.
Status: RESOLVED → VERIFIED
Updated•8 years ago
|
Flags: needinfo?(bbell)
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
•