Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove the concept of custom positioning #20

Closed
NickEntin opened this issue Sep 2, 2020 · 2 comments · Fixed by #51
Closed

Remove the concept of custom positioning #20

NickEntin opened this issue Sep 2, 2020 · 2 comments · Fixed by #51
Labels
good first issue Good for newcomers
Milestone

Comments

@NickEntin
Copy link
Collaborator

NickEntin commented Sep 2, 2020

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.

@NickEntin NickEntin added the good first issue Good for newcomers label Sep 2, 2020
@NickEntin NickEntin added this to the 1.0 milestone Sep 2, 2020
@NickEntin
Copy link
Collaborator Author

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

@NickEntin
Copy link
Collaborator Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant