Skip to content

fix: adjust default font size per platform #379

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

Merged
merged 1 commit into from
Jul 19, 2025
Merged

Conversation

okwasniewski
Copy link
Collaborator

PR Description

This PR adjusts default font sizes per platform according to this article: https://www.learnui.design/blog/ios-font-size-guidelines.html

Also addresses this issue: #375

@okwasniewski okwasniewski force-pushed the fix/default-font-size branch from f14bd64 to 92776b3 Compare July 6, 2025 18:09
@okwasniewski okwasniewski requested a review from Copilot July 6, 2025 18:10
Copilot

This comment was marked as outdated.

@okwasniewski okwasniewski force-pushed the fix/default-font-size branch from 92776b3 to e9bd2c0 Compare July 19, 2025 13:07
Copy link

changeset-bot bot commented Jul 19, 2025

🦋 Changeset detected

Latest commit: 964612b

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
react-native-bottom-tabs Patch
@bottom-tabs/expo-template Patch
@bottom-tabs/react-navigation Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@okwasniewski okwasniewski force-pushed the fix/default-font-size branch from e9bd2c0 to 032ab05 Compare July 19, 2025 13:09
@okwasniewski okwasniewski requested a review from Copilot July 19, 2025 13:18
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adjusts default font sizes for tab bar labels on iOS platforms to follow iOS UI guidelines, replacing the previous system-calculated default with platform-specific values (10pt for iPhone, 13pt for iPad, 30pt for tvOS).

  • Extracts font handling logic into a dedicated TabBarFontSize utility class
  • Implements device-specific default font sizes based on iOS design guidelines
  • Refactors existing font attribute creation to use the new centralized approach

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
TabViewImpl.swift Removes inline font handling and integrates new TabBarFontSize utility
TabBarFontSize.swift New utility class providing platform-specific font defaults and attribute creation
PlatformAliases.swift Adds PlatformFont typealias for cross-platform font compatibility
fancy-papayas-battle.md Changeset documentation for the font size adjustment
Comments suppressed due to low confidence (2)

packages/react-native-bottom-tabs/ios/TabBarFontSize.swift:86

  • The new isFontFamilyAvailable method lacks test coverage and is not used in the current implementation. Consider adding tests or removing if unused.
  static func isFontFamilyAvailable(_ family: String) -> Bool {

packages/react-native-bottom-tabs/ios/PlatformAliases.swift:40

  • The new PlatformFont typealias is defined but not used in the current implementation. This suggests incomplete refactoring or dead code.
typealias PlatformFont = NSFont

@okwasniewski okwasniewski force-pushed the fix/default-font-size branch from 032ab05 to 964612b Compare July 19, 2025 13:21
@okwasniewski okwasniewski merged commit 51c281d into main Jul 19, 2025
15 of 16 checks passed
@okwasniewski okwasniewski deleted the fix/default-font-size branch July 19, 2025 15:06
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.

1 participant