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

Consider renaming "Preformatted" to "Poetry" #1729

Closed
jasmussen opened this issue Jul 5, 2017 · 12 comments
Closed

Consider renaming "Preformatted" to "Poetry" #1729

jasmussen opened this issue Jul 5, 2017 · 12 comments
Assignees
Labels
[Type] Enhancement A suggestion for improvement. [Type] Question Questions about the design or development of the editor.
Milestone

Comments

@jasmussen
Copy link
Contributor

Preformatted is a great way to write haikus and poetry, because spaces and linebreaks are respected.

Should we rename the block to "Poetry", perhaps change the font to be the same as the base font? Or should "poetry" be a separate new block? Or should we add a "style" choice to the block that lets you write with the same font as the body text has, but with the benefits of preformatting? Should we add word-break?

Let's work this out together.

@jasmussen jasmussen added [Type] Enhancement A suggestion for improvement. [Type] Question Questions about the design or development of the editor. labels Jul 5, 2017
@jasmussen jasmussen added this to the Beta 0.8.0 milestone Jul 5, 2017
@ellatrix
Copy link
Member

ellatrix commented Jul 5, 2017

I think changing the font would be good so it's not just like code. Needs to be monospaced though.

Not sure if I like "Poetry" because it can be used for much more.

@jasmussen
Copy link
Contributor Author

An alternative is that this is a separate block.

But we have to answer the question whether we need both a Code block and a Preformatted block.

@ellatrix
Copy link
Member

ellatrix commented Jul 5, 2017

  • Currently line breaks are created on enter by default, and double enter creates a new paragraph, so this seems to be no longer an issue?
  • Spacing is preserved in the text block. If for some reason it's not, we should fix this.

So you can just write poetry already without doing anything special? :) That said, if you want to have it some special styling (like italic), it should probably be an enhanced text block?

@ellatrix
Copy link
Member

ellatrix commented Jul 5, 2017

I does seem that pre is well suited for this, and we could have a dedicated poetry block, but I would definitely keep the preformatted text block with the standard styling, as we do now in core, with unstyled, monospaced text.

@StaggerLeee
Copy link

Please not "Poetry". It would be strange for some websites for some companies. Keep it serious.

@jasmussen
Copy link
Contributor Author

I noticed that spaces are in fact saved, and respected, as Ella suggested. That's half of it.

Multiple linebreaks are not, though — a <p></p> without an &nbsp; inside collapse.

So I still see a usecase. The question becomes — is Preformatted useful to anyone, given we have a Code block also? If yes, then Poetry should be a separate block. If Preformatted is just confusing and few use it (as some initial confusion suggested), perhaps we rename it?

@mtias mtias modified the milestones: Beta 0.5.0, Beta 0.8.0 Jul 6, 2017
@ellatrix ellatrix self-assigned this Jul 7, 2017
@ellatrix
Copy link
Member

ellatrix commented Jul 7, 2017

Yeah I agree there's still a use case.

I would create a separate block called "Verse" or something like that, which could be used for poems, songs, and alternative forms such as a message where the spacing is important.

Here's a wonderful example which illustrates a few use cases:

http://www.gutenberg.org/files/11/11-h/11-h.htm

I wouldn't classify all of these as poems:

     ‘How doth the little crocodile
      Improve his shining tail,
     And pour the waters of the Nile
      On every golden scale!

     ‘How cheerfully he seems to grin,
      How neatly spread his claws,
     And welcome little fishes in
      With gently smiling jaws!’ 

A "tale":

         ‘Fury said to a
         mouse, That he
        met in the
       house,
     “Let us
      both go to
       law: I will
        prosecute
         you.—Come,
           I’ll take no
           denial; We
          must have a
        trial: For
      really this
     morning I’ve
    nothing
    to do.”
      Said the
      mouse to the
       cur, “Such
        a trial,
         dear Sir,
            With
          no jury
        or judge,
       would be
      wasting
      our
      breath.”
        “I’ll be
        judge, I’ll
         be jury,”
             Said
         cunning
          old Fury:
          “I’ll
          try the
            whole
            cause,
              and
           condemn
           you
          to
           death.”’ 

A song:

   ‘I speak severely to my boy,
    I beat him when he sneezes;
   For he can thoroughly enjoy
    The pepper when he pleases!’ 

         CHORUS.

       ‘Wow! wow! wow!’ 

Message:

     Alice’s Right Foot, Esq.
       Hearthrug,
         near The Fender,
           (with Alice’s love).

Decoration (use case for preformatted text, certainly not code):

  *    *    *    *    *    *    *

    *    *    *    *    *    *

  *    *    *    *    *    *    *

I guess you could argue that songs are poems, and ASCII art is code, but 🙃.

@ellatrix
Copy link
Member

ellatrix commented Jul 7, 2017

Icon idea: Quill.

@folletto
Copy link
Contributor

I agree on your assessment @iseulde in terms of "not everything is a poem"... I'd personally still like "Poetry" as I feel it would send a strong message even if it can be used for far more than just poetry. Mostly because intuitively I feel people would get "Poetry" but other labels more semantically accurate like "Preformatted" would be hard to understand.

And yes I agree it should be a separate block, as we might enrich it with specific properties like title and author, deal with cases like multiple spaces, which wouldn't make much sense for other uses. Also, would allow to better deal with fonts (instead of the monospaced one used for code).

I'd add that semantically might be even make more sense to tag Poetry differently from Preformatted: shouldn't Poetry use p blocks with white-space: pre;, instead of pre?

Icon idea: Quill.

Great icon idea. 💯

@ellatrix
Copy link
Member

I'd add that semantically might be even make more sense to tag Poetry differently from Preformatted: shouldn't Poetry use p blocks with white-space: pre;, instead of pre?

I'm not sure what's better for poetry than pre. I feel like p is unfit for this, because one verse is not one paragraph? The spec has a different take though:

https://www.w3.org/TR/html5/grouping-content.html#the-p-element
https://www.w3.org/TR/html5/grouping-content.html#the-pre-element

So they'd say that if whitespace other than line breaks is important in a poem, it should be pre, otherwise p, which I find a bit strange.

If you use p, should the whole poem be one p, or should it be one p per verse? If the latter, we may not need a poetry block (unless it has more controls), as you can write it correctly with just text blocks.

@ellatrix
Copy link
Member

@folletto
Copy link
Contributor

Getting really into this.

I'm with you there. The state of ePub is one of the reason that made me in 2010 to create Baker Framework. :)

So they'd say that if whitespace other than line breaks is important in a poem, it should be pre, otherwise p, which I find a bit strange.

Good point on how to split it. Makes me prefer using pre – I think the "need" of a poetry block is more semantic and signalling than the existence of an underlying structure. Also to make easy for people to use it: using p for poetry is hard, especially as one would need most of the times to write CSS to control it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Enhancement A suggestion for improvement. [Type] Question Questions about the design or development of the editor.
Projects
None yet
Development

No branches or pull requests

5 participants