New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The "Import CSV" dialog doesn't always display the preview #720

Closed
justinclift opened this Issue Aug 10, 2016 · 6 comments

Comments

Projects
None yet
2 participants
@justinclift
Copy link
Member

justinclift commented Aug 10, 2016

Details for the issue

With DB4S git master (b7be134 as of 10th 2016), the "Import CSV" dialog isn't always displaying the preview image correctly.

This happens with at least when DB4S is using the Russian language, though it may also happen for other languages too (not yet tested).
d2d3dd00-5f16-11e6-88b2-f091fd9e6ee7

@justinclift

This comment has been minimized.

Copy link
Member Author

justinclift commented Aug 10, 2016

As a data point, noticed this when testing the new Russian translation.

#719 (comment)

Some helpful points to try are mentioned in that issue.

Also worth noting, is that with a different CSV file to import the behaviour changed. Instead of not displaying the preview, instead it displayed what seems like corrupted data:

screen shot 2016-08-10 at 17 17 00

That's from a CSV export of a database with some PNG files in their cells. The PNG data seems to be quoted (though I've not checked it's correctness), so it's possible either the export or import function isn't handling binary data well.

@justinclift

This comment has been minimized.

Copy link
Member Author

justinclift commented Jan 28, 2017

As a data point, the CSV RFC doesn't define a way to encode binary data.

Wonder what it would take to create a follow up RFC, filling in some of these edge cases we've noticed are missing:

  • encoding of binary data (eg probably base64 encode it)
  • clearly establish NULL vs "no value provided for this field" (so use the default value): #195 (comment)
@MKleusberg

This comment has been minimized.

Copy link
Member

MKleusberg commented Sep 19, 2017

Hmm, any update on this? I can't reproduce it with just any CSV file and setting DB4S to Russian.

Not sure about the PNG file either. We probably can't do much about it...

@justinclift

This comment has been minimized.

Copy link
Member Author

justinclift commented Sep 29, 2017

Good news. The blank preview no longer happens. 😄

The preview does show a few fields... but has a heart attack (multi-second UI lockup, recurring every few seconds) with the CSV which triggers this. It's an export of a table with a few PNG's in it, so they have binary data in them.
screen shot 2017-09-29 at 15 12 48
Not sure if we should be expecting to handle that ok, or if we should detect binary data and abort with a warning.

How feasible do you reckon it would be to detect the problem and do the abort? Can email the .csv to you if that's useful. (?)

MKleusberg added a commit that referenced this issue Sep 29, 2017

@MKleusberg

This comment has been minimized.

Copy link
Member

MKleusberg commented Sep 29, 2017

Cool, good to hear that the missing preview issue is gone 😄

As for the other issue: I've just pushed a commit that fixes the sluggish UI by limiting the length of the cell contents in the preview table. Importing binary data also seems to work way better than expected, so I would leave it as is. Exporting binary data to CSV seems to be pretty broken but we'll have to see if it's worth fixing.

@justinclift

This comment has been minimized.

Copy link
Member Author

justinclift commented Sep 30, 2017

Awesome, this is definitely all fixed. Tested the problem CSV file, and the preview works fast/well even with fields containing images. Fantastic @MKleusberg. 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment