WordPress-Android icon indicating copy to clipboard operation
WordPress-Android copied to clipboard

Preference Migration Part-1: Migrated NotificationsSettingsDialogPreference

Open 07jasjeet opened this issue 1 year ago • 4 comments

Created AndroidX implementation of NotificationsSettingsDialogPreference.java Did not remove NotificationsSettingsDialogPreference.java due to compatibility issues but will be removed once NotificationsSettingsFragment has been migrated.

Fixes #17962 (partially)

Review Notes: Compare with NotificationsSettingsDialogPreference.java and NotificationsSettingsFragment to draw conclusions.


To Test:

Testing can be done in upcoming PRs. Otherwise, supplying dummy data and showing this dialog on any screen would work as well.


Regression Notes

  1. Potential unintended areas of impact

    None

  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)

    None


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.

UI Changes Testing Checklist:

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

07jasjeet avatar Jan 19 '24 07:01 07jasjeet

Warnings
:warning: PR is not assigned to a milestone.

Generated by :no_entry_sign: dangerJS

@antonis

07jasjeet avatar Jan 19 '24 07:01 07jasjeet

Thank you for your contribution @07jasjeet 🙇

I've left some feedback inline your code.

Testing can be done in upcoming PRs. Otherwise, supplying dummy data and showing this dialog on any screen would work as well.

Could you help me with this to be able to test the UI properly (e.g. a patch file)?

I also noticed a lint error (you can trigger it with ./gradlew lintWordpressVanillaRelease) that would prevent the CI from merging your PR:

e: WordPress/src/main/java/org/wordpress/android/ui/prefs/notifications/NotificationsSettingsDialogPreferenceX.kt:10:5 Accidental override: The following declarations have the same JVM signature (getContext()Landroid/content/Context;): fun <get-context>(): Context defined in org.wordpress.android.ui.prefs.notifications.NotificationsSettingsDialogPreferenceX fun getContext(): Context defined in org.wordpress.android.ui.prefs.notifications.NotificationsSettingsDialogPreferenceX

We could annotate the val context: Context parameter with the @JvmField annotation to overcome this for now and be able to compile the project.

antonis avatar Jan 31 '24 13:01 antonis

Hey @07jasjeet! Would you still like to work on this? Should we keep this PR open?

irfano avatar Jun 17 '24 14:06 irfano

Closing due to inactivity, but we would be happy to review further contributions in the future!

jkmassel avatar Jul 10 '24 15:07 jkmassel