-
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
Changes from 5 commits
f969953
284faf7
3f9b1f5
3d9a129
5d6d4e2
38a2bc6
2d9a5f4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line 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 | ||
) { | ||
|
||
fun getInitialProps(bundle: Bundle?) = (bundle ?: Bundle()).apply { | ||
|
@@ -24,6 +25,7 @@ data class GutenbergProps( | |
putBundle(PROP_CAPABILITIES, Bundle().apply { | ||
putBoolean(PROP_CAPABILITIES_MENTIONS, enableMentions) | ||
putBoolean(PROP_CAPABILITIES_UNSUPPORTED_BLOCK_EDITOR, enableUnsupportedBlockEditor) | ||
putBoolean(PROP_NAME_MODAL_LAYOUT_PICKER, isModalLayoutPickerEnabled) | ||
}) | ||
|
||
editorTheme?.also { | ||
|
@@ -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 commentThe 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 commentThe 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. |
||
} | ||
} |
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:
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.