Skip to content

task(ios): auto-focus the site URL field when adding a site - #787

Merged
dcalhoun merged 2 commits into
trunkfrom
task/ios-demo-autofocus-site-url
Oct 14, 2026
Merged

dcalhoun merged 2 commits into
trunkfrom
task/ios-demo-autofocus-site-url

Conversation

@dcalhoun

@dcalhoun dcalhoun commented Oct 14, 2026 •

Copy link
Copy Markdown
Member

What?

Auto-focus the site URL field when adding a site in the iOS demo app.

Why?

Improved UX and quicker to use.

How?

Conditionally auto-focus the field via a new state variable.

Testing Instructions

  1. Launch the iOS demo app
  2. Tap Add WordPress Site
  3. Verify the site URL input is focused

Accessibility Testing Instructions

N/A, unnecessary for the demo app.

Screenshots or screencast

Screen.Recording.iPhone.18.Pro.10-14-2026.at.10.52.32.mp4

AI-generated details

Focuses the Site URL field when the iOS demo app's "Add WordPress Site" sheet opens, matching the Android demo app.

Uses @FocusState + .focused(_:), set in .onAppear. .defaultFocus(_:_:) (iOS 17+) was tried and did not focus the field in the sheet on the iOS 27 simulator.

Testing: launch the iOS demo app, open the add-site sheet, and confirm the Site URL field has a cursor (toggle the software keyboard with ⇧⌘K in the simulator if needed).

🤖 Generated with Claude Code

Matches the Android demo app, so the URL can be typed without first tapping the field.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added the [Type] Task Issues or PRs that have been broken down into an individual action to take label Oct 14, 2026
@dcalhoun
dcalhoun marked this pull request as ready for review October 14, 2026 14:53
@dcalhoun
dcalhoun requested a review from crazytonyli October 14, 2026 14:53
@wpmobilebot

wpmobilebot commented Oct 14, 2026 •

Copy link
Copy Markdown

XCFramework Build

This PR's XCFramework is available for testing. Add the following to your Package.swift:

.package(url: "https://github.com/wordpress-mobile/GutenbergKit", branch: "pr-build/787")

Built from 089d761

@dcalhoun
dcalhoun enabled auto-merge (squash) October 14, 2026 20:14
@dcalhoun
dcalhoun disabled auto-merge October 14, 2026 20:36
@dcalhoun
dcalhoun merged commit 0498d67 into trunk Oct 14, 2026
23 checks passed
@dcalhoun
dcalhoun deleted the task/ios-demo-autofocus-site-url branch October 14, 2026 20:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Type] Task Issues or PRs that have been broken down into an individual action to take

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants