demeringo / datami-tests

Testing datami widget to edit and validate csv files
GNU General Public License v3.0
0 stars 1 forks source link

How to display / edit multiline text #8

Open demeringo opened 5 months ago

demeringo commented 5 months ago

Some fields may contain multiline text (like a comment fields).

Investigate how to configure Datami to display and edit multiline test correctly

Some example of multinline text rendering can be found on the site: https://decider-ensemble.netlify.app/?datami_tab=2&datami_view=cards

demeringo commented 5 months ago

Displaying / editing multiline text works if we provide an explicit line break separator in the field configuration.

/!\ But it does not prevent user to input line break using the return key ! This breaks the format of the resulting csv (or at least the validation of the file in CI). It also breask the subsequent edit of the data as it seems that datami widget cannot handle csv files whose values span multiple lines.

demeringo commented 5 months ago

Maybe I am doing something wrong because according to standard, csv file should support cr lf / line breaks as long as the value of the cell that contains the break is surrounded by double quotes.

https://stackoverflow.com/questions/566052/can-you-encode-cr-lf-in-into-csv-files

https://datatracker.ietf.org/doc/html/rfc4180#page-2

demeringo commented 5 months ago

todo: