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

Convert notes adapter to kotlin #20129

Conversation

mkevins
Copy link
Contributor

@mkevins mkevins commented Feb 6, 2024

Description

This PR refactors the NotesAdapter class to Kotlin. This is intended to improve the further development of the features we are adding in the notifications refresh project.


To Test:

  • Run the app using this branch (either build in Android Studio, or via one of the apks)
  • Login to the app using an account which has some activity (with various kinds of notifications)
  • Smoke test the notifications behavior:
    • Scroll the notifications list and ensure they all look correct
    • Tap on some of the notifications to ensure that the behavior is still correct (e.g. tap a like notification to see the list of users who liked the comment or post, etc.)

Regression Notes

  1. Potential unintended areas of impact

Notifications

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

Manual tests

  1. What automated tests I added (or what prevented me from doing so)

With the code in its current state, adding automated tests would exceed the scope allotted for this work.


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)

This appears to be dead code.
This is a preparation for converting to Kotlin.
Manual changes are intentionally ommited from this commit in order to
better track the rest of the conversion / refactor in later steps.
We need to mark this to avoid warnings as errors, but we will be
refactoring the deprecated usages in later stages.
This was a static helper method, and is now a companion function.
@peril-wordpress-mobile
Copy link

peril-wordpress-mobile bot commented Feb 6, 2024

Warnings
⚠️ PR has more than 300 lines of code changing. Consider splitting into smaller PRs if possible.

Generated by 🚫 dangerJS

@dangermattic
Copy link
Collaborator

dangermattic commented Feb 6, 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 FILTERS is missing tests, but unit-tests-exemption label was set to ignore this.

Generated by 🚫 Danger

@wpmobilebot
Copy link
Contributor

wpmobilebot commented Feb 6, 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
Versionpr20129-d2c57d3
Commitd2c57d3
Direct Downloadwordpress-prototype-build-pr20129-d2c57d3.apk
Note: Google Login is not supported on these builds.

@wpmobilebot
Copy link
Contributor

wpmobilebot commented Feb 6, 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
Versionpr20129-d2c57d3
Commitd2c57d3
Direct Downloadjetpack-prototype-build-pr20129-d2c57d3.apk
Note: Google Login is not supported on these builds.

@mkevins mkevins added this to the 24.3 milestone Feb 6, 2024
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.

Nice work! Thanks for converting the adapter to Kotlin.
The test result is as expected.
There's no blocker, but there are some details can be refactored.
Feel free to merge this PR.

Copy link
Contributor

@antonis antonis left a comment

Choose a reason for hiding this comment

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

Thank you for grabbing the opportunity to improve the codebase @mkevins 🙇
The code looks great and there was no change in the app behaviour in my tests 🎉

@mkevins mkevins merged commit 3704986 into feature/notifications_refresh_p1 Feb 6, 2024
20 checks passed
@mkevins mkevins deleted the feature/notifications_refresh_p1--convert-notes-adapter-to-kotlin branch February 6, 2024 09:50
@mkevins
Copy link
Contributor Author

mkevins commented Feb 6, 2024

Thank you both for reviewing and testing!

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.

5 participants