datastorm-open / shinymanager

Simple and secure authentification mechanism for single shiny applications.
https://datastorm-open.github.io/shinymanager/
381 stars 79 forks source link

add position none to FAB button #97

Closed indubio closed 3 years ago

indubio commented 3 years ago

Hello, i added a new option to FAB button position. The "none" option can be used in secure_app() to suppresses the FAB button. see issue https://github.com/datastorm-open/shinymanager/issues/7 Inspired by legend.position none from ggplot package. ".shinymanager_logout" and ".shinymanager_admin" can still be used to create custom buttons.

pvictor commented 3 years ago

Thanks! Using position is a nice idea, but can you put none at the end of choices vector, otherwise it's the default argument for the fab_button function and using it outside shinymanger will be awkward.

Another solution will be to use none position only in secure_app but your implementation is elegant.

And I think you should return something, e.g. return(NULL), I have a vague memory that CRAN can complain if you don't return anything, it'll be equivalent but more explicit.

Victor

indubio commented 3 years ago

Thanks for the helpful feedback. I hope it's better now.

Steffen

bthieurmel commented 3 years ago

Merged in master. Thanks.