Skip to content
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

Add verse block #1809

Merged
merged 4 commits into from
Jul 11, 2017
Merged

Add verse block #1809

merged 4 commits into from
Jul 11, 2017

Conversation

ellatrix
Copy link
Member

@ellatrix ellatrix commented Jul 8, 2017

Open to other names.

Closes #1729.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.02%) to 17.84% when pulling 2c3fcb2 on try/verse-block into 9dfd0e4 on master.

@mtias mtias added [Feature] Blocks Overall functionality of blocks New Block Suggestion for a new block labels Jul 8, 2017
@@ -13,7 +13,7 @@ import Editable from '../../editable';
const { children } = query;

registerBlockType( 'core/preformatted', {
title: __( 'Preformatted' ),
title: __( 'Preformatted Text' ),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should fix the display of two lines if we are changing this.

} }
focus={ focus }
onFocus={ setFocus }
placeholder={ __( 'Write…' ) }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we customize this one a bit: "Add verses or poetry...".

.wp-block-verse pre {
white-space: nowrap;
font-family: inherit;
font-size: inherit;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we change font-size a bit?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you have in mind?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure, but some way to differentiate besides margins could be good. Slightly smaller font could give more room for lines to not wrap.

@@ -58,6 +58,7 @@ registerBlockType( 'core/verse', {
onFocus={ setFocus }
placeholder={ __( 'Write…' ) }
className={ className }
formattingControls={ [ 'bold', 'italic', 'strikethrough' ] }
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we want to exclude link? Only limits possibilities?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was talking with @folletto about offering an author/source field instead. I think link detracts from the intention of the block a bit.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It may also work as an example of how to customize editable. In any case, we can revisit and iterate.

registerBlockType( 'core/verse', {
title: __( 'Verse' ),

icon: 'carrot',
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wait... A carrot? :)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a nice icon :) Maybe we can do a custom one (quill?)

@mtias
Copy link
Member

mtias commented Jul 11, 2017

Going to merge as it seems a good baseline. We can iterate.

@mtias mtias merged commit e74afaf into master Jul 11, 2017
@mtias mtias deleted the try/verse-block branch July 11, 2017 17:14
@ntwb
Copy link
Member

ntwb commented Jul 12, 2017

The term prose just sprang to mind? 🤔

@pollyplummer
Copy link

@ntwb Prose is the opposite of verse. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Blocks Overall functionality of blocks New Block Suggestion for a new block
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants