-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
[Mobile] Disable Page Template picker if Modal Layout Picker is enabled #24061
Conversation
Size Change: +346 B (0%) Total Size: 1.15 MB
ℹ️ View Unchanged
|
@@ -52,5 +54,6 @@ data class GutenbergProps( | |||
const val PROP_CAPABILITIES = "capabilities" | |||
const val PROP_CAPABILITIES_MENTIONS = "mentions" | |||
const val PROP_CAPABILITIES_UNSUPPORTED_BLOCK_EDITOR = "unsupportedBlockEditor" | |||
const val PROP_NAME_MODAL_LAYOUT_PICKER = "modalLayoutPicker" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not a big deal, but for the sake of consistency with the other "capabilities" props, what would you think about renaming this variable to "PROP_CAPABILITIES_MODAL_LAYOUT_PICKER"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right @mchowning . I copy pasted the wrong naming from the old code.
Thank you for your feedback :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks for making that naming change.
@@ -10,7 +10,8 @@ data class GutenbergProps( | |||
val editorTheme: Bundle?, | |||
val translations: Bundle, | |||
val isDarkMode: Boolean, | |||
val htmlModeEnabled: Boolean | |||
val htmlModeEnabled: Boolean, | |||
val isModalLayoutPickerEnabled: Boolean |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was thinking of adding a default value to the new parameter in order to be able to merge this early without breaking the WP-Android code. Something like the following:
data class GutenbergProps @JvmOverloads constructor(
val enableMentions: Boolean,
val enableUnsupportedBlockEditor: Boolean,
val localeSlug: String,
val postType: String,
val editorTheme: Bundle?,
val translations: Bundle,
val isDarkMode: Boolean,
val htmlModeEnabled: Boolean
val htmlModeEnabled: Boolean,
val isModalLayoutPickerEnabled: Boolean = false
) {
Wdyt @mchowning , @chipsnyder ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That seems like a good plan to me.
Fixes: wordpress-mobile/gutenberg-mobile#2419
Related PRs:
WordPress-Android
: [Modal Layout Picker] Create Modal window for Modal Layout Picker wordpress-mobile/WordPress-Android#12482gutenberg-mobile
: [Modal Layout Picker] Disable Page Template picker if MLP is enabled wordpress-mobile/gutenberg-mobile#2494Description
Adds a capability to hide the editor layout picker when the Modal Layout Picker(MLP) is enabled.
For detailed description of this PR please check wordpress-mobile/WordPress-Android#12482
Notes
This has been updated with the Consolidation of the Gutenberg initialProps handling
How has this been tested?
This feature can be tested by using the build from wordpress-mobile/WordPress-Android#12482
Screenshots
Types of changes
New feature
Checklist: