Closed
Bug 1323553
Opened 9 years ago
Closed 9 years ago
Add RTL to JSON Viewer
Categories
(DevTools :: JSON Viewer, defect)
Tracking
(firefox53 fixed)
RESOLVED
FIXED
Firefox 53
| Tracking | Status | |
|---|---|---|
| firefox53 | --- | fixed |
People
(Reporter: tomer, Assigned: tomer)
References
()
Details
(Keywords: rtl)
Attachments
(2 files)
Steps to reproduce:
a. Launch an RTL Firefox build.
b. Open the attached file in Firefox (example file borrowed from json.org)
Current result:
No RTL support at all. For example, the searchbox placeholder is "סינון JSON" in Hebrew Nightly. The word "סינון" should be the rightmost and the text should be right-aligned.
I am planning to provide patch in few days.
| Assignee | ||
Updated•9 years ago
|
| Comment hidden (mozreview-request) |
| Assignee | ||
Updated•9 years ago
|
Attachment #8823030 -
Flags: review?(odvarko)
Comment 2•9 years ago
|
||
I applied the attached patch and tested using Force RTL extension [1], but I don't see the search-box placeholder aligned to the right (running on Win 10).
Does it work on your machine?
Honza
[1] https://github.com/mikedeboer/ForceRTL
Flags: needinfo?(tomer.moz.bugs)
| Assignee | ||
Comment 3•9 years ago
|
||
| mozreview-review | ||
Comment on attachment 8823030 [details]
Bug 1323553 - Add RTL to JSON Viewer
https://reviewboard.mozilla.org/r/101676/#review102148
::: devtools/client/jsonview/css/general.css:27
(Diff revision 1)
> height: 100%;
> }
>
> +#content:-moz-locale-dir(rtl) {
> + direction: rtl;
> +}
This indeed won't work, because the page is generated by JavaScript. I'll br trying to inject the direction into the page `<body>`.
| Comment hidden (mozreview-request) |
Comment 5•9 years ago
|
||
| mozreview-review | ||
Comment on attachment 8823030 [details]
Bug 1323553 - Add RTL to JSON Viewer
https://reviewboard.mozilla.org/r/101678/#review102172
Nice, works for me now!
R+, but please fix one inline comment.
Thanks,
Honza
::: devtools/client/jsonview/converter-child.js:233
(Diff revision 2)
> + let chromeReg = Cc["@mozilla.org/chrome/chrome-registry;1"]
> + .getService(Ci.nsIXULChromeRegistry);
> + let dir = chromeReg.isLocaleRTL("global") ? "rtl" : "ltr";
> +
> return "<!DOCTYPE html>\n" +
> - "<html platform=\"" + os + "\" class=\"" + themeClassName + "\">" +
> + "<html platform=\"" + os + "\" class=\"" + themeClassName +
nit: remove whitespace at the end of the line
Attachment #8823030 -
Flags: review?(odvarko) → review+
| Comment hidden (mozreview-request) |
| Assignee | ||
Updated•9 years ago
|
Status: NEW → ASSIGNED
Flags: needinfo?(tomer.moz.bugs)
Updated•9 years ago
|
Keywords: checkin-needed
Pushed by cbook@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/afd84580caab
Add RTL to JSON Viewer r=Honza
Keywords: checkin-needed
Comment 8•9 years ago
|
||
| bugherder | ||
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 53
Updated•8 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•