Project

General

Profile

New RTL bug: setOffsets(..., Wt::Side::Right) affects left offset

Added by Ali Ali 9 days ago

Hi everyone,

I’m currently developing a full RTL (right-to-left) web application using Wt.
During this process, I’ve encountered several RTL-related issues — for example, when calling

setOffsets(0, Wt::Side::Right);

it actually generates

inset: 75px auto auto 0px

instead of the expected

inset: 75px auto 0px auto

There are also a few other inconsistencies that I’ve been able to work around using custom CSS,
but ideally, I’d love to rely entirely on Wt’s built-in layout system without such manual adjustments.

I’ve noticed that Wt already includes great support for many internationalization features,
so I think improving RTL handling would make it even stronger and more complete.

My question is:
should I create MRs for these cases directly, or is it better to share them here first for discussion?
Submitting MRs is quite time-consuming for me (maybe because I’m not deeply familiar with the Wt),
and I’ve also noticed that questions raised here on the forum often receive helpful responses more quickly.

Any suggestions on the best way to report and organize these RTL-related issues are appreciated!

Thanks for your time and for all your hard work on Wt.

best
Ali


Replies (1)

RE: New RTL bug: setOffsets(..., Wt::Side::Right) affects left offset - Added by Matthias Van Ceulebroeck 9 days ago

Hi Ali,

I believe there's indeed already a couple items pending for RTL (I think you opened two PRs for them already).
So thank you, and also thanks for the report.

In this case I do believe that it should be

75px auto auto 0px

as the property goes:

inset: {top} {right} {bottom} {left}

and a Right essentially becomes a Left.

Now, the RTL/LTR support is, in some cases lacking. And I think there's a better alternative to fixing these issues where they occur, namely *-inline-{start/end}.
This property will behave like e.g. margin-left when choosing margin-inline-start in case of LTR, but switches to margin-right in RTL. So I believe this offers much better support.

I have created a ticket for it: #14078


As to the "preferred" way of working. I understand that creating PRs is time-consuming, as you are not deeply familiar with Wt.
In this case, I think a nice improvement came out of this discussion.

I am not opposed to anybody creating PRs of course. So I think that decision is entirely up to you. Although it is likely better to first create a forum post or a ticket, so that potential wasted work can be avoided.
Especially if you are spending a longer time on the issue, or if there are a lot of changes necessary for the fix/feature.

Best,
Matthias

    (1-1/1)