Skip to content
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

Use a more robust CSV parser to auto-populate the attribute editor #2059

Open
robyngit opened this issue Oct 3, 2022 · 1 comment
Open
Labels
attribute editor redesign New attribute section in the metadata editor editor enhancement

Comments

@robyngit
Copy link
Member

robyngit commented Oct 3, 2022

The "Fill from file" button in the attribute editor was implemented using a simple routine that reads just the start of a file and tries to find the header names. (See issue #202). A few limitations of this method that @amoeba mentioned are that:

(1) my approach does not like the presence of a UTF BOM and
(2) my approach doesn't handle quoted column names with commas inside them. Both of these aren't common IME.

We should consider using a more robust CSV parser, such as PapaParse or SheetJS

@robyngit
Copy link
Member Author

PapaParse introduced in #2519. It's very lightweight, well supported, and robust. It can even be multi-threaded!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
attribute editor redesign New attribute section in the metadata editor editor enhancement
Projects
None yet
Development

No branches or pull requests

1 participant