Feature/1675 dark mode android integration#1717
Conversation
|
Early feedback from @iamthomasbishop :
|
# Conflicts: # gutenberg
# Conflicts: # gutenberg
# Conflicts: # gutenberg
etoledom
left a comment
There was a problem hiding this comment.
JS Side looks good to me! 👍
Let's check with @mchowning or @maxme for a final look on the Native side.
Let's not forget to change the Future release entry to the proper one we know this will land.
(Today is the last chance to merge to v1.23.0)
| public class RNReactNativeGutenbergBridgePackage implements ReactPackage { | ||
| private GutenbergBridgeJS2Parent mGutenbergBridgeJS2Parent; | ||
| private RNReactNativeGutenbergBridgeModule mRNReactNativeGutenbergBridgeModule; | ||
| private boolean mIsDarkMode; |
There was a problem hiding this comment.
Would be nice if we could mark mIsDarkMode and mGutenbergBridgeJS2Parent as final. Would make it clear that mRNReactNativeGutenbergBridgeModule is the only thing that can/should change, which also makes it obvious that this is not a dark mode variable that gets updated if the user's dark mode settings change (i.e., battery saver starts). I do not feel strongly about this change though, feel free to leave as-is if you prefer.
There was a problem hiding this comment.
Thanks for the good advice.
Will update them!
|
This is looking good @marecar3 ! Noticed that on API<29 devices switching battery mode on/off while within the editor would update the dark mode for the app (i.e. the toolbar on the top would update), but not for the editor. This seems like a bit of an edge case, and I wouldn't mind proceeding with this PR as is and opening a new issue for that (like what we did with the similar issue on API 29+ devices).
I also left a comment about a couple of issues I saw on the WPAndroid PR, but those issues are almost certainly not related to your changes. |
# Conflicts: # gutenberg # react-native-gutenberg-bridge/android/src/main/java/org/wordpress/mobile/WPAndroidGlue/WPAndroidGlueCode.java
# Conflicts: # gutenberg
# Conflicts: # gutenberg
# Conflicts: # gutenberg
|
Hey @mchowning! Thanks for the good review! I have found where is the problem and now it should be fixed. Please, can you do another iteration of testing? Thanks! |
mchowning
left a comment
There was a problem hiding this comment.
Looks good! The issue with the editor not immediately switching themes when battery mode is changed is now fixed. Great work @marecar3 !
I did notice that the WPAndroid PR already got merged. Should we open a new WPAndroid PR once this gets merged so that we can update that to use the merged hash? (might not be necessary since the WPAndroid PR is only targetting a feature branch)
| 1.24.0 | ||
| ------ | ||
| * New block: Latest Posts | ||
| * [Android] Can now scroll post when in landscape orientation with the soft keyboard displayed |
There was a problem hiding this comment.
This shouldn't be part of release notes as it was removed: https://github.com/wordpress-mobile/gutenberg-mobile/pull/1989/files#diff-a3d054590c32de57d87be233927e755dL3
But for some reason, it was reverted from revert.
Hey @mchowning, thanks for asking! |




Fixes #1675
Gutenberg PR: WordPress/gutenberg#19293
WordPress-Android PR: wordpress-mobile/WordPress-Android#11004
To test:
On devices with API <=28:
Set by Battery Saver.Darkand confirm that the app switches to Dark Theme.Lightand confirm that the app switches to Light Theme.Set by Battery Saverand enable Battery Saver on the device.On devices with API 29+:
System Default.Darkand confirm that the app switches to Dark Theme.Lightand confirm that the app switches to Light Theme.System Defaultand close the app.Note for API 29+: At this moment we aren't able to get the app theme to switch automatically when the Dark Theme is toggled. For now, you need to restart the app for new theme to take effect. @khaykov has created a separate issue for this at wordpress-mobile/WordPress-Android#10748
PR submission checklist:
RELEASE-NOTES.txtif necessary.