craftcms / cms

Build bespoke content experiences with Craft.
https://craftcms.com
Other
3.28k stars 635 forks source link

Limited formatting in tables #3386

Open angieherrera opened 6 years ago

angieherrera commented 6 years ago

I know it's been stated that if you need formatting in tables, it should be a Matrix field. Unfortunately Matrix isn't exactly compact when it comes to a lot of data. Take this table for example: https://d.pr/i/r4TH9y

That much data would take up loads of screen real estate and be a pain for a client to enter efficiently. So a Table field works best.

In the heading row (which I'd create with the Table Maker plugin), you'll see superscript and subscript text. That is the kind of formatting that would be great to have in tables. For now I'm having to write out the HTML code, which is fine for just headers, but if it were data, that wouldn't exactly be fun, easy or efficient for clients.

brandonkelly commented 6 years ago

You can currently pull this off with Verbb’s Super Table plugin. Thought it might be possible for us to get basic rich text formatting in regular Table fields if we can come up with a way to add type-specific settings to columns. (People are going to want some control over the formatting options.)

angieherrera commented 6 years ago

Yep, Super Table is an option, but only if the tables have predetermined headers. In my example, thankfully they did. But sometimes they don’t; that’s where the Table Maker plugin comes in handy.

On Oct 19, 2018, at 10:29 AM, Brandon Kelly notifications@github.com wrote:

You can currently pull this off with Verbb’s Super Table plugin. Thought it might be possible for us to get basic rich text formatting in regular Table fields if we can come up with a way to add type-specific settings to columns. (People are going to want some control over the formatting options.)

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/craftcms/cms/issues/3386#issuecomment-431438258, or mute the thread https://github.com/notifications/unsubscribe-auth/AAbAQl2lxH3Y6RtC7x4y60v9bfL_u-k7ks5umgwHgaJpZM4XvUB3.

davidhellmann commented 4 years ago

+1 for richText in tables :)

davidhellmann commented 1 year ago

@brandonkelly any plans to add something like that in the near future. the main thing we need is Links/Bold Text and stuff like that. Maybe Lists. Basic things. That would be great. With the new CK Editor now? 🤔

brandonkelly commented 1 year ago

For v5 maybe

kmgdevelopment commented 3 months ago

Hiya! Now that Super Table is being phased out for v5 this is even more needed. I have a lot of fields that I was using Super Table for just so I could have more robust field options, not because I needed Matrix-in-Matrix support.

brandonkelly commented 3 months ago

Table fields need a major refactoring to unlock more advanced column types (without going all-in on making rows elements, like Super Table did). Unfortunately it’s not going to be possible without some breaking changes, so it’s slated for v6 now.

Our answer to Super Table for v5 is to use Matrix fields in the element index view, combined with inline editing.

kmgdevelopment commented 3 months ago

Alright. I would request then a horizontal Matrix field layout option. Right now I'm going from this:

super-table-display-example

  To this:

Screenshot 2024-08-04 at 9 20 59 AM

  Also the ability to hide the entry type name, there's way too much unnecessary text now.

brandonkelly commented 3 months ago

@kmgdevelopment You can get it to be more like Super Table by doing the following:

  1. Switch the Matrix field’s “View Mode” setting to “As an element index”
  2. Enable the “Include Table View” setting
  3. Choose Quantity, Unit, Ingredient, and Preparation as the default table columns

Plain Text and Dropdown field types both support inline editing, so with those changes in place, authors will be able to press the “Edit” button below the table view, and edit nested entries in bulk.

kmgdevelopment commented 3 months ago

"Display as a table" doesn't seem to be working, I'm still getting card view by default.

brandonkelly commented 3 months ago

Right but it adds the option to switch to table view. (Unless you’re on mobile, which doesn’t allow table views.)

kmgdevelopment commented 3 months ago

OK I see. This is better but obviously still not ideal from a UX or DX perspective. So yeah a more robust flat table field would still be very useful. Thanks Brandon!