-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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 "Text Columns" block. #2117
Conversation
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. |
4f8f091
to
41672c8
Compare
blocks/library/text-columns/index.js
Outdated
/** | ||
* WordPress dependencies | ||
*/ | ||
import { __ } from 'i18n'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
24c2804
to
df61941
Compare
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.
|
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. |
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 ^ |
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.