Skip to content

Comments v2: add the comment detail screen - #25949

Merged
crazytonyli merged 8 commits into
trunkfrom
task/comments-v2-m2-detail
Aug 30, 2026
Merged

Comments v2: add the comment detail screen#25949
crazytonyli merged 8 commits into
trunkfrom
task/comments-v2-m2-detail

Conversation

@crazytonyli

@crazytonyli crazytonyli commented Aug 27, 2026

Copy link
Copy Markdown
Contributor
details.mp4

@dangermattic

dangermattic commented Aug 27, 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 Aug 27, 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 Number34055
VersionPR #25949
Bundle IDcom.jetpack.alpha
Commitbd23c1d
Installation URL2133c5m0f43og
Automatticians: You can use our internal self-serve MC tool to give yourself access to those builds if needed.

@wpmobilebot

wpmobilebot commented Aug 27, 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 Number34055
VersionPR #25949
Bundle IDorg.wordpress.alpha
Commitbd23c1d
Installation URL1cjhcfrubn7jo
Automatticians: You can use our internal self-serve MC tool to give yourself access to those builds if needed.

@crazytonyli
crazytonyli requested a review from jkmassel August 27, 2026 06:34
@crazytonyli crazytonyli added this to the 27.3 milestone Aug 27, 2026
@crazytonyli
crazytonyli marked this pull request as ready for review August 27, 2026 06:34

@jkmassel jkmassel left a comment

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.

Looks good – just one note – if there's not very much content, I'm surprised it scrolls at all. It probably shouldn't?

Image Image
Scrolled to top Scrolled to bottom

The renderer was built for Reader cells that size themselves to the content. Add an `isScrollEnabled` option for hosts that pin the web view to a fixed region and let it scroll internally, with the native bounce (on overflow) and scroll indicator. It defaults to the previous behavior.
The detail screen shows unknown statuses verbatim, so `other` now carries
the server's raw string.
Move the avatar double-optional flattening and the plain-text snippet rule out of the wire-type initializer so the detail model can reuse them, and treat a whitespace-only author name as anonymous.
`CommentDetail` maps either the view- or edit-context wire type. The service
fetches with edit context when the user can moderate comments and falls back
to view context on a 401/403, so a stale capability degrades to a read-only
detail instead of an error.
Resolves the moderation capability once, fetches the detail, keeps the list
row's seed painted while the request is in flight, loads the parent comment
for the "In reply to" strip, and tracks the first successful view.
A fixed-region layout: pinned status pill and author header, an optional parent strip, and an injected content renderer that scrolls internally. The router owns the shared dependencies and pushes detail screens onto the list controller's navigation stack, so a parent comment can push recursively.
List rows become buttons that push the detail screen. The app supplies the web content renderer and the analytics adapter to the hosting controller.
@crazytonyli

Copy link
Copy Markdown
Contributor Author

@jkmassel The design is only allowing scroll if needed. The implementation is likely not accurate atm. I naively tested two extreme cases: short and long comments. I have create an issue, which I'll look into later.

@crazytonyli
crazytonyli force-pushed the task/comments-v2-m2-detail branch from 83b0fc1 to bd23c1d Compare August 30, 2026 21:17
@crazytonyli
crazytonyli enabled auto-merge August 30, 2026 21:17
@crazytonyli
crazytonyli added this pull request to the merge queue Aug 30, 2026
Merged via the queue into trunk with commit 2a6324d Aug 30, 2026
28 checks passed
@crazytonyli
crazytonyli deleted the task/comments-v2-m2-detail branch August 30, 2026 21:50
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.

4 participants