Open moogion opened 2 months ago
Support for flexbox was added at the end, and is unfortunately, is known to be incorrect.
The initial design of layout was:
The problem with a flow layout, the requirement of a children depends on the Box assigned by the parent. Currently, FTXUI uses a loop so that each would compute Box <-> Requirement until getting a convergence. This doesn't always work unfortunately.
Proper support for flow layout would require redesigning FTXUI from the ground up. It is unlikely to happen, as FTXUI would be very different.
My own implementation of a scrollbar based on your code in git-tui “burst” (started working incorrectly) after using flexbox in a child component. Probably it doesn't count layout requirement correctly and I don't know what to do about it...
Here is the code directly from components.cpp: