Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Reader IA] Fix ReaderPostTable sorting date as string #19949

Conversation

RenanLukas
Copy link
Contributor

@RenanLukas RenanLukas commented Jan 15, 2024

Fixes #19897

I've changed the methods that were previously sorting dates as strings to use datetime in ReaderPostTable (see issue for context). In all scenarios the sorting was already working as expected, but this is only true because the posts have the same timezone. It's a weak solution IMHO because if the timezone changes it will break the sorting everywhere. The goal of this PR is to avoid having these problems in the future (like we had with #19881).


To Test:

Basically Reader feeds have to continue working as expected.

  • Instal JP and sign in;
  • Open "Reader";
  • Verify "Discover", "Subscriptions", "Saved", "Liked", "Automattic" and custom lists are working as expected (specially the sorting). Please note that not all feeds have the same sorting based on date_publishing (see here);
  • Open any blog details;
  • Verify the posts list is working as expected (specially the sorting);
  • Open any tag;
  • Verify the posts list is working as expected (specially the sorting).

Regression Notes

  1. Potential unintended areas of impact

    • Reader feeds
  2. What I did to test those areas of impact (or what existing automated tests I relied on)

    • Manual testing
  3. What automated tests I added (or what prevented me from doing so)

    --


PR Submission Checklist:

  • I have completed the Regression Notes.
  • I have considered adding accessibility improvements for my changes.
  • I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary.

UI Changes Testing Checklist:

  • Portrait and landscape orientations.
  • Light and dark modes.
  • Fonts: Larger, smaller and bold text.
  • High contrast.
  • Talkback.
  • Languages with large words or with letters/accents not frequently used in English.
  • Right-to-left languages. (Even if translation isn’t complete, formatting should still respect the right-to-left layout)
  • Large and small screen sizes. (Tablet and smaller phones)
  • Multi-tasking: Split screen and Pop-up view. (Android 10 or higher)

	These entities were being sorted by date_liked as a string, and it was working because they are being inserted with the same timezone. This solution is weak, because if the timezone ever changes among entities the sorting will stop working. Using datetime function solves this issue.
	These entities were being sorted by date_published as a string, and it works as long as they are inserted with the same timezone. This solution is weak, because if the timezone ever changes among entities the sorting will stop working. Using datetime function solves this issue.
	These entities were being sorted by date_tagged as a string, and it works as long as they are inserted with the same timezone. This solution is weak, because if the timezone ever changes among entities the sorting will stop working. Using datetime function solves this issue.
@wpmobilebot
Copy link
Contributor

wpmobilebot commented Jan 16, 2024

Jetpack📲 You can test the changes from this Pull Request in Jetpack by scanning the QR code below to install the corresponding build.
App NameJetpack Jetpack
FlavorJalapeno
Build TypeDebug
Versionpr19949-6ecdb71
Commit6ecdb71
Direct Downloadjetpack-prototype-build-pr19949-6ecdb71.apk
Note: Google Login is not supported on these builds.

@wpmobilebot
Copy link
Contributor

wpmobilebot commented Jan 16, 2024

WordPress📲 You can test the changes from this Pull Request in WordPress by scanning the QR code below to install the corresponding build.
App NameWordPress WordPress
FlavorJalapeno
Build TypeDebug
Versionpr19949-6ecdb71
Commit6ecdb71
Direct Downloadwordpress-prototype-build-pr19949-6ecdb71.apk
Note: Google Login is not supported on these builds.

@RenanLukas RenanLukas marked this pull request as ready for review January 16, 2024 17:58
@peril-wordpress-mobile
Copy link

Warnings
⚠️ PR is not assigned to a milestone.

Generated by 🚫 dangerJS

@dangermattic
Copy link
Collaborator

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

Generated by 🚫 Danger

Copy link
Contributor

@thomashorta thomashorta left a comment

Choose a reason for hiding this comment

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

The code looks good to me and changes seem to be working as expected. Thanks for this PR!

@RenanLukas RenanLukas merged commit 0c65f60 into feature/reader-ia Jan 16, 2024
19 checks passed
@RenanLukas RenanLukas deleted the issue/19897-fix-readerposttable-sorting-date-as-string branch January 16, 2024 22:09
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