Skip to content

Render blog details with a native SwiftUI list - #26026

Open
crazytonyli wants to merge 2 commits into
trunkfrom
task/blog-details-swiftui
Open

crazytonyli wants to merge 2 commits into
trunkfrom
task/blog-details-swiftui

Conversation

@crazytonyli

@crazytonyli crazytonyli commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

Note

This PR will be merged after 27.3 code freeze, to give us a bit more time to test the changes during development.

Description

This prepares the site menu for SwiftUI destinations while keeping BlogDetailsViewController as the UIKit entry point.

  1. Replace the table view with a native List, including sidebar selection, badges, and section styling.
  2. Move the site header and pull-to-refresh into the list. The existing UIKit header and cards are embedded in SwiftUI.

Existing menu destinations retain UIKit routing. Native SwiftUI navigation for Comments follows in a separate PR.

Scrolling the site menu in My Site no longer reveals the navigation-bar title. Dashboard behavior is unchanged.

Testing instructions

  • Switch between the dashboard and site menu. Check the header, scrolling, and pull-to-refresh.
  • Scroll the site menu and confirm that the navigation-bar title stays hidden. On the dashboard, confirm that scrolling still reveals it.
  • Switch sites and open Posts, Pages, Comments, and pinned custom post types.
  • On iPad, check sidebar selection and detail-column navigation.
  • Check card sizing and row layout with large text.

@crazytonyli
crazytonyli added this pull request to stack #26028 September 17, 2026 22:15
@crazytonyli crazytonyli changed the title task/blog details swiftui Render blog details with a native SwiftUI list Sep 17, 2026
@dangermattic

dangermattic commented Sep 17, 2026

Copy link
Copy Markdown
Collaborator
1 Warning
⚠️ This PR is larger than 500 lines of changes. Please consider splitting it into smaller PRs for easier and faster reviews.

Generated by 🚫 Danger

@wpmobilebot

wpmobilebot commented Sep 17, 2026

Copy link
Copy Markdown
Contributor
App Icon📲 You can test the changes from this Pull Request in WordPress by scanning the QR code below to install the corresponding build.
App NameWordPress
ConfigurationRelease-Alpha
Build Number34492
VersionPR #26026
Bundle IDorg.wordpress.alpha
Commit781d86d
Installation URL5v2b7p5aa2mb0
Automatticians: You can use our internal self-serve MC tool to give yourself access to those builds if needed.

@wpmobilebot

wpmobilebot commented Sep 17, 2026

Copy link
Copy Markdown
Contributor
App Icon📲 You can test the changes from this Pull Request in Jetpack by scanning the QR code below to install the corresponding build.
App NameJetpack
ConfigurationRelease-Alpha
Build Number34492
VersionPR #26026
Bundle IDcom.jetpack.alpha
Commit781d86d
Installation URL7tr7p84432ct8
Automatticians: You can use our internal self-serve MC tool to give yourself access to those builds if needed.

@crazytonyli
crazytonyli force-pushed the task/blog-details-swiftui branch from 0ce6540 to 47f3389 Compare September 17, 2026 23:44
@crazytonyli
crazytonyli force-pushed the task/blog-details-swiftui branch from 47f3389 to 781d86d Compare September 18, 2026 01:04
return
}
if scrollView.contentOffset.y >= 60 {
if currentSection == .dashboard && scrollView.contentOffset.y >= 60 {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is an intentional change. When the blog details is displayed standalone on WordPress, we no longer show or hide the navigation bar depending on scrolling positions. Toggling navigation bar messes with SwiftUI list and results in very confusing list jumps. I decided to remove the toggling, instead of working around the jumps.

} header: {
if let title = section.title, !title.isEmpty {
Text(title)
}

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Another small UI change: the header and footer now uses the default system layout, which has slightly large spacing than the old UIKit implementation. I think that's acceptable.

@crazytonyli crazytonyli added this to the 27.4 milestone Sep 18, 2026
@crazytonyli
crazytonyli marked this pull request as ready for review September 18, 2026 01:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants