square/Paralayout

Remove the concept of custom positioning

Closed this issue · 2 comments

Paralayout currently supports custom positioning via conformance to the AlignmentPositionAdjusting protocol. This can lead to some less-than-obvious behavior for consumers, which goes against the core principles behind Paralayout. As far as I know, this feature has very little usage outside of Label, which we have already proposed removing (#19), while adding complexity to our alignment logic. I propose that we remove the concept of custom positioning from the framework entirely.

If my assumption is wrong and you are using custom positioning, please speak up. I am happy to discuss leaving it in there, either in its current form or with some changes, if it's still providing significant value.

This should be fairly straightforward to address. We'll need to remove the AlignmentPositionAdjusting protocol and anywhere it's used.

There will be some other API that can be cleaned up alongside removing this as well. For example:

  • point(inBoundsAt:) can be removed, since it will be the same as point(at:)
  • contentSize(thatFits:) can be removed, since it will be the same as frameSize(thatFits:)
  • frameContentSize can be removed, since it will be the same as frame.size