Please expose col_widths in the IDE

The form editor allows to drag column separator to set the widths of the columns and it allows to double click on them to reset it:
image

This works fine most of the times, but I was not able to set several forms forms with the same column widths. I had to clone, pull, change them and push.

On the editor they looked close enough, but at runtime they looked different.

When I checked the pulled version I found out that the values were different in different forms, something like:

col_widths: '{"SSVUUP":40,"ZMTJHP":2}'
col_widths: '{"XOWKLN":3,"ABITGU":57}'

I changed the values in the editor, and now it works well:

col_widths: '{"SSVUUP":80,"ZMTJHP":2}'
col_widths: '{"XOWKLN":4,"ABITGU":80}'

I would like to expose the column widths on the properties area, something like this:
image

4 Likes

Second this idea 1000 times!

1 Like

I like this general idea, but I don’t think it can/should be accomplished with a list of width values. ColumnPanel is pretty flexible, and you can have arrangements like this in a single column panel:


The corresponding col_widths is:
col_widths: '{"BJRZJD":20,"LLJGPW":40,"XSYMNL":45,"AVGIDH":15,"VVYMWP":40,"VJWCVE":20}'

I don’t really have a constructive suggestion, unfortunately. It strikes me as a hard problem to both have the drag-and-drop “just work” as flexibly as ColumnPanel does and to also be able to fine-tune the numbers.

I agree. I used a simple case with a simple solution, but in the real world there are more complex cases.

Perhaps the IDs could be replaced with something that tries to mean something.

Or perhaps a list of numbers will work just fine, because I may non understand what the numbers mean by staring at them, but I can get a glimpse by looking at them while dragging the markers. By looking at which numbers change when I drag, I can try to guess what those numbers mean.

But now we are opening the door to complains about that ugly and undocumentable property. I personally am OK with ugly, if that’s the best we can get, but I understand if the Anvil team doesn’t want to pollute the interface with bits of ugliness.

3 Likes

It’s worse than ugly. How does one wrap one’s mind around those mechanisms in the first place? And then, how can you explain it clearly and simply? If it can’t be made clear and simple, then it probably doesn’t belong in the IDE, where newbies already have a thousand details to trip over.

Currently, it’s undocumented, so if they find a better way to do things, under the covers, they can do it without breaking user understanding.

2 Likes