On Tue, 18 Nov 2025 00:04:19 GMT, Kevin Rushforth <[email protected]> wrote:
>> modules/javafx.graphics/src/main/java/javafx/scene/layout/package-info.java
>> line 208:
>>
>>> 206: * <p>
>>> 207: * For layout containers, the layout orientation determines the visual
>>> order of their children. If a layout container
>>> 208: * has named areas, the names always retain their default meaning. For
>>> example, the {@code left} and {@code right}
>>
>> It might be just me, but I still find this explanation very confusing (what
>> is the default meaning of left?).
>>
>> Could we just say that for historical reasons, "left" and "right" in reality
>> mean "leading" and "trailing", or maybe that in the RTL mode the left/right
>> are swapped, with the "left" nodes appearing on the leading (visually right)
>> side, and the "right" ones are on the trailing (visually left) side?
>>
>> Also, do you think we should explicitly mention entities where this logic
>> applies (`BorderPane`, `HeaderBar`)?
>
> I'll take a look at this as well.
>
> One thing I do note is that it might be helpful if this doc clarification had
> a separate doc issue to track it -- even if it goes in as part of this PR --
> since it is independent from what is otherwise a preview feature.
In thinking about this further, I recommend to separate out any changes that
are not specific to the HeaderBar preview feature (i.e., revert the changes in
this file for this PR). Then file a new "doc bug" to better clarify the terms
"left" and "right" in the presence of RTL. In general it's best not to mix
changes to a preview feature with more global changes unless there is a
compelling need (there isn't here). From a practical point of view, it will
make it more likely to get this in for JavaFX 26 prior to RDP1 if the changes
are limited to the preview feature at hand. The doc changes can still go in for
26 during rampdown.
-------------
PR Review Comment: https://git.openjdk.org/jfx/pull/1936#discussion_r2644445674