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 Label from the framework #19

Closed
NickEntin opened this issue Sep 1, 2020 · 5 comments · Fixed by #68
Closed

Remove Label from the framework #19

NickEntin opened this issue Sep 1, 2020 · 5 comments · Fixed by #68
Labels
good first issue Good for newcomers
Milestone

Comments

@NickEntin
Copy link
Collaborator

Label doesn't really belong in Paralayout anymore. It was originally very helpful in working around some quirks in UILabel that made it difficult to align text properly to match the output of design tools. Many of those original issues have been resolved over the years, however, and so it is no longer providing much value in terms of layout. While it still provides additional functionality on top of UILabel, Paralayout is a layout framework and the functionality included should be scoped to only layout tools when possible.

If the Label functionality is still useful to external consumers, we can consider moving it to its own micro-framework. If you use it and would be interested in this, please speak up. For now I propose that we remove it from the Paralayout entirely.

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

If the Label functionality is still useful to external consumers, we can consider moving it to its own micro-framework.

Please! Found this library looking for this functionality specifically.

Cheers 😄

@NickEntin
Copy link
Collaborator Author

NickEntin commented Oct 13, 2020

@edwellbrook Glad to hear you're finding it useful! Was there specific functionality in Label that you were looking for? Curious what the current use cases are, so we can make sure to preserve that functionality.

Thanks!

@edwellbrook
Copy link

Honestly mostly interested in LineWrapBehavior. Though I can see myself using the lineSpacingDistance property at some point too.

Thank you!

NickEntin added a commit to NickEntin/Paralayout that referenced this issue Mar 20, 2021
ParalayoutStudio, the old sample code for experimenting with Paralayout, was primarily focused on functionality around Label, which is being removed from the framework (square#19). The project was also outdated (lacked support for iPhone X even) and was not set up with a dependency manager, which made adding snapshot tests difficult.

This replaces ParalayoutStudio with a new demo app that uses CocoaPods for dependency management (which inherently tests our CocoaPods integration) and includes a test suite set up to run snapshot tests. My plan is to use this demo app both as a way to show how Paralayout can be used and as a form of integration tests. It currently only has the skeleton for this new design, but it should be easy to add new sample screens. I've added a basic snapshot test for view spreading to kick off building out the snapshot test suite.
NickEntin added a commit to NickEntin/Paralayout that referenced this issue Mar 20, 2021
ParalayoutStudio, the old sample code for experimenting with Paralayout, was primarily focused on functionality around Label, which is being removed from the framework (square#19). The project was also outdated (lacked support for iPhone X even) and was not set up with a dependency manager, which made adding snapshot tests difficult.

This replaces ParalayoutStudio with a new demo app that uses CocoaPods for dependency management (which inherently tests our CocoaPods integration) and includes a test suite set up to run snapshot tests. My plan is to use this demo app both as a way to show how Paralayout can be used and as a form of integration tests. It currently only has the skeleton for this new design, but it should be easy to add new sample screens. I've added a basic snapshot test for view spreading to kick off building out the snapshot test suite.
NickEntin added a commit to NickEntin/Paralayout that referenced this issue Mar 20, 2021
ParalayoutStudio, the old sample code for experimenting with Paralayout, was primarily focused on functionality around Label, which is being removed from the framework (square#19). The project was also outdated (lacked support for iPhone X even) and was not set up with a dependency manager, which made adding snapshot tests difficult.

This replaces ParalayoutStudio with a new demo app that uses CocoaPods for dependency management (which inherently tests our CocoaPods integration) and includes a test suite set up to run snapshot tests. My plan is to use this demo app both as a way to show how Paralayout can be used and as a form of integration tests. It currently only has the skeleton for this new design, but it should be easy to add new sample screens. I've added a basic snapshot test for view spreading to kick off building out the snapshot test suite.
NickEntin added a commit to NickEntin/Paralayout that referenced this issue Mar 20, 2021
ParalayoutStudio, the old sample code for experimenting with Paralayout, was primarily focused on functionality around Label, which is being removed from the framework (square#19). The project was also outdated (lacked support for iPhone X even) and was not set up with a dependency manager, which made adding snapshot tests difficult.

This replaces ParalayoutStudio with a new demo app that uses CocoaPods for dependency management (which inherently tests our CocoaPods integration) and includes a test suite set up to run snapshot tests. My plan is to use this demo app both as a way to show how Paralayout can be used and as a form of integration tests. It currently only has the skeleton for this new design, but it should be easy to add new sample screens. I've added a basic snapshot test for view spreading to kick off building out the snapshot test suite.
NickEntin added a commit that referenced this issue Mar 30, 2021
ParalayoutStudio, the old sample code for experimenting with Paralayout, was primarily focused on functionality around Label, which is being removed from the framework (#19). The project was also outdated (lacked support for iPhone X even) and was not set up with a dependency manager, which made adding snapshot tests difficult.

This replaces ParalayoutStudio with a new demo app that uses CocoaPods for dependency management (which inherently tests our CocoaPods integration) and includes a test suite set up to run snapshot tests. My plan is to use this demo app both as a way to show how Paralayout can be used and as a form of integration tests. It currently only has the skeleton for this new design, but it should be easy to add new sample screens. I've added a basic snapshot test for view spreading to kick off building out the snapshot test suite.
@NickEntin NickEntin linked a pull request Nov 21, 2021 that will close this issue
@edwellbrook
Copy link

Hi @NickEntin. Does Paralayout still offer a way to balance multiple lines of text in a UILabel? Was previously using the Label class + LineWrapBehavior = .compact to have multi-line labels where each line was roughly equal length.

Perhaps that's surfaced somewhere else in the project, or is it just no longer available at all? Thanks!

@NickEntin
Copy link
Collaborator Author

Hey @edwellbrook, after a lot of discussion we decided to remove the Label class and all of its functionality not directly related to layout from the 1.0 release, since it felt disjoint to the rest of the framework. If we bring it back in the future, I think we would actually want to publish Label as a separate framework more focused on text handling, rather than adding it back into Paralayout.

For now, I'd recommend copying Label.swift from the 0.9.1 release into your project. I think it should work standalone from any other changes in the Paralayout 1.0 release.

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.

2 participants