Skip to content

chore(tabs): add tab-item-title appearance scenario for iOS#4083

Open
LKuchno wants to merge 14 commits into
mainfrom
@lkuchno/test-tabs-item-title-ios
Open

chore(tabs): add tab-item-title appearance scenario for iOS#4083
LKuchno wants to merge 14 commits into
mainfrom
@lkuchno/test-tabs-item-title-ios

Conversation

@LKuchno
Copy link
Copy Markdown
Collaborator

@LKuchno LKuchno commented May 22, 2026

Description

Adds a new manual test scenario (test-tabs-item-title-ios) that exercises 8 iOS-only tab bar item title appearance props exposed on TabsScreen: title (string label), tabBarItemTitleFontColor, tabBarItemTitleFontFamily, tabBarItemTitleFontSize, tabBarItemTitleFontStyle, tabBarItemTitleFontWeight, and tabBarItemTitlePositionAdjustment. The scenario also validates that tabBarItemTitleFontColor correctly overrides the host-level tabBarTintColor for the label while leaving the icon tint unaffected.

This is iOS-only; Detox automated assertions are not feasible because Detox does not expose color or font attributes of native tab bar items. Two known issues are documented in the scenario notes: the normal-state color is not applied on iOS 26, and long-title truncation does not work correctly on iOS 18 and lower.

Closes: https://github.com/software-mansion/react-native-screens-labs/issues/1396

Changes

  • Tests/Tabs: Added test-tabs-item-title-ios/index.tsx — new test screen with three tab routes exercising long-title truncation, tabBarItemTitleFontColor vs tabBarTintColor override, and combined font/position props
  • Tests/Tabs: Added scenario-description.ts registering the scenario as iOS-only, e2eCoverage incomplete, smokeTest: false
  • Tests/Tabs: Added scenario.md with full manual test steps, known-issue callouts for iOS 26 normal-state color and iOS 18 truncation bug, and checklist items for each testable behavior
  • Tests/Tabs: Registered TestTabsItemTitle in apps/src/tests/single-feature-tests/tabs/index.ts so it appears in the scenario list

Test visual presentation

Screen.Recording.2026-05-22.at.10.44.24.mov

Copy link
Copy Markdown
Contributor

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

Adds a new iOS-only manual Tabs test scenario to validate tab bar item title appearance props (label/title behavior, color override vs host tint, and font/position styling) and registers it in the Tabs scenario group.

Changes:

  • Added a new manual scenario screen (test-tabs-item-title-ios) with three tabs covering long-title truncation, title color override vs tabBarTintColor, and combined font/position props.
  • Registered the scenario as iOS-only with e2eCoverage: 'incomplete' and added a step-by-step manual scenario.md.
  • Wired the new scenario into the Tabs scenario list so it appears in-app.

Reviewed changes

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

File Description
apps/src/tests/single-feature-tests/tabs/test-tabs-item-title-ios/scenario.md Manual verification steps + known-issue notes for iOS title appearance behavior.
apps/src/tests/single-feature-tests/tabs/test-tabs-item-title-ios/scenario-description.ts Scenario metadata (name/key/platform/e2eCoverage).
apps/src/tests/single-feature-tests/tabs/test-tabs-item-title-ios/index.tsx New scenario implementation exercising iOS tab bar title appearance props.
apps/src/tests/single-feature-tests/tabs/index.ts Registers the new scenario in the Tabs scenario group.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread apps/src/tests/single-feature-tests/tabs/test-tabs-item-title-ios/scenario.md Outdated
Comment on lines +28 to +30
- **Normal (unselected) state ([iOS26 KI](https://github.com/software-mansion/react-native-screens-labs/discussions/395)):** On iOS 18 and lower, if the normal
(unselected) is set it will applies to unselected tab titles. On iOS 26,
normal-state color is not applied.

---

### Font and possition
Comment on lines +84 to +85
(no font override is applied to the normal state).
On iOS 18 and lower, unselected tab titles appear in BlueDark100.
Comment on lines +14 to +20
function TintOverrideTab() {
const { updateHostConfig } = useTabsHostConfig();
useEffect(() => {
updateHostConfig({
ios: { tabBarTintColor: Colors.GreenDark100 },
});
}, [updateHostConfig]);
Comment on lines +111 to +117
{
name: 'Font and Position',
Component: FontTab,
options: {
...DEFAULT_TAB_ROUTE_OPTIONS,
title: 'Font and Position',
tabBarItemTestID: 'tab-font',
@LKuchno LKuchno changed the title test(tabs): add tab-item-title appearance scenario for iOS chore(tabs): add tab-item-title appearance scenario for iOS May 22, 2026
@LKuchno LKuchno requested a review from t0maboro May 22, 2026 13:46
@LKuchno LKuchno added platform:ios Issue related to iOS part of the library area:tabs Issue related to bottom tabs type:chore A general maintenance task, that does not fall into other categories. labels May 22, 2026
@@ -0,0 +1,150 @@
import React from 'react';
import { StyleSheet, Text, View } from 'react-native';
import {scenarioDescription} from './scenario-description';
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit: formatting

},
hint: {
fontSize: 13,
color: '#555',
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit: I'd use colors from our Colors palette

import type { ScenarioDescription } from '@apps/tests/shared/helpers';

export const scenarioDescription: ScenarioDescription = {
name: 'Tab Bar Item Title (iOS)',
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit: isn't (iOS) redundant in that title? we have an icon indicating that TC is iOS-only

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

Labels

area:tabs Issue related to bottom tabs platform:ios Issue related to iOS part of the library type:chore A general maintenance task, that does not fall into other categories.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants