daattali / shinyforms

📝 Easily create questionnaire-type forms with Shiny
Other
164 stars 65 forks source link

Add quickform() function #45

Closed brentscott93 closed 4 years ago

brentscott93 commented 4 years ago

Hi Dean -

This PR is a proposal to add additional functionality to {shinyforms}. There are no changes to any existing functions or code that is currently implemented. There is an addition of one exported function (shinyforms::quickform) and several un-exported helper functions.

Key differences:

Design Philosophy Offers quick development and deployment of a single file shiny app with limited flexibility.

Limitations

Demo app here

daattali commented 4 years ago

Thanks Brent! I haven't done a very deep dive into the code but based on a quick skim there are two things I would want to change:

And a few other comments that I'll leave it up to you if you want to address:

(Some of these points may seem hypocritical because the style in the current codebase isn't great, but that's because it was done in a hackathon and moving forward I don't want to add more bad style)

brentscott93 commented 4 years ago

Thanks for the feedback and I understand the rationale behind the critiques (well received).

The updates have been applied, committed, and re-published a demo app.

Thanks for the time you are taking to review this and for the consideration.

daattali commented 4 years ago

Looks great!

FYI I tend to use [[ over $ in some cases, but not always, mostly when there's user-provided content. For example, the input list is something that the user can't change, you as the developer should be sure of what it contains, so I use input$. But something like the question list, because you're relying on the user to construct that list, that's why I suggested using [[, because you want to be sure they typed the right thing.

brentscott93 commented 4 years ago

After making changes, when I re-reread the comments I realized you might have meant that...ha! Thanks for clarifying and for all the feedback/tips.