Tablefield has just committed a patch that moves the header orientation from a Manage Display setting per view mode to a configuration setting that can be changed per widget. See #3128030: Make "Header orientation" a per entity setting.
Here's a patch for Panopoly that adds the Tablefield patch and updates the field_instance configuration to take it into account. Not sure if it needs an update hook.
| Comment | File | Size | Author |
|---|---|---|---|
| #13 | panopoly-tablefield-header-orientation-3130749-13.patch | 7.35 KB | dsnopek |
Comments
Comment #2
dsnopekHere's an updated patch that also changes the CSS to make it use the selected "Header orientation"
Comment #3
dsnopekActually, that one wasn't quite right. On some themes it would lead to "vertical" not highlighting the first column in the first row. This one is better.
Comment #4
cboyden commentedAnd here's a patch that adds two new tests for table header orientation.
Comment #5
dsnopekHere's a Travis build with both patches:
https://travis-ci.org/github/panopoly/panopoly/builds/680706682
Comment #6
dsnopekHm. The patches fail testing on Travis :-(
Comment #7
cboyden commentedIt looks like the first build is failing because panopoly_widgets is overridden. The second build gets past that, but it fails because the new field isn't available on the widget config form. Both might be fixed by an update hook. If we don't want to revert the whole field instance component, that would require some code in the update hook to just target the field instance setting that needs updated.
Comment #8
cboyden commentedHere's an attempt to operate on the field settings without reverting the feature.
Comment #9
dsnopekHm. I'm not sure why this update hook is required when the tablefield patch does a very similar one:
See https://www.drupal.org/files/issues/2020-04-22/tablefield-header-orienta...
Here's a new Travis build of this patch, though: https://travis-ci.org/github/panopoly/panopoly/builds/681217048
Comment #10
dsnopekHere's a new patch that is just a
drush fu panopoly_widgetsafter running the tablefield update. It removes the update hook from #8 because I'm hoping that's not actually necessary. Let's see how this does on Travis.Comment #11
dsnopekGah, that was a profile patch but only of panopoly_widgets which is the worst of both worlds. :-) Here's just a patch for panopoly_widgets so the two patches will get merged when the tests run.
EDIT: Here's the travis build: https://travis-ci.org/github/panopoly/panopoly/builds/686265769
Comment #12
dsnopekThat patch also failed, but I think it's because the tests aren't running the individual .make files, but the overall profile one. So, here's a profile patch that includes both the panopoly_widgets and panopoly_test changes - let's see how this does!
EDIT: Here's a new Travis build: https://travis-ci.org/github/panopoly/panopoly/builds/686280497
Comment #13
dsnopekThat patch failed too. :-( It looks like there's nothing in Panopoly that's setting
scope="row"on those row headers. That's probably a tablefield bug? Anyway, I've adjusted the tests here just so we can get what we have committed.EDIT: Here's the Travis build: https://travis-ci.org/github/panopoly/panopoly/builds/686300049
Comment #15
dsnopekThis finally passed! So, I just merged it. :-)