-
Notifications
You must be signed in to change notification settings - Fork 26
Prep quickstart #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
protect against python3
make upload/download behavior configurable
make url download less eager
This all LGTM when you are ready to merge. The note about tweaking |
add dummy sample buttons
@koverholt I know I made a bunch more changes since you approved this one - are you still good for me to merge this? This is the branch I used in the latest QuickStart |
Yep, I looked through the changes (and have also tested these in the QuickStart), and it all LGTM. |
A handful of changes to look over:
image-classifier
behaves (you can choosedownload
orupload
)./image-classifier/img
so that those can be used without the internetrenderImage
deletes the file off of disk... so I added a copy to temp space using thefs
packageheight = NULL
on the image render to protect against a weird wrapping issue for large imageswidth: 100%
on the image to fix another weird wrapping issue for large imagesAlso a handful of tidbits / tips / tricks:
observeEvent
for button handling is usually the preferred pattern (and it is pretty concise 😄 )reactiveVal
if you haven't!! It is probably one of my favorites! I used this to abstractimage_path
awaystop
in a Shiny app, in any context. The reason is because it kicks the user off of their session, which means any user who is on the application (think Connect, where many users use the same R session) get kicked off (i.e. not just the one who generated the error). (Oops. My goof - it doesn't kick off all users. But you can if you want 😉 Check out this one, and open it up in a few browser windows). Usually it is only for terminal errors (like bad configuration at startup).showNotification()
(although usually you would not want to just expose arbitrary errors and say something more generic... like"WARNING: Download failed"
)renderUI/uiOutput
is another trick to keep up your sleeve for rendering UI elements dynamically