Skip to content

Commit

Permalink
Merge pull request #2919 from ampproject/fix/remove-deprecated-param
Browse files Browse the repository at this point in the history
Remove deprecated formattingControls.
  • Loading branch information
miina authored Aug 1, 2019
2 parents 1a3646e + c6be107 commit 5b5440b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 13 deletions.
5 changes: 5 additions & 0 deletions assets/src/stories-editor/blocks/amp-story-cta/edit.css
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@
max-width: 100%;
}

.wp-block-amp-amp-story-cta .block-editor-rich-text__editable code {
background: inherit;
color: inherit;
}

.wp-block-amp-amp-story-cta .block-editor-rich-text__editable[data-is-placeholder-visible="true"] {
height: auto;
}
Expand Down
1 change: 0 additions & 1 deletion assets/src/stories-editor/blocks/amp-story-cta/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ class CallToActionEdit extends Component {
placeholder={ __( 'Add text…', 'amp' ) }
value={ text }
onChange={ ( value ) => setAttributes( { text: value } ) }
formattingControls={ [ 'bold', 'italic', 'strikethrough' ] }
className={ classnames(
'amp-block-story-cta__link', {
'has-background': backgroundColor.color,
Expand Down
12 changes: 0 additions & 12 deletions assets/src/stories-editor/helpers/test/addAMPExtraProps.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,6 @@ describe( 'addAMPExtraProps', () => {
expect( props ).toStrictEqual( {} );
} );

it( 'generates a unique ID', () => {
const props = addAMPExtraProps( {}, { name: 'amp/amp-story-text' }, {} );

expect( props ).toHaveProperty( 'id' );
} );

it( 'uses the existing anchor attribute as the ID', () => {
const props = addAMPExtraProps( {}, { name: 'amp/amp-story-text' }, { anchor: 'foo' } );

expect( props ).toStrictEqual( { id: 'foo' } );
} );

it( 'adds a font family attribute', () => {
const props = addAMPExtraProps( {}, { name: 'amp/amp-story-text' }, { ampFontFamily: 'Roboto' } );

Expand Down

0 comments on commit 5b5440b

Please sign in to comment.