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

Why have Freemform blocks as well as Text blocks? #1291

Closed
maddisondesigns opened this issue Jun 20, 2017 · 9 comments
Closed

Why have Freemform blocks as well as Text blocks? #1291

maddisondesigns opened this issue Jun 20, 2017 · 9 comments

Comments

@maddisondesigns
Copy link

What's the use of having both Freeform blocks and Text blocks? They both seem to basically do the same thing.

Freeform blocks allow you to:
Select Paragraph, Heading, Preformatted text
Left, Center, Right Align text
Create Blockquotes (without citations)
Create Bullet Lists
Create Numbered Lists
Bold, Italicise, Strikethrough text
Indent, Outdent text

Text blocks allow you to:
Select Paragraph, Heading, Preformatted text
Left, Center, Right Align text
Create Blockquotes (with citations)
Create Bullet Lists
Create Numbered Lists
Bold, Italicise, Strikethrough text
Insert links

The only difference between the two is that Text Blocks allow you to insert links and Freeform blocks allow you to Indent/Outdent. It's pointless having both, and also confusing. Why would I use one over the other? Why not get rid of the Freeform block and simply add the Indent/Outdent icons to text blocks.

Not only that, the workflow when switching between, Paragraph, Heading, Preformatted and Blockquotes for each one is different, which is also extremely confusing. If you're going to have both, then they should have the same workflow. There needs to be consistency with how you change the content. As an example, the Text block allows you to select Heading from the block toolbar, and you're then given another toolbar whereby you can select what type of heading (h1, h2 etc.). The Freeform block though, allows you to select Heading1, Heading2 etc., straight from the block toolbar. It's inconsistent, confusing and poor usability.

@jasmussen
Copy link
Contributor

jasmussen commented Jun 20, 2017

You raise some good points.

First off, the freeform block needs a rename (see #645), and it needs a different icon (see #1249).

The purpose of the freeform block is backwards compatibility. It shows up when you edit an old post that was written before using the new editor. Anything that the new editor can't recognize as "valid blocks". In a way, you can think of it as "the old editor as a block".

Incidentally, this discussion suggests that in addition to a better name and icon, we should de-emphasize the block in the inserter.

The text block is per-paragraph, by the way, whereas the freeform block has multiple.

@maddisondesigns
Copy link
Author

@jasmussen Thanks for clarifying that. Is there any reason though why you can't just add old content into a single text block? What does a Freeform block specifically do differently from a Text block?

Just on a side note as well, that Freeform Block is also displaying (in the Inserter) when you create a New Gutenberg post, not just when you edit an existing (non Gutenberg) Post.

@jasmussen
Copy link
Contributor

Is there any reason though why you can't just add old content into a single text block? What does a Freeform block specifically do differently from a Text block?

The text block, in its current implementation, is for text only, whereas the freeform block can handle any content that the old WordPress editor can handle, i.e. images, lists, quotes etc.

Just on a side note as well, that Freeform Block is also displaying (in the Inserter) when you create a New Gutenberg post, not just when you edit an existing (non Gutenberg) Post.

I think we'll want to still keep it in the inserter. But we might want to move it to another category than "Common".

@hedgefield
Copy link

I'd second the de-emphasis of this block. I assume we'd want everyone to use the block structure eventually? Maybe the placeholder text can say something like this is a classic/legacy way of writing content, do take a look at the new blocks available to you or we show a notification somewhere with a link to an explanation page/video about how and why blocks are better.

@swissspidy
Copy link
Member

The purpose of the freeform block is backwards compatibility. It shows up when you edit an old post that was written before using the new editor. Anything that the new editor can't recognize as "valid blocks". In a way, you can think of it as "the old editor as a block".

The text block, in its current implementation, is for text only, whereas the freeform block can handle any content that the old WordPress editor can handle, i.e. images, lists, quotes etc.

Is the freeform block considered to be feature complete? Because I just opened a draft post in Gutenberg. What I expected was to have all the paragraphs from the post converted to individual blocks and the oEmbed content (a tweet URL) to be a new block automatically as well. What I got instead is 1 freeform block with all the text in it, without any line breaks.

Is there already an issue tracking this?

@maddisondesigns
Copy link
Author

@jasmussen Sorry, I'm a little confused about that. You say the Text block is for text only, but it still gives you a toolbar with options for making text bold, italic, headings, blockquotes, etc.. By "Text Only", I would've presumed that you meant that it's only for basic paragraph text.

Also, I can easily copy 'n paste existing content into a Text block and it's able to handle it, just in the same way that the Freeform block handles it. So I guess, I'm still not seeing the difference between these two blocks as they seem to produce the exact same results.

This is a Text block with some content that I've pasted in - https://cl.ly/011C0a450G2P

@jasmussen
Copy link
Contributor

@swissspidy

Is the freeform block considered to be feature complete?

No, it's very much in flux right now.

Is there already an issue tracking this?

We have these open tickets:

#1038
#645

and a few PRs in progress. Feel free to open any we missed.

@maddisondesigns

I would've presumed that you meant that it's only for basic paragraph text.

I should've said that. Yes, that's what it's for.

Also, I can easily copy 'n paste existing content into a Text block and it's able to handle it, just in the same way that the Freeform block handles it. So I guess, I'm still not seeing the difference between these two blocks as they seem to produce the exact same results.

This should be considered a bug, for which I'll open a ticket. But a lot of the copy/pasting/splitting stuff is still being worked on.

@mtias
Copy link
Member

mtias commented Jun 22, 2017

@maddisondesigns most of the actions you mention "text" block handles are just a byproduct of being able to convert a text block to other blocks (like heading, quote, list) but it doesn't support any of those interactions itself.

Freeform has two aims:

  • Handle content we don't understand (fallback).
  • Provide a classic experience within the new block editor for those that prefer it.

Text is meant to only handle basic paragraph text and inline formatting, but also give you a way to convert to the others. I definitely see how the two can look very similar if you are looking at the toolbar options.

We do want to de-emphasize the Freeform block, as @hedgefield says, probably also moving it out of common blocks altogether, with "Text" being the first option.

@jasmussen
Copy link
Contributor

Closing this as answered for now. We can reopen if we need to!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants