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

Refactors NoteBlock to Kotlin #20711

Merged
merged 6 commits into from
Apr 25, 2024

Conversation

antonis
Copy link
Member

@antonis antonis commented Apr 24, 2024

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:

  • 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 (strike-out the not-applying and unnecessary ones):

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

@dangermattic
Copy link
Collaborator

dangermattic commented Apr 24, 2024

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

Generated by 🚫 Danger

@antonis antonis marked this pull request as ready for review April 24, 2024 16:15
@antonis antonis requested a review from jarvislin April 24, 2024 16:15
@wpmobilebot
Copy link
Contributor

wpmobilebot commented Apr 24, 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
Versionpr20711-9fd9d9a
Commit9fd9d9a
Direct Downloadjetpack-prototype-build-pr20711-9fd9d9a.apk
Note: Google Login is not supported on these builds.

@wpmobilebot
Copy link
Contributor

wpmobilebot commented Apr 24, 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
Versionpr20711-9fd9d9a
Commit9fd9d9a
Direct Downloadwordpress-prototype-build-pr20711-9fd9d9a.apk
Note: Google Login is not supported on these builds.

Copy link
Contributor

@jarvislin jarvislin 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 making these refactors, it makes the foundation of codebase better. I've tested in different kinds of notifications, everything works as expected. LGTM

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.

@antonis
Copy link
Member Author

antonis commented Apr 25, 2024

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 #20713 passed the CI checks with the 1st attempt 🤔

@antonis antonis requested a review from a team as a code owner April 25, 2024 08:56
@antonis
Copy link
Member Author

antonis commented Apr 25, 2024

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 9fd9d9a

thank you for the tip @jarvislin 🙇

Copy link

sonarcloud bot commented Apr 25, 2024

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

Copy link

codecov bot commented Apr 25, 2024

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 ⚠️
.../ui/notifications/blocks/NoteBlockClickableSpan.kt 0.00% 51 Missing ⚠️
...otifications/blocks/NoteBlockLinkMovementMethod.kt 0.00% 27 Missing ⚠️
...press/android/ui/notifications/blocks/BlockType.kt 0.00% 15 Missing ⚠️
...roid/ui/notifications/blocks/GeneratedNoteBlock.kt 0.00% 2 Missing ⚠️
Additional details and impacted files
@@                         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              

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

@antonis antonis merged commit 1c4b4a1 into feature/notifications_refresh_p2 Apr 25, 2024
20 checks passed
@antonis antonis deleted the task/noteblock-to-kotlin branch April 25, 2024 09:47
@antonis antonis mentioned this pull request Apr 25, 2024
13 tasks
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.

None yet

4 participants