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

Option for converting any block to "Classic" block is necessary #5881

Closed
burnuser opened this issue Mar 29, 2018 · 4 comments
Closed

Option for converting any block to "Classic" block is necessary #5881

burnuser opened this issue Mar 29, 2018 · 4 comments

Comments

@burnuser
Copy link

Issue Overview

As the "Classic" block is the only one in Gutenberg with full formatting options (including extensions from "TinyMCE Advanced" plugin), a possibility to convert any other block to Classic is really necessary.
Simply start writing with (paragraph) blocks works, ... but only if you do not need real inline formatting.
If you find out afterwards, that you need extended formatting within a existing paragraph, list, heading, images, etc. ... you have a big problem.
And I think using only Classic block for the only reason to be able to format things afterwards if necessary, is not the intention of Gutenbergs block concept.

@ZebulanStanphill
Copy link
Member

ZebulanStanphill commented Mar 29, 2018

Disclaimer: the following is my opinion alone. I am not a WP/Gutenberg developer.

I would guess that the developers do not really want to encourage use of the Classic block by the everyday user. I do not think it is intended to be used as a common block, but rather a special advanced one used for backwards compatibility and edge cases.

It should be noted that technically, you can add almost any sort of inline formatting to paragraphs, lists, headings, etc. using <span> tags added by editing the blocks as HTML. Semantic inline tags like <b>, <code>, <i>, <insert>, <kbd>, <mark>, <q>, <s>, <samp>, <sub>, <sup>, <time>, <u>, etc. are all allowed as well. So technical users are not really limited in what they can do with formatting in the standard Paragraph, Heading, and List blocks. (Well, except when there is a bug like #5876.)

The Paragraph, Heading, and List blocks could all have buttons in their toolbars for things like coloring text or increasing its size inline, but I suspect that the developers do not want to add that to the toolbars of those blocks because:

  • It encourages poor formatting decisions, and (I think) the developers want to try and encourage better formatting with Gutenberg. There are very few cases where changing the size and color of just some of the words/sentences in a paragraph is really necessary, as the use of <strong> and <em> tags are usually enough. Additionally, if you want to draw attention to something, you can already change the size and color of a whole paragraph (and even its background color). If you think you need these features inline (and think using strong or em tags is not enough), then it is likely that your paragraphs are too long and unfocused and need to be split up.
  • It takes up space on the block toolbars, which results in making the UI look more cluttered and draws focus away from the more commonly-used options. The cases in which you would use advanced inline formatting like colored sentences/words and increased font size of certain sentences are comparatively much smaller than the use cases for <strong> and <em> tags.

If you really want to use advanced inline formatting, then you can just use the "Edit as HTML" option to add <span> tags or whatever else you want to use. You could also just insert a Classic block and copy your text into it. Someone could even make a plugin to add color, font size, and whatever other options to the toolbars of the Paragraph, Heading, List, and other textual content blocks, and a plugin could exist to add the option to transform various blocks into a Classic block.

But if one of the goals of Gutenberg is to try and encourage better formatting (and I do not really know for sure if it is), then having a "Transform to Classic" option in core WordPress seems like a bad idea. Right now, you can have inline formatting, but it exists as a sort of advanced feature intended for use by people who know how to edit HTML, so as to not clutter the UI or encourage bad formatting. Basically, it allows you to do whatever you want the formatting, but it does not encourage the average user to use the more advanced formatting tools.

But that is just my opinion. I am not a developer and I do not know what their opinion is. I just thought I would share what I think about it.

Additionally, the ability to insert inline images into Paragraph (and presumably Heading and List blocks) is being worked on in #5794.

I also noticed that there is an open issue about adding superscript and subscript buttons to the toolbars: #3507. I think that those 2 options are probably the most useful things that are not already in the toolbars, and also the most likely to be added. I also can not see how those options could be abused (unlike color and font size options), so I think the only concern about adding them would be increased toolbar size.

@burnuser
Copy link
Author

Dear SuperGeniusZeb:

*) Formatting with HTML: Gutenberg is developed as WYSIWYG Editor for Non-Developers. A recommendation to use HTML instead the visual editor for regular formatting tasks, ... really?

*) "the developers want to try and encourage better formatting with Gutenberg": If you feel the personal need to be disciplined, you should try a professional Domina. But that's not the task of software developers.

*) Do we need extended inline formatting at all? - No, not for writing a simple Facebook post on a mobile phone. (And it seems obvious that that is all that the developers have in mind with Gutenberg and what constitutes their experience with web design.) But we talk about WordPress and real web design, which is used in millions of existing websites.
So let us look at the declared needs of WordPress users: TinyMCE Advanced Plugin (https://wordpress.org/plugins/tinymce-advanced/) has more than 2 Million Installations.
Nothing more to say.

@ZebulanStanphill
Copy link
Member

Disclaimer again: This is my opinion, not any of the WordPress/Gutenberg developers.

  • Coloring a single sentence or increasing its size in a paragraph is not what I would consider a regular formatting task. How many times have you ever needed to do that? I often color or increase the size of text, but I do it to a whole paragraph or heading. And the Gutenberg editor already lets you do that by default.

  • I do not feel the need to be disciplined. I am fully confident in my ability to use formatting properly. I'm the kind of person who manually inserts <code> tags every time I type the name of a file and adds <time> tags to every date I mention in a post or page. But that does not mean I want every possible formatting feature to be in core by default. I feel like that belongs in a plugin. I think it is the task of software developers to promote good design, while still allowing the freedom to do what you what. I think WordPress should have a core experience that has the essentials (and coloring/increasing the height of something inline is rarely ever needed and is usually a bad idea) and promotes good design, while still allowing you to extend it and do whatever you want.

  • I disagree. And here is why:

My father builds websites for businesses using WordPress, and I have helped him with many of them. I also have experience from building my own websites as well. And for pretty much all of the recent ones we used a page builder (Divi) and background images and colored text and different-sized text and colored sections and all sorts of formatting options. Divi is loaded to the brim with formatting options.

And personally, from my experience (yours may be different, I do not know), I think I can safely conclude that you almost never need the ability to use those advanced features inline... definitely not enough to warrant them being added to the toolbar as one of the primary options included by default. (Note that by "inline" I mean in the sense of the Gutenberg editor where every paragraph and heading is a separate block... not inline as it is with the Classic Editor where everything is in a single container and therefore coloring a paragraph requires inline formatting.) If you want to color something, you color the whole heading, paragraph, etc. or you color the containing section, row, column, <div>, etc. Gutenberg already allows this via the block inspector/sidebar settings, and as it turns out, a section block is being worked on in #4900, which should end up being really useful. If you want to draw additional emphasis to a particular word, you make it bold or italic.

Claiming that the current formatting options is only enough for a Facebook post seems odd to me. Facebook doesn't let you color the text at all, paragraph or sentence. Gutenberg lets you color entire paragraphs or headings or lists, and I think this is plenty control for the core feature set. If there was inline color/size buttons, I feel like they would go unused by almost everyone, or be used when they did not need to be used, like for coloring a whole paragraph when the option to do that already exists in the sidebar options. And I am not referring just to color and size options. Things like text shadow, for example, when they are used, are almost always used on a whole heading or paragraph... not just a single sentence or word out of them. Maybe you run into a situation where want to add a shadow to just one word, and you can definitely pull that off and make it look artistic. But that is hardly a common occurrence, and if it is not a common occurrence, it does not belong in core, in my opinion.

Additionally, right now the color and size options in the Classic Editor are more needed because of the lack of blocks to separate stuff. You would more often use the color option in the Classic Editor, because there is no other way to color a paragraph. But Gutenberg lets you color every paragraph, heading, and list a different color using the sidebar options. Likewise, the font sizes option in TinyMCE Advanced are needed because there is no other non-HTML way to increase the size of a heading or a paragraph. But again, Gutenberg has the ability to do this from the sidebar options. In a way, the block system of Gutenberg has greatly diminished the need for inline formatting buttons. So pointing out TinyMCE is not entirely a fair comparison in my opinion, because some of its options are needed more right now due to the nature of the monolithic structure of the current editor in WordPress 4.9, where the ONLY ways to modify something are inline toolbar buttons and HTML.

Am I saying that no one will ever need to use advanced inline formatting while using Gutenberg? No, there will always be cases where it is useful. But those cases are few and far between, and I think it should be plugins that handle those cases, not core. I feel like adding color and size options to the inline toolbars would be bloat. The purpose of WordPress (as I see it) is to provide a good core experience that can be extended if needed... not to be a kitchen sink of every formatting option possible.

If inline color and size options are really used a lot, then they should be added to the toolbar. But with the ability to color or change the size of a paragraph/heading/etc. I really doubt they will be needed that much with the ability to change the color/size of a whole block existing.

Side note that is only tangentially related but I thought I would include it anyway: Some might think that if WordPress is supposed to have a base core that things extend from, then why does Gutenberg exist? Isn't page building the job of plugins? Well, I think Gutenberg exists because WordPress has become fragmented in the way stuff is built (widgets, shortcodes, metaboxes, the content editor, PHP template files), and many people are now using various page builders which all use different APIs and are incompatible with each other (Beaver Builder, Divi, Elementor, Visual Composer, etc.), and those add even more ways to the list of different ways to build stuff in WordPress. The Classic Editor is hardly being used because it is no longer sufficient for what WordPress is being used for. The Classic Editor was designed only for blog posts, but now WordPress is used for all sorts of websites, and that editor is no longer sufficient. Page building and customization of page layouts is now common occurrence. There needed to be a change in core WordPress, and Gutenberg could be that needed change. It has the potential to unite the ways of building stuff: blocks replacing widgets, shortcodes, and most metaboxes; block templates + template locking + shared blocks replacing a lot of the need for using PHP template files; blocks outside of post_content replacing even more of the need for PHP template files and widgets (see #1684 and #3330); and the sidebar API replacing the remaining meta boxes. It could also provide a common API for page builders to use, and they could become merely alternate UIs for Gutenberg, with their custom modules/widgets/etc. becoming blocks that could be used by any page builder.

Again, I do not claim that this is what the WordPress/Gutenberg developers think. This is just what I think and what I would guess that they think. I think WordPress is supposed to provide a good core experience with essential features and the ability to be extended, but I do not know if that opinion is shared by the developers. I assume it is, based on my observation of this GitHub and how they have been designing Gutenberg, but I can not claim it as a known fact.

@karmatosed
Copy link
Member

karmatosed commented Apr 1, 2018

It's interesting what each of us want from a block. In this case, I think this is where plugins will come in just like every other area of WordPress once Gutenberg is in core. We have this for every area, we add plugins to make the site 'just how we want'. All this said, for now going to close this as adding the ability to convert every block to classic block already exists in sense you can edit the code, this gives you the advanced options you desire.

It's worth noting that any closed issue can be reopened if needed, however this seems right in this case.

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

4 participants