-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Add verse block #1809
Conversation
blocks/library/preformatted/index.js
Outdated
@@ -13,7 +13,7 @@ import Editable from '../../editable'; | |||
const { children } = query; | |||
|
|||
registerBlockType( 'core/preformatted', { | |||
title: __( 'Preformatted' ), | |||
title: __( 'Preformatted Text' ), |
There was a problem hiding this comment.
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…' ) } |
There was a problem hiding this comment.
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...".
blocks/library/verse/style.scss
Outdated
.wp-block-verse pre { | ||
white-space: nowrap; | ||
font-family: inherit; | ||
font-size: inherit; |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
blocks/library/verse/index.js
Outdated
@@ -58,6 +58,7 @@ registerBlockType( 'core/verse', { | |||
onFocus={ setFocus } | |||
placeholder={ __( 'Write…' ) } | |||
className={ className } | |||
formattingControls={ [ 'bold', 'italic', 'strikethrough' ] } |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wait... A carrot? :)
There was a problem hiding this comment.
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?)
Going to merge as it seems a good baseline. We can iterate. |
The term |
@ntwb Prose is the opposite of verse. :) |
Open to other names.
Closes #1729.