zenangst/Spots

Improve naming of `itemsPerRow`

zenangst opened this issue ยท 12 comments

I find that itemsPerRow on Layout is a bit misleading, I think we can come up with a better name for this property.

How about preferredNumberOfRows ?

@onmyway133 yeah I kinda like that, but I wouldn't add preferred as a prefix. If you set that, it will arrange the items based on the items height which would give you a "column" height of 2 even if you only have 1 item.

@zenangst yeah, inspired by numberOfLines. I have preferred because it will not always be the number of lines we want, if we have too few items. But I ๐Ÿ‘ with dropping preferred

@vadymmarkov @JohnSundell what do you guys think about numberOfLines is that more descriptive than itemsPerRow ?

@zenangst what's wrong with itemsPerRow? I find it pretty descriptive ๐Ÿ™‚

@JohnSundell I'm just afraid that it might be confused with vertical layouts where everything is per row. If this is what you think you would get by setting that property then it might not be an issue at all:

items-per-row

yeah, I'm still using my silly example to show of the feature ๐Ÿ˜

What about columns ๐Ÿ˜„

But columns are horizontal, what you are setting are the amount of rows per column... I think. This whole thing has gotten med confused ;)

itemsPerColumn?

Hm.. columns are vertical, rows are horizontal ๐Ÿค”

I edited my previous comment.