ropensci / dataspice

:hot_pepper: Create lightweight schema.org descriptions of your datasets
https://docs.ropensci.org/dataspice
Other
159 stars 26 forks source link

blank cells filled with check boxes when editing .csv files #81

Closed reblake closed 5 years ago

reblake commented 5 years ago

When a .csv file is partially filled via prep* or edit* functions, any remaining blank cells are check boxes when the file is opened again. New information cannot be added to cells.
This might be a bug in the shiny apps, but might be a problem with saving the .csv files. I haven't been able to pinpoint it.

Example workflow that should illustrate the problem:

create_spice(dir = "my_project")
prep_access(data_path = here("my_project"),
            access_path = here("my_project", "metadata", "access.csv"))
edit_access(metadata_dir = here("my_project", "metadata"))

Screenshot of problem: Screenshot (13)

amoeba commented 5 years ago

Hey @reblake thanks for the writeup. I can reproduce this over here so I'll take a look.

amoeba commented 5 years ago

The behavior is part rhandsontable, which we use to build an editable table for the CSV in Shiny, and how readr guesses column types. We were letting readr default columns without any data to logical, which rhandsontable uses checkboxes for logical columns.

I looked at our four CSVs and figured it'd be fine to just change the default to character when there's no value. It's not perfect for cols like endDate but it's better than having checkboxes.

If we feel like it, later on we could provide readr col definitions for each column in each file.

Sending a PR up in a sec.

amoeba commented 5 years ago

Hey @reblake, can you reinstall and give it a test?

reblake commented 4 years ago

I tested, and this has been fixed. Thanks!

amoeba commented 4 years ago

Excellent, thanks for testing @reblake! (and reporting)