Closed Bug 1470074 Opened 2 years ago Closed Last year

"Dock to right" docks to left in RTL mode

Categories

(DevTools :: General, defect, P3)

defect

Tracking

(firefox-esr52 unaffected, firefox-esr60 unaffected, firefox61 unaffected, firefox62 verified, firefox63 verified)

VERIFIED FIXED
Firefox 63
Tracking Status
firefox-esr52 --- unaffected
firefox-esr60 --- unaffected
firefox61 --- unaffected
firefox62 --- verified
firefox63 --- verified

People

(Reporter: birtles, Assigned: mantaroh)

References

Details

(Keywords: regression)

Attachments

(1 file)

STR:
1. In about:config set intl.uidirection to 1
2. Open DevTools
3. Choose "Dock to right"

Expected results:
DevTools are docked to the right

Actual results:
DevTools are docked to the left

(And vice versa)
Priority: -- → P3
Duplicate of this bug: 1477095
Keywords: regression
Toolbox will change dock position by using the order of child element[1].
If user change the dock position to 'right', this order is ['browser', 'splitter', 'devtool-iframe']. This is work well on LTR environment. However, this looks will be inverted on RTL environment.

[1] https://searchfox.org/mozilla-central/rev/3fa761ade83ed0b8ab463acb057c2cf0b104689e/devtools/client/framework/toolbox-hosts.js#156-162

We can choose the following pattern.
 1) specify the 'direction = ltr'.
 2) change this order if environment is RTL.

If we choose the pattern 1), this direction might affect child element. So I think that we had better to choose patter 2).
Assignee: nobody → mantaroh
Status: NEW → ASSIGNED
We add the devtool's iframe and splitter and browser content into XUL element.
If the environment is RTL, this element order is inverted.
So this patch will add the condition of direction to decide this element order.
Comment on attachment 9003338 [details]
Bug 1470074 - Check direction when changing the dock position. r?gl

Gabriel [:gl] (ΦωΦ) has approved the revision.
Attachment #9003338 - Flags: review+
Pushed by mantaroh@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/024d4f5de3aa
Check direction when changing the dock position. r=gl
https://hg.mozilla.org/mozilla-central/rev/024d4f5de3aa
Status: ASSIGNED → RESOLVED
Closed: Last year
Resolution: --- → FIXED
Target Milestone: --- → Firefox 63
Seems like a good thing to fix before we ship 62. Please nominate for Beta approval when you get a chance.
Flags: qe-verify+
Flags: needinfo?(mantaroh)
I tested this on Windows 10, Ubuntu 16.04 and OSX 10.13 with Firefox Nightly that has this patch.
Dock to right and left is now corrected. 'Dock to right' docks to the right and vice-versa.

It is verified as fixed on Nightly 63.0a1.

One of the test environments:
Version 	63.0a1
Build ID 	20180824100112
Update Channel 	nightly
User Agent 	Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:63.0) Gecko/20100101 Firefox/63.0
Flags: qe-verify+
Comment on attachment 9003338 [details]
Bug 1470074 - Check direction when changing the dock position. r?gl

(In reply to Ryan VanderMeulen [:RyanVM] from comment #8)
> Seems like a good thing to fix before we ship 62. Please nominate for Beta
> approval when you get a chance.

Thanks, Ryan.

Approval Request Comment
[Feature/Bug causing the regression]: bug 1192642
[User impact if declined]:In RTL environment, the behavior of docking to right/left differs from the label.
[Is this code covered by automated tests?]: N/A
[Has the fix been verified in Nightly?]: Yes
[Needs manual test from QE? If yes, steps to reproduce]:  N/A
[List of other uplifts needed for the feature/fix]: N/A
[Is the change risky?]: Low.
[Why is the change risky/not risky?]: The modification area is limited and we checked this behavior on The nightly build.
[String changes made/needed]:N/A
Flags: needinfo?(mantaroh)
Attachment #9003338 - Flags: approval-mozilla-beta?
Flags: qe-verify+
Comment on attachment 9003338 [details]
Bug 1470074 - Check direction when changing the dock position. r?gl

Fixes a devtools RTL regression. Approved for 62 RC1.
Attachment #9003338 - Flags: approval-mozilla-beta? → approval-mozilla-release+
I successfully reproduced the issue on Nightly 62.0a1 (2018-06-19) under Windows 10 (x64) using the STR from Comment 0.
The issue is verified fixed on Firefox 62.0 under Windows 10 (x64), macOS 10.12 and Ubuntu 16.04 (x64).
Status: RESOLVED → VERIFIED
Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.