It’d be very burden-relieving to have constraints that set the size of their parent automatically based on content (e.g. Android’s
wrap_content size setting in UI layout files):
A UI constraint that automatically sets the size of its parent along a given axis to the total extent of its visible children along that given axis
The above, but for updating ScrollingFrame.CanvasSize (such as in this suggestion UIGridLayout should automatically adjust the CanvasSize of a scrolling frame to suit it's needs)
A TextLabel & TextButton constraint that automatically sets the size of its parent (along a given axis) to a given axis of the TextBounds
For example, the GUI below uses a UIListLayout to line all these items up:
However, since the number and the text inside the blue button change arbitrarily at times, the sizes of the orange and white TextLabels have to be updated to their new horizontal TextBounds (hence suggestion #3).
In the case of the blue button, it also has to update the button’s horizontal size to fit the change, and it has to take into account the button’s children: the ImageLabel for the little icon, the updated TextLabel, and the sizes of multiple Frames inserted for spacing, hence suggestion #1.
Currently this requires manual programming (although snippets of code can be reused most of the time), and it can be pretty annoying at times when you’re just trying to put together a GUI, since sometimes getting the right behavior can be tricky when you put together size changing, text sizing, & event-based triggering.
It’d be really really great if we could avoid these issues altogether so that building GUIs that seem pretty straightforward doesn’t take as long as it currently does
Updated to include examples and clearer descriptions since the demand for this seems to be larger than myself and it’s pretty time-consuming after all