Skip to content

fix(native): rn-web vertical-align positioning + broaden iOS warning - #5743

Merged
quantizor merged 6 commits into
mainfrom
text-input-alignment-showcase
May 11, 2026
Merged

quantizor merged 6 commits into
mainfrom
text-input-alignment-showcase

Conversation

@quantizor

Copy link
Copy Markdown
Contributor

Summary

  • rn-web vertical-align: top | middle | bottom now positions text content inside the Text's box, matching the visual semantic of React Native's verticalAlign on Android (textAlignVertical). Other values (baseline, sub, super, text-top, text-bottom, lengths, percentages, auto) pass through to the browser's native baseline-shifting semantics.

  • iOS dev warning for vertical-align now covers <TextInput> as well as <Text>. RN 0.85 has no platform API to vertically align text content on iOS for either component; the declaration silently has no effect. The warning names the situation and (for <Text>) points to the View + justify-content workaround.

Also bundled:

  • CI: prerelease release notes now skip changesets already shipped in earlier prereleases (the existing logic was re-emitting the full pending pile every snapshot publish).

  • Showcase: new TextInputAlignment widget for visual QA of multiline <TextInput> vertical alignment across iOS, Android, and rn-web.

Test plan

  • pnpm --filter styled-components test:web (1311 passed)
  • pnpm --filter styled-components test:native (1025 passed)
  • pnpm --filter styled-components typecheck + test:types clean
  • Showcase QA on iOS sim, Android emulator, and rn-web for the three keyword variants

@changeset-bot

changeset-bot Bot commented May 11, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: a7b691d

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

This PR includes changesets to release 3 packages
Name Type
styled-components Patch
ios-benchmark Patch
native-showcase 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

Copilot AI left a comment

Copy link
Copy Markdown

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 updates the React Native transform layer to improve vertical-align behavior on react-native-web and expands the iOS development warning for unsupported vertical alignment. It also includes prerelease workflow improvements and a new native showcase widget for QA.

Changes:

  • rn-web: when vertical-align is top | middle | bottom, additionally emit a flex alignment property intended to reposition content inside the box.
  • iOS dev warning: broaden vertical-align warning from <Text> to also include <TextInput>.
  • CI + Showcase: filter prerelease notes to omit already-shipped changesets; add a TextInputAlignment widget and register it.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
packages/styled-components/src/native/transform/index.ts Adds rn-web-specific vertical-align handling that emits an additional alignment property.
packages/styled-components/src/native/transform/dev.ts Updates iOS warning copy to include <TextInput> behavior/limitations.
packages/styled-components/src/native/transform/test/passthrough.test.ts Adds tests for the rn-web vertical-align → additional alignment emission.
packages/styled-components/src/native/transform/test/devWarn.test.ts Updates tests for the broadened iOS warning message.
packages/native-showcase/src/widgets/TextInputAlignment.tsx Adds a new QA widget for multiline TextInput vertical alignment.
packages/native-showcase/src/widgets/registry.ts Registers the new QA widget in the showcase.
.github/workflows/release.yml Skips already-shipped changesets when generating prerelease notes.
.changeset/native-web-vertical-align-content.md Changeset entry for rn-web vertical-align behavior.
.changeset/native-vertical-align-ios-warning.md Changeset entry for broadened iOS warning (+ formatting tweak).

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

@quantizor
quantizor force-pushed the text-input-alignment-showcase branch from 91041f4 to 09ffb86 Compare May 11, 2026 20:20
@quantizor
quantizor merged commit a53bad8 into main May 11, 2026
4 checks passed
@quantizor
quantizor deleted the text-input-alignment-showcase branch May 11, 2026 20:38
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.

2 participants