- Issue created by @useernamee
- 🇮🇳India ajayyadav
I have not getting any such issue. I have installed module and export data in csv format.
Exported table in csv
0,heading1,heading2,heading3,heading4, 1,heading11,heading12,heading13,heading14, 2,heading21,heading22,heading23,heading24,
- 🇸🇮Slovenia useernamee Ljubljana
@ajayyadav thank you for your response but when you render the field as custom elements there currently is no 'export as csv' option.
Anyways I had to adjust the processor to support multivalue fields as well, so there's another level of nesting added, but the output I think works out.
- 🇦🇹Austria fago Vienna
Thx! I reviewed the PR and added some comments.
I think we should also add a basic (kernel?) test which makes sure that the output is working as expected. - 🇸🇮Slovenia useernamee Ljubljana
I removed the label and added the kernel test which was passing locally. I was checking the CI and I think that tests are not running there.
I was unsure about the header settings.
- 🇦🇹Austria fago Vienna
thank you, that looks pretty good!
I've added one question about the output-data-structure above, could you check that and make sure it's good? Maybe it is, but it seems not.
Besides that, it's great to see test-coverage here. I'd suggest to add a couple of cases though, so we cover the features of our formatter:
- run once without custom-header and once with
- set weights differently and make sure sorting is applied correctly - 🇸🇮Slovenia useernamee Ljubljana
I added tests coverage for multi value fields - which explain the result structure and a small fix to the formatter code.
The header formatter configuration is only there for the FE to know if it should style the first row/column as header. On field configuration there's additional setting called `ignore_table_header` which again still passes through the first row - the config option is only used to determine whether the field is empty if contains only the first row.
- 🇦🇹Austria fago Vienna
thank you for the clarifications and better test, this seems pretty good already.
However, as commented above I think we shall still optimize for the 90% use-case to be better and keep that simple in the output, i.e. output only the single data value in the single case and avoid wrapping it in the multi-value data-structure when there are is only one value.
-
fago →
committed 16f6e5b3 on 3.x authored by
useernamee →
Issue #3523905 by useernamee: Add tablefield custom elements formatter
-
fago →
committed 16f6e5b3 on 3.x authored by
useernamee →
- 🇦🇹Austria fago Vienna
Thank you, that looks great now. Output is very nice for single-value fields and decent for multi-value fields + comes with test coverage! merged!
Automatically closed - issue fixed for 2 weeks with no activity.