Looks like the native rels field hasn’t been tested with grid.
The following doesn’t work:
Additionally there is some UI issues:
Cheers Leevi
Thanks, Leevi. I’m unable to reproduce your problems with Relationships but I’ll forward them on to Pascal for ideas.
I talked with James about the UI issues:
Thanks for the feedback, let us know if you run into anything else. Again, I’ll let Pascal know about your Relationships issues.
- We’d rather not set anything horizontally in pixels. To plan for the future, it needs to be responsive and pixels don’t flex. Percentages for horizontal settings are required for flexibility, as they are relative to the viewport. Pixels are absolute, and the viewport will not affect their size horizontally.
I still don’t think that is a good approach. Browsers are pretty smart when it comes to deciding widths. Combined with min-width (or px width) on content inside the table there will always be a reasonable result.
Attached was my first test with grid. The checkbox cell is way to big. I would be hesitant to put a width on some of those cells because I don’t want them to be too small at smaller resolutions.
Given my screenshot example above auto column widths would have meant that the rel field would have been much larger and actually usable. I don’t think I can achieve this by setting the % widths of all the cells. As I said before this would cause the checkbox cells to be too small if the browser window was collapsed.
I was talking more about the decision to not allow pixel widths since that was the part you quoted. In regards to the column widths, I just set up the same example you did, removed the widths to test to see what would happen, and there was no change (see screenshot). If the browser isn’t even going to do what’s expected, we might as well be explicit about the widths.
Given my screenshot example above auto column widths would have meant that the rel field would have been much larger and actually usable. I don’t think I can achieve this by setting the % widths of all the cells. As I said before this would cause the checkbox cells to be too small if the browser window was collapsed.
I don’t think specifying percentages is a big deal. Here I guestimated a width of 20% 20% 60% for the cells and it works fine at small resolutions and larger.
If the browser isn’t even going to do what’s expected, we might as well be explicit about the widths.
There are other rules that are still forcing the width in your screenshot. table-layout:fixed is the main culprit.
By setting the th and tds as width:auto and removing table-layout:fixed the result is much better than fixed or defined %. This could be tidied up even more by applying min-width to the rte and rel fields.
Oh you’re right, Leevi, I forgot I added that CSS property in there. I talked with James a bit more about it, and we don’t really have a compelling argument to not allow this other than we kind of like it the other way, but with some quick testing I just did, I can see it can actually be useful and might work out. I’ll do some more testing and tweaking (min-width stuff) and put it in for the next dev preview if all goes well. Thanks!
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.