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

Refactors NoteBlock to Kotlin #20711

Closed antonis closed 2 weeks ago

antonis commented 2 weeks ago

Description

As an initial step towards the Milestone screen revamp this PR refactors some of the related code to Kotlin.


To Test:

  1. Open the Notifications tab
  2. Browse to different types of notifications
  3. Verify no change in the functionality

Regression Notes

  1. Potential unintended areas of impact

    • Notifications
  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)

    • I plan to add tests with a follow up PR

PR Submission Checklist:


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

dangermattic commented 2 weeks ago
2 Warnings
:warning: This PR is larger than 300 lines of changes. Please consider splitting it into smaller PRs for easier and faster reviews.
:warning: Class BlockType is missing tests, but unit-tests-exemption label was set to ignore this.

Generated by :no_entry_sign: Danger

wpmobilebot commented 2 weeks 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
Versionpr20711-9fd9d9a
Commit9fd9d9ad0cd5501c94653ac694e049817a71df1d
Direct Downloadjetpack-prototype-build-pr20711-9fd9d9a.apk
Note: Google Login is not supported on these builds.
wpmobilebot commented 2 weeks 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
Versionpr20711-9fd9d9a
Commit9fd9d9ad0cd5501c94653ac694e049817a71df1d
Direct Downloadwordpress-prototype-build-pr20711-9fd9d9a.apk
Note: Google Login is not supported on these builds.
antonis commented 2 weeks ago

Thank you for reviewing @jarvislin πŸ™‡

It seems that our CI/CD is unstable, I gonna re-run the task, please feel free to merge it after the build is done.

I'll run the tests again and if they fail I'll check if any change was introduced with the code. It's weird that https://github.com/wordpress-mobile/WordPress-Android/pull/20713 passed the CI checks with the 1st attempt πŸ€”

antonis commented 2 weeks ago

I'll run the tests again and if they fail I'll check if any change was introduced with the code.

This should be fixed with 9fd9d9ad0cd5501c94653ac694e049817a71df1d

thank you for the tip @jarvislin πŸ™‡

sonarcloud[bot] commented 2 weeks ago

Quality Gate Passed Quality Gate passed

Issues
1 New issue
0 Accepted issues

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

See analysis details on SonarCloud

codecov[bot] commented 2 weeks ago

Codecov Report

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

Project coverage is 40.65%. Comparing base (575b40c) to head (9fd9d9a). Report is 2 commits behind head on feature/notifications_refresh_p2.

Files Patch % Lines
...press/android/ui/notifications/blocks/NoteBlock.kt 4.42% 108 Missing :warning:
.../ui/notifications/blocks/NoteBlockClickableSpan.kt 0.00% 51 Missing :warning:
...otifications/blocks/NoteBlockLinkMovementMethod.kt 0.00% 27 Missing :warning:
...press/android/ui/notifications/blocks/BlockType.kt 0.00% 15 Missing :warning:
...roid/ui/notifications/blocks/GeneratedNoteBlock.kt 0.00% 2 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## feature/notifications_refresh_p2 #20711 +/- ## ==================================================================== + Coverage 40.64% 40.65% +0.01% ==================================================================== Files 1485 1485 Lines 68315 68285 -30 Branches 11295 11294 -1 ==================================================================== Hits 27764 27764 + Misses 38038 38008 -30 Partials 2513 2513 ```

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