swift-cross-ui icon indicating copy to clipboard operation
swift-cross-ui copied to clipboard

Make Picker sizing more consistent across backends

Open stackotter opened this issue 7 months ago • 0 comments

Some backends size Pickers based off the currently selected item, while others size them based off their largest item. We probably want this sort of sizing behaviour to be consistent across backends.

In my opinion sizing pickers of their largest item would probably be the most sensible default. Whichever default we choose, it'd be nice to be able to have a modifier to control the sizing behaviour for more advanced layouts.

This will be a bit tricky to address because picker layout is currently pretty opaque to the layout system. We first need to figure out a generic picker layout model that we can impose on the various backends and then figure out how to get each backend to cough up the information we need to correctly account for picker padding and label sizing etc. The information we need is probably just the amount of space the backend's decoration add on each side of picker labels (which would include the disclosure indicator etc) along with the font size/settings used to render labels.

stackotter avatar May 20 '25 14:05 stackotter