PepeElToro41 / ui-labs

UI Labs is a storybook plugin for Roblox
https://pepeeltoro41.github.io/ui-labs/
42 stars 7 forks source link

[Feature Request] Controls list ordering #34

Open Olaroll opened 3 weeks ago

Olaroll commented 3 weeks ago

It would be great to have the ability to change the order in which controls are displayed.

For example if I have a Width and Height control, it makes a lot of sense to keep them together.

I think the simplest solution is to simply sort the controls alphabetically and leave it at that, otherwise an API change would be required.

PepeElToro41 commented 3 weeks ago

I was thinking about this for a while, I think the solution would be an Ordered function that will insert an Order optional key in the control and return it back

local controls = {
       Control1 = 10,
       Control2 = Ordered("text", 2),
       Control3 = Ordered(EnumList(), 3)
}