Skip to content

fix(settings): resolve iPad menu text cropping and layout (#659)#661

Open
prince-0408 wants to merge 1 commit into
scribe-org:mainfrom
prince-0408:fix/659-settings-menu-ipad
Open

fix(settings): resolve iPad menu text cropping and layout (#659)#661
prince-0408 wants to merge 1 commit into
scribe-org:mainfrom
prince-0408:fix/659-settings-menu-ipad

Conversation

@prince-0408

Copy link
Copy Markdown
Contributor

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

iPad Air 11-inch Settings Menu Fix

Root Causes

  1. Unremoved Hidden Constraints: When shortDescription was nil (e.g. for installed keyboard rows), descriptionLabel was hidden (isHidden = true) without being removed from the superview. Its Auto Layout constraints (TitleLabelPad.bottom + 8descriptionLabel.top and descriptionLabel.bottomcontentView.bottom - 16) remained active, forcing a minimum cell height of ~99pt.
  2. Fixed iPhone Row Heights on iPad: Table view controllers returned fixed row heights (48.0pt) for cells without descriptions. Forcing TitleLabelPad inside 48pt crushed the label height down to ~8–12pt, causing severe top/bottom text cropping.
  3. Stage Manager / Full-Screen Presentation: Modern iPadOS models run non-fullscreen apps in Stage Manager window frames by default unless full-screen presentation is configured.

Key Changes Made

  • InfoChildTableViewCell.swift:
    • Added descriptionLabel.removeFromSuperview() when shortDescription == 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:
    • Updated tableView(_:heightForRowAt:) to return device-appropriate row heights (66.0pt base / 110.0pt with description on iPad, 48.0pt / 80.0pt on iPhone) with dynamic scaling support for the "Increase app text size" setting.
    • Implemented dynamic section header height calculation (heightForHeaderInSection) so section headers do not clip on iPad.
  • AboutViewController.swift:
    • Updated tableView(_:heightForRowAt:) for iPad layout (72.0pt base / 110.0pt with description) and text size scaling.
  • TableViewTemplateViewController.swift:
    • Updated tableView(_:heightForRowAt:) for iPad layout (66.0pt base row height) and font scale support.
  • SelectionViewTemplateViewController.swift:
    • Implemented tableView(_:heightForRowAt:) returning 66.0pt for iPad RadioTableViewCell items with text size scaling support.
  • Info.plist:
    • Added <key>UIRequiresFullScreen</key><true/> so the app requests full-screen presentation mode on iPad.

CC: @andrewtavis @henrikth93

@github-actions

Copy link
Copy Markdown

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:

  • Those interested in developing their skills and expanding their role in the community should read the mentorship and growth section of the contribution guide
  • If you're not already a member of our public Matrix community, please consider joining!
    • We'd suggest that you use the Element client as well as Element X for a mobile app
    • Join the General and iOS rooms once you're in
  • Also consider attending our bi-weekly Saturday developer syncs!
    • Details are shared in the General room on Matrix each Wednesday before the sync
    • It would be great to meet you 😊

Note

Scribe uses Conventional Comments in reviews to make sure that communication is as clear as possible.

@github-actions

Copy link
Copy Markdown

Maintainer Checklist

The 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 :)

  • Tests for changes have been written and the CI unit test, linting and formatting workflows within the PR checks do not indicate new errors in the files changed

  • The CHANGELOG has been updated with a description of the changes for the upcoming release and the corresponding issue (if necessary)

@github-actions

Copy link
Copy Markdown

First PR Commit Check

  • The commit messages for the remote branch should be checked to make sure the contributor's email is set up correctly so that they receive credit for their contribution
    • The contributor's name and icon in remote commits should be the same as what appears in the PR
    • If there's a mismatch, the contributor needs to make sure that the email they use for GitHub matches what they have for git config user.email in their local Scribe-iOS repo (can be set with git config --global user.email "GITHUB_EMAIL")

@andrewtavis

Copy link
Copy Markdown
Member

Thanks so much for the PR, @prince-0408! @henrikth93, can you take an initial look?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Settings menu look bad on iPad Air 11-inch

2 participants