You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would guess tables is a big reason why TinyMCE Advanced is popular.
Whether it is supported in core, or can be added back via a plugin the way TinyMCE Advanced does right now we definitely need to make it possible. There will be screams otherwise :)
For editing tables, extra buttons on the contextual toolbar are much better than a menu. Play with tables on the tinymce.com front page demo; common operations are available immediately (the menu is still available for less frequently used operations).
Wow, the Table block is no joke! This is complex. I've created some UI thoughts around these to be inline with our current direction. The UI design might be off, but I'm hoping the interaction aspects are close.
Table block - Selected
This follows similarly to @iseulde's current prototype. Basically when selected, only high level table layout is shown.
Table block - Dropdown to change block
Would the table be able to be converted into some other block? If so, I'm keeping this inline with our current block switcher.
Table block - Edit Table
I'm surfacing the ability to add/delete rows/columns. It seems the common practice is to hide these abilities to a 'right-click' event, so I'm not entirely sure which direction we want to go. One problem with this version below is that, while it is surfaced visually, it also adds another dropdown to the menu.
Table block - Edit Text
We have a way to edit the table, but we need to edit the text within the table cells. So when the user has highlighted text, this should remove the table editing menu items in place for text editing menu items. Does this sound right?
There's even more UI work that needs to be done like "border styling" for tables, etc. I'm sharing some early thoughts to get conversation going on how we want to approach this.
I love the ability to prompt the user to select the rows and columns right away like the current textbox.io and Google docs does. I'm trying to understand how that would fit in with the current "Block Creator" we've got going.
If you're going down the menu route I recommend the structure we use in textbox.io. It groups functions by target cell(s) instead of by insert/delete. We have found this to be a much more natural structure, and as an added bonus you don't need to repeat the word "row" or "column" in the submenu text.
Solid work @mapk! Thanks for tackling this. Overall it seems like you've been stellar in following the UI patterns we've laid out so far, that's heartening to see.
Some quick thoughts:
Table block - Dropdown to change block
They key for the switcher is that conversions have to be non-destructive, and allow plugins to register themselves as nondestructive conversions. In this case I can't think of any conversion that might make sense.
Incidentally that highlights a good question: should we simply not show the switcher, when it's not useful? Or should we show it as disabled? I'm leaning towards the former, even though in the audio block, I mocked up the latter:
I think you are on to something, though, and combined with advice from @TheSpyder and inspiration from Textbox.io, I think we can find something that would work well in our universe where toolbars are highly contextual, which you so perfectly captured in the "Edit Text" portion.
Think of toolbars like this:
[Switcher] [Block level] [Inline Level] [More]
The above would be contextual to what you have selected, as you've captured already.
I'm wondering what the simplest possible implementation might be. Could it be enough that you simply type in, numbers-wise, how many columns and rows you have? I.e. there could be a "Configure Table" button that opens a modal to let you type in numbers.
Alternately it sort of feels like we have to go ultra contextual here. When a single cell is selected, you have insert row, insert column, delete row, delete column.
When you want to merge two cells, you have to drag across them to select, to surface a "merge cells" button.
The above may be overthinking it, though. I believe TinyMCE has a table block with some of these features already. @annaephox can you provide some screenshots or context? Perhaps we can simply use the TinyMCE block as-is, with just a little bit of UI refresh?
I made a few visual changes based on some of the above feedback.
Selected Table Block
I dropped the block-switcher and changed the 'edit table dropdown' icon.
Edit Table
I'm still keeping all functions in one dropdown. While it does add more text options here, I feel more comfortable showing it all together with dividers rather than extending further sub-menus. I'm open to discussion here though! :)
Merge Cells
Surfacing the 'merge cells' option in the dropdown when it's relevant.
Edit Text
Swapping out inline menu with relevant edit options.
The dropdown is growing on me. Though perhaps we can use a table icon instead of the cog. We are using Dashicons for the actual plugin, so you can use perhaps this icon from that set. The mockups/sketch file still use Gridicons, no reason to swap those out, we'll need them for Calypso down the road regardless.
The final question remains: if we are to leverage TinyMCE here, can we do the above, @annaephox?
Yeah, the dropdown worked better for me than these:
I didn't quite understand what those ^ arrows did until I clicked them, then it added a column or row, but I didn't know how to remove it. So I don't think having individual buttons/icons for these actions works well.
The dropdown provides space for clear text instead of vague icons. My thoughts around the dropdown were thus:
The dropdown should be accessed from a contextual menu item as I have it in the mockups instead of a right-click action. Maybe it could also appear on right-click, but that shouldn't be the only way.
I like having all relevant options visible in one list. It's nice to get an overview of what my options are instead of hovering over items to get a third-level sub-nav to show me my options.
How would you envisage that working? Would you select some cells then dragging them somewhere would be like copying and pasting the content? Would you only allow dragging one cell/row/column at a time and then swap it with the one at the drop location?
Drag & Drop rows and columns. Cell separate cannot be dragged, it would not work. My mistake, wrong explained.
See how Tablepress plugin works, or Table addon for ACF field.
One of the key values for Gutenberg is to ensure that every important action that can be taken in the editor needs to be available as a clickable (or tab then space) action. Drag and drop is totally cool to explore once those basic actions are in place. For example we have moving blocks up and down using the arrows, so it's fine if someone wants to explore adding drag and drop to blocks on top of that.
Activity
jasmussen commentedon Feb 28, 2017
A table block is a good idea. See also #16
androb commentedon Mar 1, 2017
I would guess tables is a big reason why TinyMCE Advanced is popular.
Whether it is supported in core, or can be added back via a plugin the way TinyMCE Advanced does right now we definitely need to make it possible. There will be screams otherwise :)
TheSpyder commentedon Mar 7, 2017
For editing tables, extra buttons on the contextual toolbar are much better than a menu. Play with tables on the tinymce.com front page demo; common operations are available immediately (the menu is still available for less frequently used operations).

