Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Updates about RTL and devtools-html

17 views
Skip to first unread message

Julian Descottes

unread,
Sep 27, 2016, 12:03:09 PM9/27/16
to dev-developer-tools
Some updates related to RTL and HTML modules. You can check Bug 1305007
<https://bugzilla.mozilla.org/show_bug.cgi?id=1305007#c13> for more details.

TLDR: When testing RTL with devtools and ForceRTL, you now have to close
and reopen devtools to make sure HTML modules use the proper direction.

# Supporting RTL
HTML documents need dir="rtl" in order to force the direction on their
content. The
toolbox will attempt to set this attribute when loading a new module, if
this module
is hosted in a HTML document.

So normally, after migrating a devtools module to HTML, it should support
RTL out
of the box!

It's still worth mentioning that the css selector :-moz-locale-dir(rtl) is
only applied in XUL documents. Some selectors might have to be updated from
:-moz-locale-dir(rtl)
to :dir(rtl).

# Testing RTL
At the moment, HTML modules are not dynamically updated if you are changing
the
direction (using Force RTL extension, or setting intl.uidirection
preference).
Please remember to re-open devtools whenever you flip to RTL while testing.

We are working on Force RTL to allow it to update devtools HTML modules
dynamically [1].
Hopefully the next release of Force RTL should no longer require you to
restart
devtools. If you are using preferences instead of Force RTL, please give it
a try. If
you have good reasons to prefer preferences over Force RTL, please let me
know.

Our wiki has been updated with the testing information [2] (if you know any
other doc I should update, let me know!)

[1] https://github.com/mikedeboer/ForceRTL/pull/6 &
https://github.com/mikedeboer/ForceRTL/pull/8
[2] https://wiki.mozilla.org/DevTools/CSSTips#Localization

Julian

Julian Descottes

unread,
Oct 1, 2016, 9:10:03 AM10/1/16
to dev-developer-tools
[Follow-up to the previous email]

After landing Bug 1305007, we realised some HTML modules might not be ready
to support RTL and would be better off keeping LTR until proper support was
added.
For instance, the new debugger frontend was looking quite broken in RTL.

So we decided to make the behavior described earlier optional.

If you want your HTML devtools mode to support RTL, you have to set a dir
attribute on your document element (dir="" is fine).
See for instance inspector.xhtml:
https://hg.mozilla.org/mozilla-central/file/5bf0ee1a10f4/devtools/client/inspector/inspector.xhtml#l23

Thanks!
Julian

On Tue, Sep 27, 2016 at 6:02 PM, Julian Descottes <jdesc...@mozilla.com>
wrote:

Amit Zur

unread,
Oct 5, 2016, 3:38:22 AM10/5/16
to mozilla-dev-d...@lists.mozilla.org
As a Hebrew speaker I'm trying to understand what is broken. File names & code are solely in english, so where does it brake?

Julian Descottes

unread,
Oct 5, 2016, 4:20:41 AM10/5/16
to Amit Zur, mozilla-dev-d...@lists.mozilla.org
This message was intended for developers writing new Firefox Devtools HTML
modules (or converting existing devtools modules to HTML).
Nothing is broken, it just contains instructions on how to support and test
RTL locales for such modules. Sorry if this was unclear.

> File names & code are solely in english, so where does it brake?

Are you talking about a specific devtools module here?
Generally speaking, when testing RTL on a module that was solely developed
with LTR in mind, we usually have issues related to element positioning,
usage of css properties such as margin-left/right etc...


On Wed, Oct 5, 2016 at 9:38 AM, Amit Zur <sendwi...@gmail.com> wrote:

> As a Hebrew speaker I'm trying to understand what is broken. File names &
> code are solely in english, so where does it brake?
>
> On Tuesday, September 27, 2016 at 7:03:09 PM UTC+3, Julian Descottes wrote:
> _______________________________________________
> dev-developer-tools mailing list
> dev-devel...@lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-developer-tools
>
0 new messages