Skip to content

Commit

Permalink
feat: Enable new feature in Gutenberg Mobile (#59144)
Browse files Browse the repository at this point in the history
  • Loading branch information
Siobhan Bamber authored Feb 23, 2024
1 parent a34b3b4 commit 44d4886
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ data class GutenbergProps @JvmOverloads constructor(
val enableLayoutGridBlock: Boolean,
val enableTiledGalleryBlock: Boolean,
val enableVideoPressBlock: Boolean,
val enableVideoPressV5Support: Boolean,
val enableFacebookEmbed: Boolean,
val enableInstagramEmbed: Boolean,
val enableLoomEmbed: Boolean,
Expand Down Expand Up @@ -69,6 +70,7 @@ data class GutenbergProps @JvmOverloads constructor(
putBoolean(PROP_CAPABILITIES_LAYOUT_GRID_BLOCK, enableLayoutGridBlock)
putBoolean(PROP_CAPABILITIES_TILED_GALLERY_BLOCK, enableTiledGalleryBlock)
putBoolean(PROP_CAPABILITIES_VIDEOPRESS_BLOCK, enableVideoPressBlock)
putBoolean(PROP_CAPABILITIES_VIDEOPRESS_V5_SUPPORT, enableVideoPressV5Support)
putBoolean(PROP_CAPABILITIES_UNSUPPORTED_BLOCK_EDITOR, enableUnsupportedBlockEditor)
putBoolean(PROP_CAPABILITIES_CAN_ENABLE_UNSUPPORTED_BLOCK_EDITOR, canEnableUnsupportedBlockEditor)
putBoolean(PROP_CAPABILITIES_IS_AUDIO_BLOCK_MEDIA_UPLOAD_ENABLED, isAudioBlockMediaUploadEnabled)
Expand Down Expand Up @@ -112,6 +114,7 @@ data class GutenbergProps @JvmOverloads constructor(
const val PROP_CAPABILITIES_LAYOUT_GRID_BLOCK = "layoutGridBlock"
const val PROP_CAPABILITIES_TILED_GALLERY_BLOCK = "tiledGalleryBlock"
const val PROP_CAPABILITIES_VIDEOPRESS_BLOCK = "videoPressBlock"
const val PROP_CAPABILITIES_VIDEOPRESS_V5_SUPPORT = "videoPressV5Support"
const val PROP_CAPABILITIES_FACEBOOK_EMBED_BLOCK = "facebookEmbed"
const val PROP_CAPABILITIES_INSTAGRAM_EMBED_BLOCK = "instagramEmbed"
const val PROP_CAPABILITIES_LOOM_EMBED_BLOCK = "loomEmbed"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ public enum Capabilities: String {
case layoutGridBlock
case tiledGalleryBlock
case videoPressBlock
case videoPressV5Support
case mentions
case xposts
case unsupportedBlockEditor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@ private Bundle getAppOptions() {
capabilities.putBoolean(GutenbergProps.PROP_CAPABILITIES_IS_AUDIO_BLOCK_MEDIA_UPLOAD_ENABLED, true);
capabilities.putBoolean(GutenbergProps.PROP_CAPABILITIES_TILED_GALLERY_BLOCK, true);
capabilities.putBoolean(GutenbergProps.PROP_CAPABILITIES_VIDEOPRESS_BLOCK, true);
capabilities.putBoolean(GutenbergProps.PROP_CAPABILITIES_VIDEOPRESS_V5_SUPPORT, true);
capabilities.putBoolean(GutenbergProps.PROP_CAPABILITIES_FACEBOOK_EMBED_BLOCK, true);
capabilities.putBoolean(GutenbergProps.PROP_CAPABILITIES_INSTAGRAM_EMBED_BLOCK, true);
capabilities.putBoolean(GutenbergProps.PROP_CAPABILITIES_LOOM_EMBED_BLOCK, true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,7 @@ extension GutenbergViewController: GutenbergBridgeDataSource {
.canEnableUnsupportedBlockEditor: unsupportedBlockCanBeActivated,
.tiledGalleryBlock: true,
.videoPressBlock: true,
.videoPressV5Support: true,
.isAudioBlockMediaUploadEnabled: true,
.reusableBlock: false,
.facebookEmbed: true,
Expand Down

0 comments on commit 44d4886

Please sign in to comment.