mapk commentedon Apr 10, 2017
Wow, the Table block is no joke! This is complex. I've created some UI thoughts around these to be inline with our current direction. The UI design might be off, but I'm hoping the interaction aspects are close.
Table block - Selected

This follows similarly to @iseulde's current prototype. Basically when selected, only high level table layout is shown.
Table block - Dropdown to change block

Would the table be able to be converted into some other block? If so, I'm keeping this inline with our current block switcher.
Table block - Edit Table

I'm surfacing the ability to add/delete rows/columns. It seems the common practice is to hide these abilities to a 'right-click' event, so I'm not entirely sure which direction we want to go. One problem with this version below is that, while it is surfaced visually, it also adds another dropdown to the menu.
Table block - Edit Text

We have a way to edit the table, but we need to edit the text within the table cells. So when the user has highlighted text, this should remove the table editing menu items in place for text editing menu items. Does this sound right?
There's even more UI work that needs to be done like "border styling" for tables, etc. I'm sharing some early thoughts to get conversation going on how we want to approach this.
I love the ability to prompt the user to select the rows and columns right away like the current textbox.io and Google docs does. I'm trying to understand how that would fit in with the current "Block Creator" we've got going.

@annaephox Any thoughts around this?
TheSpyder commentedon Apr 11, 2017
If you're going down the menu route I recommend the structure we use in textbox.io. It groups functions by target cell(s) instead of by insert/delete. We have found this to be a much more natural structure, and as an added bonus you don't need to repeat the word "row" or "column" in the submenu text.
These are screenshots of the context menu.



