parley-messaging / ios-library

Parley iOS app library
MIT License
2 stars 2 forks source link

Font scaling not working propperly everywhere in the app. #81

Closed mat1th closed 1 month ago

mat1th commented 2 months ago

Describe the bug When applying font scaling in the app, some labels and buttons are not properly scaled.

To Reproduce

  1. Start the example app.
  2. Open a new chat.
  3. Increase font size (CMD + Shift + 1) of the simulator
  4. See issues with font scaling.

Expected behaviour I do expect that the SDK allows updating the font scale, and the UI does size properly. Elements that are incorrect are:

Screenshots

send_button date_time
alexkok commented 2 months ago

Thanks for reporting! Parley supports font scaling indeed. We will look into it 👍

Reason that the send button doesn't scale, is because it is an image, not text necessarily. And enlarging it will fill in width probably as well (making the type area very small). And the text area can be multiline. Although with big texts the button should probably scale better. We'll check what we can to with this one.

mat1th commented 2 months ago

Thank you for looking into it.

mat1th commented 2 months ago

It does also have a bug with smaller font scales:

not_aglined

The cursor is not aligned with the placeholder.

mat1th commented 1 month ago

The first bug could be caused by the @ParleyScaledFont property wrapper on both ParleyMessageViewAppearance.messageRegularFont and ParleyTextView.regularFont. The property wrapper is now applied 2 times.

nlamah commented 1 month ago

This issue with the dateLabel is fixed in this PR: https://github.com/parley-messaging/ios-library/pull/98

alexkok commented 1 month ago

Fixed in 4.1.0 :rocket:

As for the button, as reference, iMessage also doensn't scale the button when scaling fonts. Although we can consider that size. Feel free to create a new issue that could be only about the send button in this case. The fonts part is fixed ✅