RS Posts: Add PostItemState variant UI indicators#22650
Conversation
Replace isPlaceholder/isError boolean flags in PostRsUiModel with a PostDisplayState enum that distinguishes FetchingWithData (thin progress bar at card bottom) and FailedWithData (warning icon in metadata line) from normal post display. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Eliminate intermediate .copy() calls by adding a displayState parameter to the private toUiModel extension function. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Generated by 🚫 Danger |
|
|
|
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## trunk #22650 +/- ##
==========================================
- Coverage 38.12% 38.09% -0.03%
==========================================
Files 2263 2263
Lines 115827 115917 +90
Branches 16090 16091 +1
==========================================
Hits 44157 44157
- Misses 68045 68135 +90
Partials 3625 3625 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
adalpari
left a comment
There was a problem hiding this comment.
Not easy to test, but the code and the post list looks correct to me.
🚢 it!





Summary
This PR updates the experimental post list to support the "state variants" added in this wordpress-rs PR.
Test plan
This PR doesn't lend itself well to testing since it involves various post states. I recommend simply scrolling through a large list of posts to verify everything looks correct, then viewing the previews in
PostRsListItemto see the various states.