jasmussen commentedon Apr 11, 2017
Solid work @mapk! Thanks for tackling this. Overall it seems like you've been stellar in following the UI patterns we've laid out so far, that's heartening to see.
Some quick thoughts:
They key for the switcher is that conversions have to be non-destructive, and allow plugins to register themselves as nondestructive conversions. In this case I can't think of any conversion that might make sense.
Incidentally that highlights a good question: should we simply not show the switcher, when it's not useful? Or should we show it as disabled? I'm leaning towards the former, even though in the audio block, I mocked up the latter:
For now — and this will require more exploration — the "Edit" button is intended to open either a modal, or an "inspector" in the sidebar. See mockups here: https://wpcoredesign.mystagingwebsite.com/gutenberg/#admin
This would prevent it from being a dropdown.
I think you are on to something, though, and combined with advice from @TheSpyder and inspiration from Textbox.io, I think we can find something that would work well in our universe where toolbars are highly contextual, which you so perfectly captured in the "Edit Text" portion.
Think of toolbars like this:
The above would be contextual to what you have selected, as you've captured already.
I'm wondering what the simplest possible implementation might be. Could it be enough that you simply type in, numbers-wise, how many columns and rows you have? I.e. there could be a "Configure Table" button that opens a modal to let you type in numbers.
Alternately it sort of feels like we have to go ultra contextual here. When a single cell is selected, you have insert row, insert column, delete row, delete column.
When you want to merge two cells, you have to drag across them to select, to surface a "merge cells" button.
The above may be overthinking it, though. I believe TinyMCE has a table block with some of these features already. @annaephox can you provide some screenshots or context? Perhaps we can simply use the TinyMCE block as-is, with just a little bit of UI refresh?
jasmussen commentedon Apr 11, 2017
Let's omit the caption option, btw, and keep this primarily for media items. If you want a caption you should be able to center text below it.
mapk commentedon Apr 18, 2017
I made a few visual changes based on some of the above feedback.
Selected Table Block

I dropped the block-switcher and changed the 'edit table dropdown' icon.
Edit Table

I'm still keeping all functions in one dropdown. While it does add more text options here, I feel more comfortable showing it all together with dividers rather than extending further sub-menus. I'm open to discussion here though! :)
Merge Cells

Surfacing the 'merge cells' option in the dropdown when it's relevant.
Edit Text

Swapping out inline menu with relevant edit options.
jasmussen commentedon Apr 18, 2017
💖 Really love this.
The dropdown is growing on me. Though perhaps we can use a table icon instead of the cog. We are using Dashicons for the actual plugin, so you can use perhaps this icon from that set. The mockups/sketch file still use Gridicons, no reason to swap those out, we'll need them for Calypso down the road regardless.
The final question remains: if we are to leverage TinyMCE here, can we do the above, @annaephox?
mapk commentedon Apr 18, 2017
Yeah, the dropdown worked better for me than these:
I didn't quite understand what those ^ arrows did until I clicked them, then it added a column or row, but I didn't know how to remove it. So I don't think having individual buttons/icons for these actions works well.
The dropdown provides space for clear text instead of vague icons. My thoughts around the dropdown were thus:
The dropdown should be accessed from a contextual menu item as I have it in the mockups instead of a right-click action. Maybe it could also appear on right-click, but that shouldn't be the only way.
I like having all relevant options visible in one list. It's nice to get an overview of what my options are instead of hovering over items to get a third-level sub-nav to show me my options.
I'd love to hear other's thoughts!
30 remaining items
jasmussen commentedon Jun 6, 2017
The pull request (#850) looks like it is on a great path. To limit discussion, and simplify the beta milestone (https://github.com/WordPress/gutenberg/milestone/7), I'm closing this one as fixed! 🎉
StaggerLeee commentedon Jun 21, 2017
Best to make all cells draggable. If it is not much coding and would slow down whole project.
BoardJames commentedon Jun 25, 2017
How would you envisage that working? Would you select some cells then dragging them somewhere would be like copying and pasting the content? Would you only allow dragging one cell/row/column at a time and then swap it with the one at the drop location?
StaggerLeee commentedon Jun 26, 2017
Drag & Drop rows and columns. Cell separate cannot be dragged, it would not work. My mistake, wrong explained.
See how Tablepress plugin works, or Table addon for ACF field.
jasmussen commentedon Jun 26, 2017
One of the key values for Gutenberg is to ensure that every important action that can be taken in the editor needs to be available as a clickable (or tab then space) action. Drag and drop is totally cool to explore once those basic actions are in place. For example we have moving blocks up and down using the arrows, so it's fine if someone wants to explore adding drag and drop to blocks on top of that.
In this case, I think the dropdown interface used for tables is pretty good.
StaggerLeee commentedon Jun 26, 2017
Do anything but not like old TinyMce table plugin. Anything is welcome. This old one was simply not usable. Not even for experienced editors.
refactor: Switch to shared `recommended` config from `eslint-plugin-w…
Add new package `@wordpress/stylelint config` (#22777)