Combine attributes_table and table_for #7865
Replies: 10 comments
-
Looking over the code... how are we going to deal with sortable tables? Are we just going to disallow that feature for transposed tables? |
Beta Was this translation helpful? Give feedback.
-
This works with single records + columns, right? I ask because that case wasn't mentioned in any of the examples above. |
Beta Was this translation helpful? Give feedback.
-
Yeah, of course. Hence the sentence:
I'll go ahead and update the example code, though. |
Beta Was this translation helpful? Give feedback.
-
Ahh, I just didn't interpret that right. Might be clearer to say (if this is going into the docs): "Both table types would A) accept either a single record or a collection, and B) have plural shortcuts to easily create multiple columns/rows with a single line of Ruby." I don't mean to be nitpicky, but I had trouble parsing the full meaning of that sentence. What are your feelings on the transposed sortability? I'm not really sure how I feel. It almost feels to me like it would be cool to be able to manually reorder them, like drag-and-drop, but automatic sorting... idunno. Can these tables be paginated? Is it replacing |
Beta Was this translation helpful? Give feedback.
-
BTW single-record support for |
Beta Was this translation helpful? Give feedback.
-
Right now the code's confusing because I'm inclined to say you'd have The added benefit to |
Beta Was this translation helpful? Give feedback.
-
I like that idea. I really don't think I see much value in sortable transposed tables. I figure you'll only have a few records displayed that way in each table, since larger datasets tend to be better represented in standard table form. And that format of table would tend more toward controlling the order of records in your own way, rather than having them be sortable on different attributes. |
Beta Was this translation helpful? Give feedback.
-
It's implied in the ticket, but |
Beta Was this translation helpful? Give feedback.
-
@seanlinsley Do you know the status of this? |
Beta Was this translation helpful? Give feedback.
-
This will not be done as |
Beta Was this translation helpful? Give feedback.
-
As of #2544 you can now have an attributes table with multiple entries, like this:
But we want to move it further; combining
attributes_table_for
andtable_for
into the same simpletable_for
method. In #2544 we discussed multiple approaches at a DSL, but eventually settled on using therow
&column
methods to distinguish how the table would be rendered. So:As well, both table types would A) accept a single record and B) have a plural shortcuts to easily create multiple columns/rows with a single line of Ruby.
Beta Was this translation helpful? Give feedback.
All reactions