fix(settings): resolve iPad menu text cropping and layout (#659)#661
Open
prince-0408 wants to merge 1 commit into
Open
fix(settings): resolve iPad menu text cropping and layout (#659)#661prince-0408 wants to merge 1 commit into
prince-0408 wants to merge 1 commit into
Conversation
Thank you for the pull request! 💙The Scribe-iOS team will do our best to address your contribution as soon as we can. The following are some important points:
Note Scribe uses Conventional Comments in reviews to make sure that communication is as clear as possible. |
Maintainer ChecklistThe following is a checklist for maintainers to make sure this process goes as well as possible. Feel free to address the points below yourself in further commits if you realize that actions are needed :) |
First PR Commit Check
|
Member
|
Thanks so much for the PR, @prince-0408! @henrikth93, can you take an initial look? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes #659 where settings menu items (such as the installed keyboard list) displayed vertically cropped/squeezed text on iPad models (e.g. iPad Air 11-inch).
Screenshots
Root Causes
shortDescriptionwasnil(e.g. for installed keyboard rows),descriptionLabelwas hidden (isHidden = true) without being removed from the superview. Its Auto Layout constraints (TitleLabelPad.bottom + 8→descriptionLabel.topanddescriptionLabel.bottom→contentView.bottom - 16) remained active, forcing a minimum cell height of ~99pt.48.0pt) for cells without descriptions. ForcingTitleLabelPadinside 48pt crushed the label height down to ~8–12pt, causing severe top/bottom text cropping.Key Changes Made
InfoChildTableViewCell.swift:descriptionLabel.removeFromSuperview()whenshortDescription == nil. This breaks the active bottom constraint chain when no description is present, allowing single-line iPad cells to render at 66pt cleanly without vertical squishing.SettingsViewController.swift:tableView(_:heightForRowAt:)to return device-appropriate row heights (66.0ptbase /110.0ptwith description on iPad,48.0pt/80.0pton iPhone) with dynamic scaling support for the "Increase app text size" setting.heightForHeaderInSection) so section headers do not clip on iPad.AboutViewController.swift:tableView(_:heightForRowAt:)for iPad layout (72.0ptbase /110.0ptwith description) and text size scaling.TableViewTemplateViewController.swift:tableView(_:heightForRowAt:)for iPad layout (66.0ptbase row height) and font scale support.SelectionViewTemplateViewController.swift:tableView(_:heightForRowAt:)returning66.0ptfor iPadRadioTableViewCellitems with text size scaling support.Info.plist:<key>UIRequiresFullScreen</key><true/>so the app requests full-screen presentation mode on iPad.CC: @andrewtavis @henrikth93