Repository navigation
CMM-2536: Sort RS Drafts and Trashed by modified date - #23429
Merged
Merged
Conversation
Matches iOS. Draft rows show and group by the modified date so the date headers stay contiguous. Search keeps sorting by date.
Lists the most recently trashed posts first, labelled "Trashed: <date>", with the date headers following the same date.
Derive the tab's sort from its date label so the two can't disagree, and let the mapper apply the label instead of patching the date afterwards.
Contributor
|
|
Contributor
|
|
This comment was marked as resolved.
This comment was marked as resolved.
…drafts-by-modified
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## trunk #23429 +/- ##
==========================================
- Coverage 39.07% 39.07% -0.01%
==========================================
Files 2304 2304
Lines 128911 128926 +15
Branches 18301 18307 +6
==========================================
+ Hits 50373 50378 +5
- Misses 74301 74310 +9
- Partials 4237 4238 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
nbradbury
marked this pull request as ready for review
October 21, 2026 11:19
Contributor
|
Looks good and works as expected. Just noting these small sugestions:
|
adalpari
approved these changes
Oct 21, 2026
Contributor
Author
|
@adalpari Thanks! All three check out.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


TL;DR
Fixes CMM-2536.
As discussed in our last walkthrough, this PR updates the new RS posts list to sorts Drafts and Trashed by modified date, so the most recently edited drafts and the most recently trashed posts come first. This behavior matches iOS, with the addition of "Modified:" and "Trashed:" in the date line for clarification.
Description
Details
PostRsListTabgainsmodifiedDateLabelResId. Drafts and Trashed set it, and its computedorderByisMODIFIEDfor any tab with a label,DATEotherwise.ContentItemMappergainsmodifiedDateFormat. When it's set, the row date and the date-header grouping come frommodifiedGmt, and the row date is wrapped in the label. Without that, the headers would fragment ("Last week", "Today", "Last week"). Pages don't pass it, so they're unchanged.datealone was unreliable for drafts. WordPress core bumpspost_dateon each save for drafts with a floating date, but the app sends an explicitdateon save, which pins it. So drafts last saved on the web moved to the top and drafts last saved in the app didn't.Testing instructions
Drafts:
Trashed:
Unchanged: