Closed Bug 1323553 Opened 9 years ago Closed 9 years ago

Add RTL to JSON Viewer

Categories

(DevTools :: JSON Viewer, defect)

53 Branch
defect
Not set
normal

Tracking

(firefox53 fixed)

RESOLVED FIXED
Firefox 53
Tracking Status
firefox53 --- fixed

People

(Reporter: tomer, Assigned: tomer)

References

()

Details

(Keywords: rtl)

Attachments

(2 files)

Attached file example.json —
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.
Attachment #8823030 - Flags: review?(odvarko)
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)
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 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+
Status: NEW → ASSIGNED
Flags: needinfo?(tomer.moz.bugs)
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 53
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: