wordpress-mobile / WordPress-Android

WordPress for Android
http://android.wordpress.org
GNU General Public License v2.0
2.92k stars 1.3k forks source link

HACK Week: Reader detail customization #20506

Closed thomashorta closed 1 month ago

thomashorta commented 1 month ago

Internal refs: zQnohyMpLzBzQ5jzMMKni3-fi-3900_17941, p1710343618122149-slack-C06PGTY5PKK Equivalent iOS PR: https://github.com/wordpress-mobile/WordPress-iOS/pull/22851

This is mainly a proof-of-concept based on a HACK Week idea of Reader Customization by providing a Reading Preferences sheet that can change color, font, and font size of the post content, so each user can choose what works best for them.

Here's a quick demo of what was implemented so far:

https://github.com/wordpress-mobile/WordPress-Android/assets/5091503/7473d5ea-f7d0-4635-9f3d-af2d581af5c5

Some of the caveats so far are:

IMHO, the overall experience so far is not that bad, but it needs a bit more work to get this feature to a shippable condition.


To Test:


Regression Notes

  1. Potential unintended areas of impact

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

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

    • TODO

PR Submission Checklist:


Testing Checklist (strike-out the not-applying and unnecessary ones):

dangermattic commented 1 month ago
2 Warnings
:warning: strings.xml files should only be updated on release branches, when the translations are downloaded by our automation.
:warning: This PR is larger than 300 lines of changes. Please consider splitting it into smaller PRs for easier and faster reviews.

Generated by :no_entry_sign: Danger

wpmobilebot commented 1 month ago
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
Versionpr20506-41760ca
Commit41760cad65d865832e261678c3cbed35aa2c1238
Direct Downloadwordpress-prototype-build-pr20506-41760ca.apk
Note: Google Login is not supported on these builds.
wpmobilebot commented 1 month ago
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
Versionpr20506-41760ca
Commit41760cad65d865832e261678c3cbed35aa2c1238
Direct Downloadjetpack-prototype-build-pr20506-41760ca.apk
Note: Google Login is not supported on these builds.
codecov[bot] commented 1 month ago

Codecov Report

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

Project coverage is 40.31%. Comparing base (569b0a4) to head (41760ca). Report is 26 commits behind head on trunk.

Files Patch % Lines
...droid/ui/reader/models/ReaderReadingPreferences.kt 63.71% 41 Missing :warning:
...ordpress/android/ui/reader/ReaderPostRenderer.java 0.00% 17 Missing :warning:
...der/discover/ReaderPostMoreButtonUiStateBuilder.kt 9.09% 9 Missing and 1 partial :warning:
...android/ui/reader/utils/ReadingPreferencesUtils.kt 0.00% 9 Missing :warning:
...dpress/android/util/extensions/WindowExtensions.kt 0.00% 7 Missing :warning:
...id/util/EnumWithFallbackValueTypeAdapterFactory.kt 73.91% 3 Missing and 3 partials :warning:
.../java/org/wordpress/android/ui/prefs/AppPrefs.java 0.00% 5 Missing :warning:
...press/android/util/extensions/ContextExtensions.kt 0.00% 5 Missing :warning:
.../org/wordpress/android/ui/prefs/AppPrefsWrapper.kt 0.00% 2 Missing :warning:
...ui/reader/discover/ReaderPostCardActionsHandler.kt 0.00% 2 Missing :warning:
... and 6 more
Additional details and impacted files ```diff @@ Coverage Diff @@ ## trunk #20506 +/- ## ========================================== + Coverage 40.24% 40.31% +0.07% ========================================== Files 1463 1472 +9 Lines 67600 67831 +231 Branches 11201 11216 +15 ========================================== + Hits 27205 27347 +142 - Misses 37934 38018 +84 - Partials 2461 2466 +5 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

RenanLukas commented 1 month ago

Thanks for the PR, @thomashorta ! I've tested it a bit and it seems to be working as expected. Great job!

I'm starting to review the code.

sonarcloud[bot] commented 1 month ago

Quality Gate Passed Quality Gate passed

Issues
2 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud