[RTL] Long history item's titles & URLs are being faded out from the wrong side

VERIFIED FIXED in Firefox 53

Status

()

Firefox for Android
Theme and Visual Design
P5
normal
VERIFIED FIXED
8 months ago
6 months ago

People

(Reporter: ItielMaN, Assigned: maliu)

Tracking

(Blocks: 1 bug, {rtl})

unspecified
Firefox 53
Unspecified
Android
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox53 verified)

Details

MozReview Requests

()

Submitter Diff Changes Open Issues Last Updated
Loading...
Error loading review requests:

Attachments

(4 attachments)

(Reporter)

Description

8 months ago
Created attachment 8816249 [details]
Wrong fading out behaviour

After testing the latest Nightly builds, long hisotry item's titles/URLs are being faded out from the wrong side (or not faded at all if the text is hebrew).
Scenarios to consider:
1. Long URLs should ALWAYS fade out from the right side. This should also be applied to LTR builds.
2. Long history item's title should be faded out according to it's text directionality:
   a. If text is RTL, fade out from the left (currently there's no fading at all)
   b. If text is LTR, fade out from the right
   * The same should possibly be applied to LTR builds as well

Screenshot demonstrating the issue is attached.
(Reporter)

Updated

8 months ago
Blocks: 927667
(Reporter)

Updated

8 months ago
Blocks: 924699
tracking-fennec: --- → ?
tracking-fennec: ? → ---
Blocks: 1319302
Comment hidden (mozreview-request)
(Assignee)

Updated

7 months ago
Assignee: nobody → max
(Assignee)

Comment 2

7 months ago
(In reply to ItielMaN from comment #0)
> Created attachment 8816249 [details]
> Wrong fading out behaviour
> 2. Long history item's title should be faded out according to it's text
> directionality:
>    a. If text is RTL, fade out from the left (currently there's no fading at
> all)
> Screenshot demonstrating the issue is attached.

After dig into android framework, it seems LinearGradient doesn't work on RTL text direction. My current patch only fix the wrong faded edge. Solution is fade by text direction with first-strong-ltr strategy.
Attachment #8823250 - Flags: review?(s.kaspari) → review?(ahunt)
(In reply to Max Liu [:maliu] from comment #2)
> (In reply to ItielMaN from comment #0)
> > Created attachment 8816249 [details]
> > Wrong fading out behaviour
> > 2. Long history item's title should be faded out according to it's text
> > directionality:
> >    a. If text is RTL, fade out from the left (currently there's no fading at
> > all)
> > Screenshot demonstrating the issue is attached.
> 
> After dig into android framework, it seems LinearGradient doesn't work on
> RTL text direction. My current patch only fix the wrong faded edge. Solution
> is fade by text direction with first-strong-ltr strategy.

If helpful I wrote a prototype of the URL bar that could fade on both sides for bug 1271998. I still might have the code somewhere.

Comment 4

7 months ago
mozreview-review
Comment on attachment 8823250 [details]
Bug 1321633 - Apply gradient based on text direction with first strong strategy,

https://reviewboard.mozilla.org/r/101816/#review103960
Attachment #8823250 - Flags: review?(ahunt) → review+
(Assignee)

Updated

6 months ago
Keywords: checkin-needed

Comment 5

6 months ago
Pushed by ryanvm@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/64767e9197df
Apply gradient based on text direction with first strong strategy, r=ahunt
Keywords: checkin-needed

Comment 6

6 months ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/64767e9197df
Status: NEW → RESOLVED
Last Resolved: 6 months ago
status-firefox53: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 53
(Reporter)

Comment 7

6 months ago
This patch probably created a regression where scrolling the history in a New Tab makes faded text (both page titles and URLs) randomly disappear.
Max, should I open a new bug for it or can it be solved in this bug?
Flags: needinfo?(max)
(Reporter)

Comment 8

6 months ago
Created attachment 8827524 [details]
Before scrolling
(Reporter)

Comment 9

6 months ago
Created attachment 8827525 [details]
After scrolling
(Reporter)

Comment 10

6 months ago
(In reply to ItielMaN from comment #7)
> This patch probably created a regression where scrolling the history in a
> New Tab makes faded text (both page titles and URLs) randomly disappear.
> Max, should I open a new bug for it or can it be solved in this bug?

This bug is confirmed also by Tomer Cohen (CC'd on this bug), if the Android's language is RTL-based such as Hebrew.
(Reporter)

Comment 11

6 months ago
Also, text on the history page that *isn't* being faded out looses its directionality and aligns itself to the right, if scrolling like I've said in comment 7.
(Assignee)

Comment 12

6 months ago
(In reply to ItielMaN from comment #7)
> This patch probably created a regression where scrolling the history in a
> New Tab makes faded text (both page titles and URLs) randomly disappear.
> Max, should I open a new bug for it or can it be solved in this bug?

Yes, please file a new bug. Thank you.
Flags: needinfo?(max)

Comment 13

6 months ago
Original issues - fading on left side was fixed. 
Verified on Pixel with Nightly 53.0a1 (2017.01.18) with Hebrew on

@ ItielMaN I am not seeing the issue after panning.
Status: RESOLVED → VERIFIED
status-firefox53: fixed → verified
(Assignee)

Updated

6 months ago
Blocks: 1332258
You need to log in before you can comment on or make changes to this bug.