DillonHammill / DataEditR

An Interactive R Package for Viewing, Entering Filtering and Editing Data
https://dillonhammill.github.io/DataEditR/
384 stars 40 forks source link

Error in shinytheme(theme): #46

Closed GakenouOF closed 2 years ago

GakenouOF commented 2 years ago

I have just installed the package and i tried using the data_edit function on my dataset. It keeps returning this error

Error in shinytheme(theme): yeti is not an available theme. Valid themes are: .

Screenshot 2022-03-01 154520

PS: This package worked fine on a computer i was using previously. I am using a new one and i get this error message. I am not sure if it is a package issue or computer.

DillonHammill commented 2 years ago

Have you tried using a different theme?

data_edit(mtcars, theme = "cosmo")
GakenouOF commented 2 years ago

I just tried it, say it is not an available theme

DillonHammill commented 2 years ago

Perhaps you need to update your shinythemes package.

GakenouOF commented 2 years ago

I am using the latest version (1.2.0)

drpturner commented 2 years ago

Same for me unfortunately (Win11, R 4.1.0, RStudio 2022.02.0 Build 443, shinythemes 1.2.0). Other shiny apps working as expected

DillonHammill commented 2 years ago

Looks like shinythemes has been depreciated in favour of bslib and this has recently changed in shiny as well. I tried upgrading to bslib but it causes some issue with the UI - I wil need to fiddle around with this a bit to get it to work.

In the meantime, I have just pushed an update to GitHub to bypass setting a theme when theme = NULL - this will at least allow the use of DataEditR while I sort this out.

data_edit(mtcars, theme = NULL)
drpturner commented 2 years ago

Thanks very much for the quick response - this update works for me

DillonHammill commented 2 years ago

I just pushed an update to GitHub to make the switch to bslib. Unfortunately, using bootstrap 4 causes the Done button to move over to the left so I have decided to stick to bootstrap 3 for now. Also users can now create their own custom bs_theme and pass directly to the theme argument:

library(bslib)
custom_thme <- bs_theme(bootswatch = "cosmo")
data_edit(mtcars, theme = custom_theme)

Users can still simply supply the name of the theme to the theme argument as well:

data_edit(mtcars, theme = "cosmo")

Thanks for reporting this issue. I will push this update to CRAN today.

drpturner commented 2 years ago

Thanks for sorting this out so quickly - great package. I think we can mark as closed