Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
Already on GitHub? Sign in to your account
Add "Text Columns" block. #2117
Conversation
mtias
added
Blocks
New Block
labels
Aug 1, 2017
|
Do we really want this block? Will it be "deprecated" by the introduction of nested blocks in V2? |
It may or may not be deprecated, and your question is a good one! We've been over how difficult it is to get columns right, and also how already today third parties can build this. We may very well want an entirely different implementation than this one. But perhaps it's good to get this in now and test it. Perhaps this can help inform how a better column implementation can work down the road. In fact we might want to merge this block in now, only to take it back out later again, same as the Cover Text block. For that reason, I think it'd be good to test this. |
|
Yes, this adds value right now with the ability to do columns of text—which is a very frequent request—while allowing us to see what works or doesn't in column editing. |
@mtias ideally: First column, Second Column, Third column... |
|
I realize I made a mistake in not CC'ing @melchoyce and @westonruter on this, as it clearly touches customization. Sorry about that! Will do better next time. |
| +/** | ||
| + * WordPress dependencies | ||
| + */ | ||
| +import { __ } from 'i18n'; |
aduth
Aug 3, 2017
Member
Note with #2172, these need to be updated to prefix the dependencies with @wordpress/. You will need to perform a rebase against the latest version of master and apply your changes:
git fetch origin
git rebase origin/master
codecov
bot
commented
Aug 8, 2017
•
Codecov Report
@@ Coverage Diff @@
## master #2117 +/- ##
==========================================
+ Coverage 23.82% 23.91% +0.09%
==========================================
Files 147 149 +2
Lines 4563 4608 +45
Branches 774 782 +8
==========================================
+ Hits 1087 1102 +15
- Misses 2934 2960 +26
- Partials 542 546 +4
Continue to review full report at Codecov.
|
mtias
merged commit f9bcd4e
into
master
Aug 8, 2017
mtias
deleted the
add/text-columns-block branch
Aug 8, 2017
|
If this does make it into 1.0, do we have any plan for migrating it to a more robust set of columns in the future? This isn't necessarily how I imagined columns working once we start to work on creating layout tools. |
|
What did you have in mind for the more robust set? In terms of markup, I don't think we'll have any issue as it sort of already accommodates nesting. In any case, we'll have many ways to migrate to something else. |
|
For example, being able to add a heading and maybe an image to each column via the same block interface. This is especially important on smaller screens, so the columns tile correctly. |
aaronware
commented
Aug 11, 2017
•
|
This might be considered more of a "generic" column/layout controls feedback. But overall it misses things like @melchoyce mentioned, additionally I would think users should have the ability to define column widths, have the ability to reorder columns etc. This is one area we're always iterating on with Mesh Image Link if it doesn't load above Obviously Gutenberg tackles this differently than our little plugin but once you have columns the users expectations change slightly. We set the expectation of a grid system so we lock width to a default 12/col grid that can be filtered. So the snap you see in the .gif is related to the 12 column layout |
Sure, this depends mostly on how we want to handle the UI for nesting in general. In terms of the columns, it wouldn't change anything structurally, s there should be no problem transitioning. The current markup is a |
|
@westonruter let's keep this in mind ^ |


mtias commentedAug 1, 2017
This adds a new block for creating columns of text (serving as the basis for eventual generic columns).
@afercia wonder how you think we should announce navigating between columns.