gvwilson / tidyblocks

A blocks-based interface for tidy data manipulation and analysis.
Other
82 stars 28 forks source link

Drop down menu for "User Data" block not available #426

Closed larnsce closed 3 years ago

larnsce commented 4 years ago

Thank for your for this brilliant work!

(Reproducible) Example

Question/Bug? Has the drop down been removed or is this an issue on my side? I can see it in the @MayaGans video demonstration at the rstudio::conf 2020 (great lighting talk!)

Feauture request? It would be great if it was able to name the data object as the CSV is imported. Some CSVs from URLs have long names that make it cumbersome to type them into the User Data block Is it possible to give a name to the the imported dataset with a name other than by renaming the original CSV?

gvwilson commented 3 years ago

@DarkMetroid can you please confirm you're seeing this?

DarkMetroid commented 3 years ago

Yup, behavior is as mentioned. I don't think we removed anything (knowingly) during the update.

Having a dropdown makes a ton of sense, I'll take a look and put a PR up (might be sometime next week).

DarkMetroid commented 3 years ago

Took a look at things, it's pretty simple for us to add static dropdown lists to items, but dynamic dropdowns like we'd need for loaded CSVs get a bit difficult. Essentially we're passing all our JS block stuff to react and loading them at the start, so editing/recomputing them can't happen easily atm.

What we could do fairly easily is just let people assign a name when they're loading the CSV. I kind of like the idea of keeping the same initial window, and then after they click 'Select' or 'Load' they get prompted to confirm the name (we auto-fill with the name of the file).

Screen Shot 2020-11-29 at 2 03 04 PM
larnsce commented 3 years ago

Thank you for looking at this. I think if you make it possible to name the loaded CSV then a dropdown menu is not necessary. In this case it's probably even better to explicitly type the name of the data object that we just assigned by loading it. Would be great if this option was available both for local files as well as URL uploads.