Skip to content

Commit

Permalink
Remove feature flag for mobile page templates (#20718)
Browse files Browse the repository at this point in the history
* Enable page templates on production builds

* Remove mobileEnablePageTemplates from docs

* Fix contact emoji

* Update spacer height on services template

* Remove old documentation for the feature flag

* Remove unused variable
  • Loading branch information
koke authored Mar 13, 2020
1 parent 4793696 commit f8421c4
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 12 deletions.
1 change: 0 additions & 1 deletion packages/block-editor/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,6 @@ _Properties_
- _\_\_experimentalBlockDirectory_ `boolean`: Whether the user has enabled the Block Directory
- _\_\_experimentalEnableFullSiteEditing_ `boolean`: Whether the user has enabled Full Site Editing
- _\_\_experimentalEnableFullSiteEditingDemo_ `boolean`: Whether the user has enabled Full Site Editing Demo Templates
- _\_\_mobileEnablePageTemplates_ `boolean`: Whether the user has enabled the Page Templates

<a name="SkipToSelectedBlock" href="#SkipToSelectedBlock">#</a> **SkipToSelectedBlock**

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const Contact = {
// translators: title for "Contact" page template
name: __( 'Contact' ),
key: 'contact',
icon: '✉',
icon: '✉',
content: [
{
name: 'core/paragraph',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ const Services = {
{
name: 'core/spacer',
attributes: {
height: 40,
height: 24,
},
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,7 @@ const __experimentalUsePageTemplatePickerVisible = () => {
return useSelect( ( select ) => {
const { getCurrentPostType } = select( 'core/editor' );

const { getBlockOrder, getBlock, getSettings } = select(
'core/block-editor'
);

const isPageTemplatesEnabled = getSettings()
.__mobileEnablePageTemplates;
const { getBlockOrder, getBlock } = select( 'core/block-editor' );

const blocks = getBlockOrder();
const isEmptyBlockList = blocks.length === 0;
Expand All @@ -23,7 +18,7 @@ const __experimentalUsePageTemplatePickerVisible = () => {
const isEmptyContent = isEmptyBlockList || isOnlyUnmodifiedDefault;
const isPage = getCurrentPostType() === 'page';

return isPageTemplatesEnabled && isEmptyContent && isPage;
return isEmptyContent && isPage;
}, [] );
};

Expand Down
1 change: 0 additions & 1 deletion packages/block-editor/src/store/defaults.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ export const PREFERENCES_DEFAULTS = {
* @property {boolean} __experimentalBlockDirectory Whether the user has enabled the Block Directory
* @property {boolean} __experimentalEnableFullSiteEditing Whether the user has enabled Full Site Editing
* @property {boolean} __experimentalEnableFullSiteEditingDemo Whether the user has enabled Full Site Editing Demo Templates
* @property {boolean} __mobileEnablePageTemplates Whether the user has enabled the Page Templates
*/
export const SETTINGS_DEFAULTS = {
alignWide: false,
Expand Down
1 change: 0 additions & 1 deletion packages/editor/src/components/provider/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@ class EditorProvider extends Component {
'__experimentalBlockDirectory',
'__experimentalEnableFullSiteEditing',
'__experimentalEnableFullSiteEditingDemo',
'__mobileEnablePageTemplates',
'__experimentalGlobalStylesUserEntityId',
'__experimentalGlobalStylesBase',
'gradients',
Expand Down

0 comments on commit f8421c4

Please sign in to comment.