WordPress-Android
WordPress-Android copied to clipboard
Preference Migration Part-1: Migrated NotificationsSettingsDialogPreference
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
-
Potential unintended areas of impact
None
-
What I did to test those areas of impact (or what existing automated tests I relied on)
Manual Testing
-
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)
@antonis
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.
Hey @07jasjeet! Would you still like to work on this? Should we keep this PR open?
Closing due to inactivity, but we would be happy to review further contributions in the future!