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] Persist feed selection across sessions and fix text overlapping post list #20306

Merged
merged 4 commits into from
Feb 28, 2024

Conversation

thomashorta
Copy link
Contributor

Fixes #20127
Fixes #20183

This PR ends up fixing 2 issues since fixing #20127 made the problem from #20183 happen more often. Both fixes are on the small side so I decided to do both in the same PR.


To Test:

Testing Reader feed selection persistence

  1. Open the Jetpack app
  2. Go to Reader
  3. Select any feed that's not Discover
  4. Close the app and kill it from the "Recent Apps" screen
  5. Open the Jetpack app again
  6. Verify the same feed is still selected

Other test steps can be found here as well: #20127 (comment)

Testing "empty state" text showing up even when there are posts in the list

This is a bit trickier to test, but the steps listed by @daniloercoli in the original issue should do:

  1. Open the Reader on a list or a feed that doesn't have content
  2. Move to another feed
  3. Verify the empty state message is hidden

Regression Notes

  1. Potential unintended areas of impact

    • Problems in the "empty state" visibility state
  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)

    • N/A, the unit tests are still not up-to-date in this part of the code so it was not possible to add it currently

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.

Testing Checklist:

  • WordPress.com sites and self-hosted Jetpack sites.
  • 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)

Thomas Horta added 3 commits February 27, 2024 11:39
The priority for setting the selected feed item when opening the app from cold
start is:
1. SavedState bundle (it's saved if the app is destroyed by the system)
2. Persisted AppPref (saved every time the user selects a feed)
3. First item (should be used only the first time ever opening the Reader)
@wpmobilebot
Copy link
Contributor

wpmobilebot commented Feb 27, 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
Versionpr20306-4e2ef82
Commit4e2ef82
Direct Downloadwordpress-prototype-build-pr20306-4e2ef82.apk
Note: Google Login is not supported on these builds.

@wpmobilebot
Copy link
Contributor

wpmobilebot commented Feb 27, 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
Versionpr20306-4e2ef82
Commit4e2ef82
Direct Downloadjetpack-prototype-build-pr20306-4e2ef82.apk
Note: Google Login is not supported on these builds.

Copy link

codecov bot commented Feb 27, 2024

Codecov Report

Attention: Patch coverage is 26.31579% with 14 lines in your changes are missing coverage. Please review.

Project coverage is 40.24%. Comparing base (f831640) to head (4e2ef82).
Report is 258 commits behind head on trunk.

Files Patch % Lines
...ss/android/ui/reader/viewmodels/ReaderViewModel.kt 41.66% 5 Missing and 2 partials ⚠️
.../java/org/wordpress/android/ui/prefs/AppPrefs.java 0.00% 5 Missing ⚠️
.../org/wordpress/android/ui/prefs/AppPrefsWrapper.kt 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##            trunk   #20306      +/-   ##
==========================================
- Coverage   40.24%   40.24%   -0.01%     
==========================================
  Files        1472     1472              
  Lines       67920    67932      +12     
  Branches    11248    11249       +1     
==========================================
+ Hits        27334    27338       +4     
- Misses      38086    38094       +8     
  Partials     2500     2500              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@daniloercoli
Copy link
Contributor

The code looks good 👍, but I encountered an issue when returning to an empty list/blog. As soon as I select the list from the menu, the message is displayed without the illustration on top of it.
photo1709132432

@thomashorta
Copy link
Contributor Author

The code looks good 👍, but I encountered an issue when returning to an empty list/blog. As soon as I select the list from the menu, the message is displayed without the illustration on top of it.

Thanks for finding the issue, I just sent a commit fixing it.

Copy link
Contributor

@daniloercoli daniloercoli left a comment

Choose a reason for hiding this comment

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

Thanks for fixing the problem with the image not being shown in lists without content.

@thomashorta thomashorta merged commit 2e1e697 into trunk Feb 28, 2024
19 checks passed
@thomashorta thomashorta deleted the issue/20127-reader-persist-feed-selection branch February 28, 2024 19:38
thomashorta pushed a commit that referenced this pull request Mar 4, 2024
…list

Cherry-picking the changes from #20306 to target the current release version.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants