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

Long printer name can overflow in printer list #16

Open
Neelfyn opened this issue Sep 13, 2020 · 3 comments · May be fixed by #17
Open

Long printer name can overflow in printer list #16

Neelfyn opened this issue Sep 13, 2020 · 3 comments · May be fixed by #17

Comments

@Neelfyn
Copy link

Neelfyn commented Sep 13, 2020

Steps to reproduce

  1. Add a Little Printer with a longer name to the app, for example "Neelfyn's Little Printer" on an iOS device with a 4" screen.
  2. Go to the main screen with the list of Little Printers.

Expected result

The printer name is truncated with an ellipsis, or wraps to a new line.

Actual result

The printer name stacks with the key icon, and overflows outside of the box:

lp_title_overflow

This is a purely cosmetic issue, the usability of the key icon is not affected.

Configuration: iPod touch 7th generation, iOS 13.7, Little Printers 1.0.1.

@joerick
Copy link
Member

joerick commented Sep 13, 2020

Thanks for the report! Looks like a missing UI constraint in https://github.com/nordprojects/littleprinters-ios-app/blob/master/littleprinter/UI/Printers/PrinterListTableViewCell.swift#L135

Happy to review a PR if you're interested!

@Neelfyn
Copy link
Author

Neelfyn commented Sep 13, 2020

@joerick Thanks for the tip! I'm not super familiar with Swift, but purely based on what the rest looks like, make.right.equalTo(shareButton.snp.left) appears to fix this for me. Not sure whether the margin for the key icon is handled elsewhere, but it looks fine to me without specifying a negative offset.

I suppose ownerLabel could also benefit from something like make.right.equalTo(cardImageView).offset(-6) while we're looking at this.

If this is an acceptable solution for you, I'll be happy to create a PR!

@joerick
Copy link
Member

joerick commented Sep 14, 2020

Sounds good to me!

Neelfyn added a commit to Neelfyn/littleprinters-ios-app that referenced this issue Sep 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants