statismike / shiny.quetzio Goto Github PK
View Code? Open in Web Editor NEWCreate a survey in a ShinyApp
Home Page: https://statismike.github.io/shiny.quetzio/
License: Other
Create a survey in a ShinyApp
Home Page: https://statismike.github.io/shiny.quetzio/
License: Other
It would be handy if there were optional value to be fed to the quetzio_server
, which would paste the value as 'id' of the user. Especially in the scenario, when the dev would want to send linked questionnaires results independently to the google sheet - there is no way to determine if two submissions came from the same user.
Usage of R6 classes directly is discouraged by RStudio staff. Every method (and initialization) should be masked by regular functions.
It can be most problematic to implement for quetzio_link_server$new()
, as the methods of getting the individual quetzios depend on unevaluated expressions.
Create a object for storing and retrieving all systemic messages called by the objects.
Similiar to https://github.com/StatisMike/shiny.reglog/blob/master/R/texts.R
It can be handy for the user to randomize the questions order for any visitor. This option should be added.
Additionally, after addition the order should be also exported, both in gsheet
output method as in a way for the shinyApp to catch - maybe as additional element of the output list (in $answers()
reactiveVal) and in data.frame (in $get_answers_df()
method).
There is a usability problem, especially while inputting many survey questions with YAML file.
Supposedly the user would want to add multiple items, all looking the same but with other labels. Specifying the configuration for everyone of them can be tedious and prone to error.
There should be an option to specify default item configuration, which will be taken by all items of the type specified in default . For example, reading following YAML:
selectizeInput:
choiceNames:
- First
- Second
- Third
choiceValues:
- 1
- 2
- 3
Will create default configuration for all items of selectizeInput
type. Repeating these lines for even 10+ items is pretty verbose, and it should make the questionnaire creation more easy.
While using googlesheets as a source, the cell values with these options could be easily populated by copying, so it should be prioritetized to allow default configuration with "yaml" source_method
only.
Check the vignette and correct the errors
There are some instances, when it would be handy to verify if the textInput content is correct. It should be relatively easy to implement checks with grepl
, though changes to the whole verification method will be needed then.
Option to link multiple shiny.survey_module
objects in shiny.survey_link
.
It will allow to:
Inline radio buttons for NPS-like questions (1-10) DON'T look nice with vanilla radioButtons:
radioButtons are ideal for the questionnaires with mandatory questions though - it can really show the scope of 1-10 points and there is option for it to initialize without any values selected. So the new input method should be based on the radioButtons, with some tweaks in their appearance.
Some inpiration for their look over there
Base assumptions
choices
(allows only numerical) or choiceValues
(1 to n) should be visible on the inside of the likertInput
choiceNames
are provided alongside choiceValues
:
Currently the selectizeInput
functionality is limited:
multiple = F
it don't allow empty initial value, making mandatory = T
redundantmultiple = T
there is currently no option for specifying how many selections are acceptableCurrently, for the nested quetzio_server
s inside the quetzio_link_server
it is needed to specify correct values to some unnecessary arguments: they are redundant, as their values should be the same for every linked questionnaire.
Always first questionnaire provided should be rendered at the beginning, and all others should be hidden (so the render_ui = FALSE
.
All link_id
argument values should be the same for every quetzio_server
and quetzio_link_server
. Correct configuration can be seen below:
quetzio_link <-
quetzio_link_server$new(
survey1 = quetzio_server$new(
source_method = "yaml",
source_yaml = "test1.yaml",
module_id = "test1_module",
div_id = "test1_div"
link_id = "link_test"
),
survey2 = quetzio_server$new(
source_method = "yaml",
source_yaml = "test2.yaml",
module_id = "test2_module",
div_id = "test2_div",
render_ui = FALSE,
link_id = "link_test"
),
survey3 = quetzio_server$new(
source_method = "yaml",
source_yaml = "test3.yaml",
module_id = "test3_module",
div_id = "test3_div",
render_ui = FALSE,
link_id = "link_test"
),
link_id = "link_test"
)
During the quetzio_link_server
initialization, the arguments to the quetzio_server$new()
calls should be modified accordingly before evaluation, so the user could make the following call:
quetzio_link <-
quetzio_link_server$new(
survey1 = quetzio_server$new(
source_method = "yaml",
source_yaml = "test1.yaml",
module_id = "test1_module",
div_id = "test1_div"
),
survey2 = quetzio_server$new(
source_method = "yaml",
source_yaml = "test2.yaml",
module_id = "test2_module",
div_id = "test2_div"
),
survey3 = quetzio_server$new(
source_method = "yaml",
source_yaml = "test3.yaml",
module_id = "test3_module",
div_id = "test3_div"
),
link_id = "link_test"
)
We can use selectizeInput
option to provide the user possibility to put 'Other' text directly inside into input.
Also give option to restrict number of options shown within the dropdown and placeholder text.
so to implement:
Changes need to be made in:
radioButtons
)There are situations which need some inputs pre-populated from another source. Most efficient method seems to be the updateShinyInput
function, as that don't require the information to be added on initialization of the ShinyApp, and the rerender of the UI.
Check the vignette and correct the errors
After #40 is completed, update to all vignettes and README will be needed.
It should be possible to input the dataframe or list directly, not only from the googlesheet and yaml file.
Also, the output should be possible to access from inside the ShinyApp, and exporting them to googlesheet shouldn't be mandatory.
For now, there are two different namespaces for quetzio_server
, as I didn't really understand how the inheritance works: module_id
for server and module_ui_id
for generated UI. It works as it is, but can be problematic if in one shinyApp there will be a quetzio_server
module with the same id both standalone and inside the quetzio_link_server
(or in multiple of these).
Check the vignette and correct the errors
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.