[Mobile] Disable Page Template picker if Modal Layout Picker is enabled#24061
[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
|
| 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.
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.
You are right @mchowning . I copy pasted the wrong naming from the old code.
Thank you for your feedback :)
chipsnyder
left a comment
There was a problem hiding this comment.
LGTM! Thanks for making that naming change.
| val isDarkMode: Boolean, | ||
| val htmlModeEnabled: Boolean | ||
| val htmlModeEnabled: Boolean, | ||
| val isModalLayoutPickerEnabled: Boolean |
There was a problem hiding this comment.
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.
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: