Skip to content

RS Posts: Add PostItemState variant UI indicators#22650

Merged
nbradbury merged 4 commits intotrunkfrom
feature/rsposts-state-variants
Mar 4, 2026
Merged

RS Posts: Add PostItemState variant UI indicators#22650
nbradbury merged 4 commits intotrunkfrom
feature/rsposts-state-variants

Conversation

@nbradbury
Copy link
Contributor

@nbradbury nbradbury commented Mar 3, 2026

Summary

This PR updates the experimental post list to support the "state variants" added in this wordpress-rs PR.

variants

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 PostRsListItem to see the various states.

preview

nbradbury and others added 2 commits March 3, 2026 13:49
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>
@dangermattic
Copy link
Collaborator

dangermattic commented Mar 3, 2026

1 Warning
⚠️ PR is not assigned to a milestone.

Generated by 🚫 Danger

@wpmobilebot
Copy link
Contributor

wpmobilebot commented Mar 3, 2026

App Icon📲 You can test the changes from this Pull Request in WordPress Android by scanning the QR code below to install the corresponding build.

App NameWordPress Android
FlavorJalapeno
Build TypeDebug
Versionpr22650-7fccfe0
Build Number1486
Application IDorg.wordpress.android.prealpha
Commit7fccfe0
Installation URL2pjplq2dvn990
Note: Google Login is not supported on these builds.

@wpmobilebot
Copy link
Contributor

wpmobilebot commented Mar 3, 2026

App Icon📲 You can test the changes from this Pull Request in Jetpack Android by scanning the QR code below to install the corresponding build.

App NameJetpack Android
FlavorJalapeno
Build TypeDebug
Versionpr22650-7fccfe0
Build Number1486
Application IDcom.jetpack.android.prealpha
Commit7fccfe0
Installation URL0phbjd18i7v28
Note: Google Login is not supported on these builds.

@codecov
Copy link

codecov bot commented Mar 3, 2026

Codecov Report

❌ Patch coverage is 0% with 103 lines in your changes missing coverage. Please review.
✅ Project coverage is 38.09%. Comparing base (50643b2) to head (7fccfe0).
⚠️ Report is 1 commits behind head on trunk.

Files with missing lines Patch % Lines
...press/android/ui/postsrs/screens/PostRsListItem.kt 0.00% 86 Missing ⚠️
.../wordpress/android/ui/postsrs/PostRsListUiState.kt 0.00% 17 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@sonarqubecloud
Copy link

sonarqubecloud bot commented Mar 4, 2026

@nbradbury nbradbury marked this pull request as ready for review March 4, 2026 13:09
@nbradbury nbradbury requested a review from adalpari March 4, 2026 13:09
Copy link
Contributor

@adalpari adalpari left a comment

Choose a reason for hiding this comment

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

Not easy to test, but the code and the post list looks correct to me.

🚢 it!

@nbradbury nbradbury merged commit 4cd7086 into trunk Mar 4, 2026
26 checks passed
@nbradbury nbradbury deleted the feature/rsposts-state-variants branch March 4, 2026 16:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants