Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,21 @@
max-width: 960px;
margin-left: auto;
margin-right: auto;
padding-top: $grid-unit-30;

h1 {
color: $white;
}

// The title sits outside the canvas iframe, so it doesn't get the editor's rich text placeholder styles.
[data-rich-text-placeholder] {
pointer-events: none;
}

[data-rich-text-placeholder]::after {
content: attr(data-rich-text-placeholder);
opacity: 0.62;
}
}

.pattern-visual-editor > [name="editor-canvas"] {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import createSelector from 'rememo';
*/
import { store as coreStore } from '@wordpress/core-data';
import { createRegistrySelector } from '@wordpress/data';
import { __ } from '@wordpress/i18n';
import {
/* eslint-disable-next-line @wordpress/no-unsafe-wp-apis */
__unstableSerializeAndClean,
Expand Down Expand Up @@ -66,6 +67,7 @@ export const getSettings = createSelector(
( state, setIsInserterOpen ) => {
const settings = {
...state.settings,
titlePlaceholder: __( 'Enter your pattern name', 'wporg-patterns' ),
fullscreenMode: true,
outlineMode: true,
focusMode: isFeatureActive( state, 'focusMode' ),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ describe( 'selectors', () => {
const state = { settings: {}, preferences: {} };
const setInserterOpened = () => {};
expect( getSettings( state, setInserterOpened ) ).toEqual( {
titlePlaceholder: 'Enter your pattern name',
outlineMode: true,
focusMode: false,
fullscreenMode: true,
Expand All @@ -78,6 +79,7 @@ describe( 'selectors', () => {
const setInserterOpened = () => {};
expect( getSettings( state, setInserterOpened ) ).toEqual( {
key: 'value',
titlePlaceholder: 'Enter your pattern name',
outlineMode: true,
focusMode: true,
fullscreenMode: true,
Expand Down
Loading