-
Notifications
You must be signed in to change notification settings - Fork 38
Wrapping helper function #99
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
Conversation
@kmatch98 raised a great point in discord: One thing that needs to be tested and hasn't yet is how this code behaves when the supplied text has few enough spaces that it can't break cleanly without splitting a word. |
nice! @makermelissa may be helpful to factor this out of portal libs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested with my refactored PortalBase library. It adds hyphens as noted. I was going to request a parameter for specifying whether to add them or not, but after thinking about it, I think it's fine.
Updating https://github.com/adafruit/Adafruit_CircuitPython_BMP3XX to 1.3.0 from 1.2.3: > Merge pull request adafruit/Adafruit_CircuitPython_BMP3XX#13 from ladyada/master Updating https://github.com/adafruit/Adafruit_CircuitPython_Display_Text to 2.10.0 from 2.9.5: > Merge pull request adafruit/Adafruit_CircuitPython_Display_Text#99 from FoamyGuy/wrapping Updating https://github.com/adafruit/Adafruit_CircuitPython_MagTag to 1.2.0 from 1.1.2: > Merge pull request adafruit/Adafruit_CircuitPython_MagTag#31 from makermelissa/deepsleep
I think this helper function was originally the PyPortal library.
If we move it to here we can make use of it in all of the various different portal libraries as well as directly from user code. This will make it easier to wrap text for different sized displays.