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 block: Freeform #972

Closed
jasmussen opened this issue Jun 1, 2017 · 11 comments
Closed

Add block: Freeform #972

jasmussen opened this issue Jun 1, 2017 · 11 comments
Assignees
Labels
[Feature] Blocks Overall functionality of blocks
Milestone

Comments

@jasmussen
Copy link
Contributor

There's been a lot of confusion around what the freeform block is, so here's a new ticket to discuss it from the top, with what we know today.

In short: The freeform block is the old editor, in block form. It's basically this:

screen shot 2017-06-01 at 12 31 05

but without the visual/text tabs, and with a few changes to the UI. Here's a mockup of how it could look in Gutenberg drapes:

freeform block

Items that previously went into the "kitchen sink" button, live in the ellipsis menu as a dropdown.

This freeform block supports most of what the old editor does:

  • Paragraph dropdown
  • bold
  • italic
  • lists
  • quote
  • aligns
  • links
  • strikethrough
  • indent/outdent

Undo/redo aren't part of this block, as they are global to Gutenberg. Separators and "Read More" are separate blocks.

The freeform block can be inserted manually. It will also be loaded as a container for everything when you open an old post in the new editor. When you scroll down, the toolbar sticks to the top same as every other Gutenberg block toolbar. If you prefer to write in this block, we should look at fixing #798.

CC: @annaephox @EphoxJames @iseulde

@jasmussen jasmussen added [Feature] Blocks Overall functionality of blocks Design labels Jun 1, 2017
@BoardJames
Copy link

BoardJames commented Jun 1, 2017

Do you have any mockups of what you want the ellipsis/kitchen-sink button to do?

@BoardJames
Copy link

Do you want the full screen mode?

@anna-harrison
Copy link

@jasmussen thanks for this mockup - looks really good! I think the solution with the ellipsis is really nice

Couple of questions

  • will this block allow insertion of things like images and tables?
  • if yes, will those toolbars float or replace the block-level toolbar on selection?

@jasmussen
Copy link
Contributor Author

jasmussen commented Jun 2, 2017

Do you have any mockups of what you want the ellipsis/kitchen-sink button to do?

Here's one I just put together. The popout stays open until you manually close it:

freeform block

Do you want the full screen mode?

No, I think being able to dismiss the post settings sidebar and collapse the left navigation sidebar can count as immersive/fullscreen.

will this block allow insertion of things like images and tables?
if yes, will those toolbars float or replace the block-level toolbar on selection?

Really really solid questions.

Insertion maybe not (more on that in a bit), but it should support absolutely support rendering any content that you've inserted in an old post. It seems like we might be able to leverage any floating/inline toolbars that TinyMCE can provide here. I know that's a bit of a non answer but that is intentional so as to leave it a little open ended as to what you might recommend. Thinking of it as "the old editor in block form", the behavior that currently is in WordPress for images and tables and shortcodes — it'd be fine to port that 1:1. CC: @iseulde

So to be clear: the block docked toolbars as shown in these mockups don't change. But it's okay to have popup toolbars for some blocks inside, like the old gallery shortcode, or an image.

That leads me to: should you be able to insert an image in this block?

The answer is probably yes, but I don't yet have a great UI to do this. Ideally we'd be able to leverage the very same inserter we use for the rest of the editor, only when the text caret is inside the freeform block, that's where an image or gallery gets inserted. But obviously you can't insert every block we have here, so the UI is not solid. Perhaps the inserter is limited to a few blocks, in that case? Like Image, Gallery, Separator, Read More? This is something we would probably want to finetune a bit as we go.

@jasmussen
Copy link
Contributor Author

To be clear, it's probably best to keep the first version of the freeform block as minimal as possible and merge it in. Then we can add more buttons and features in subsequent pull requests.

The kitchen sink should probably not be in V1, for example.

@BoardJames BoardJames self-assigned this Jun 2, 2017
@BoardJames
Copy link

I've merged a version 1.

It is currently rather basic and is missing the format dropdown, the link button and the kitchen-sink.

@youknowriad
Copy link
Contributor

@EphoxJames See here for the format toolbar #923 (comment)

@jasmussen jasmussen added this to the Beta milestone Jun 5, 2017
@BoardJames
Copy link

@youknowriad for the freeform block I've decided to link the buttons more directly to TinyMCE so I can't use editables' format toolbar (and the mockups require something different anyway). On the upside it does make it very easy to add new buttons.

@BoardJames
Copy link

I have submitted a pull request to add the format selector (#1030):
freeform-block-format-selector

@mtias
Copy link
Member

mtias commented Jun 6, 2017

Can we close as done and open specific issues for next tasks?

@jasmussen
Copy link
Contributor Author

Closing this as fixed (🎉) in favor of #1037 and #1038.

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
Projects
None yet
Development

No branches or pull requests

5 participants