From 43b43c96bf2f8c20ed79c7917216fdce002c4e4a Mon Sep 17 00:00:00 2001 From: pvictor Date: Tue, 22 Feb 2022 21:32:55 +0100 Subject: [PATCH] updated readme and vignette --- NEWS.md | 2 +- README.md | 16 ++++++---------- .../{shinybusy-usage.Rmd => shinybusy.Rmd} | 17 +++++++++++++++++ 3 files changed, 24 insertions(+), 11 deletions(-) rename vignettes/{shinybusy-usage.Rmd => shinybusy.Rmd} (89%) diff --git a/NEWS.md b/NEWS.md index c049c49..dcae658 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,4 @@ -# shinybusy (unreleased) +# shinybusy 0.3.0 * Internal: use [{packer}](https://github.com/JohnCoene/packer) to manage JavaScript assets. * New function `update_modal_spinner()` to update modal spinner text ([#19](https://github.com/dreamRs/shinybusy/issues/19)). diff --git a/README.md b/README.md index 06af6eb..43c8ae5 100644 --- a/README.md +++ b/README.md @@ -30,8 +30,9 @@ remotes::install_github("dreamRs/shinybusy") ## Examples +### Automated busy indicators -### Gif +#### Gif Animate a Gif when server is busy and pause animation when server is idle : @@ -43,7 +44,7 @@ add_busy_gif(src = "https://jeroen.github.io/images/banana.gif", height = 70, wi -### Progress bar +#### Progress bar Make an infinite progress bar appear on top of the page when server is busy : @@ -56,26 +57,21 @@ add_busy_bar(color = "#FF0000") -### Spinner +#### Spinner Add a spinner when server is busy on top-right corner of the page with: - ```r -# UI add_busy_spinner(spin = "fading-circle") ``` -Classic Shiny: ![](man/figures/shinybusy-spin.gif) -Shinydashboard: -![](man/figures/spin-dash.png) -Shinythemes: -![](man/figures/spin-theme.png) +### Other functionalities +Display a loading indicator at the start of the application until it is ready to be used, block application interaction until a calculation is done, send notifications to user, ... See vignette or [online website](https://dreamrs.github.io/shinybusy/) for more. diff --git a/vignettes/shinybusy-usage.Rmd b/vignettes/shinybusy.Rmd similarity index 89% rename from vignettes/shinybusy-usage.Rmd rename to vignettes/shinybusy.Rmd index 5811cc6..aa5d547 100644 --- a/vignettes/shinybusy-usage.Rmd +++ b/vignettes/shinybusy.Rmd @@ -161,3 +161,20 @@ Don't forget to remove the modal window when computation is finished ! +## Notifications + +Show notifications and reports to user through JavaScript library [Notiflix](https://notiflix.github.io/). Four appearance are available: success, failure, info and warning. Notifications are fully configurable. + +```{r notifications, eval=FALSE} +# success notification +notify_success("Well done!") + +# report failure +report_failure( + "Oups...", + "Something went wrong" +) +``` + + +