Gutenberg/dark mode integration#11004
Conversation
|
You can test the changes on this Pull Request by downloading the APK here. |
RELEASE-NOTES.txt
Outdated
| @@ -1,3 +1,7 @@ | |||
| 14.1 | |||
| ----- | |||
| * Block Editor: Add support for Dark Mode | |||
There was a problem hiding this comment.
Since this branch targets feature branch, it's probably not going to get released just yet :)
| return view; | ||
| } | ||
|
|
||
| private String getAppTheme() { |
There was a problem hiding this comment.
I'm not really sure about the details of GB implementation, but this approach of getting string resource from the app_theme_entry_value_* looks a bit hacky to me. Can GB be aware of the current theme from withing its own code? Or we could just use boolean to indicate light or dark mode.
There was a problem hiding this comment.
Fixed. Changed to boolean.
| <resources> | ||
|
|
||
| <!-- Gutenberg --> | ||
| <color name="background_color">#121212</color> |
There was a problem hiding this comment.
While overriding color values is a legit approach, ideally we would use attributes for this, that we could override in styles.xml on client-side. If GB would use other standard material color attributes (colorPrimary, colorSecondary,colorBackground, etc.), styling it from the client would also be a breeze.
PS: Discregard this.
| localeString, | ||
| translations); | ||
| translations, | ||
| getContext().getResources().getColor(R.color.background_color)); |
There was a problem hiding this comment.
We have defined background color in our styles.xml for both light and dark mode, so I think we can use an existing color attribute here, like this:
ContextExtensionsKt.getColorFromAttribute(getContext(), R.attr.backgroundColor)
There was a problem hiding this comment.
ContextExtensionsKt isn't available in this class. Not sure if we want to include it?
# Conflicts: # WordPress/src/main/java/org/wordpress/android/ui/posts/PostsListActivity.kt # libs/gutenberg-mobile
…evelop Merge 14.3 final into develop
|
This is looking good. Connect a Site ScreenI did notice a weird issue when switching battery mode on/off from the editor. It would load up the connect a site screen. UPDATE: This happened to me a number of times, but it also stopped occurring with me shortly after I originally posted this comment, so it may have just been a temporary local issue. I only tested this using an emulator because I don't have an API<29 device handy. App Settings appear to be disabledAlso, and this isn't an issue with the gutenberg changes, but to my eyes, I found that the coloring of the options on the app settings screen made it seem like all the options other than privacy settings were disabled. I realize this code has been sitting for awhile (so sorry about the slow review 😞) so maybe these are just the result of not having the latest code on this branch? cc: @khaykov |
|
@mchowning Yeah, this looks like an old version of the feature branch :) I'll check out the |
|
We're freezing |
Update Nokogiri to 1.10.9 to fix a warning
Updates FluxC version to 1.6.7
…ation # Conflicts: # libs/gutenberg-mobile
…rt_configuration_change Fix QuickStart dialog configuration change issue
…rowser_custom_domain Open blogs in external browser with custom domains
| setTitle(SiteUtils.getSiteNameOrHomeURL(mSite)); | ||
| mSectionsPagerAdapter = new SectionsPagerAdapter(fragmentManager); | ||
|
|
||
| setupViewPager(); |
There was a problem hiding this comment.
Hey @khaykov,
I moved the code into a separate method as our changes have exceeded the allowed number of lines per method which resulted in failed lint tests.
| tools:listitem="@layout/insights_management_list_item" /> | ||
|
|
||
| </ScrollView> No newline at end of file | ||
| </ScrollView> |
| tools:listitem="@layout/insights_management_list_item" /> | ||
|
|
||
| </ScrollView> No newline at end of file | ||
| </ScrollView> |


Fixes implements Dark Mode on Android platform: wordpress-mobile/gutenberg-mobile#1675
To test: Instructions can be found on the following Gutenberg PR: wordpress-mobile/gutenberg-mobile#1717
PR submission checklist:
I have considered adding unit tests where possible.
I have considered if this change warrants user-facing release notes and have added them to
RELEASE-NOTES.txtif necessary.