Giter Club home page Giter Club logo

shiny.quetzio's People

Contributors

statismike avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

shiny.quetzio's Issues

Provide external identificator for the user.

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.

Create masking functions for R6 classes

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.

Option to randomize the questions order

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).

Add an option to include defalut configuration of items in `quetzio_survey`

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.

Conditional verification of `textInput` content.

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.

Create a way to link multiple survey_modules

Option to link multiple shiny.survey_module objects in shiny.survey_link.

It will allow to:

  • create multi-page surveys (where technically every page will be another survey_module)
  • export completion rate and all answers to the app
  • support googlesheets output of all answers while keeping option to output info from all modules independently in the same way

Create new input type: `likertInput`

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

  • the choices (allows only numerical) or choiceValues (1 to n) should be visible on the inside of the likertInput
  • if the choiceNames are provided alongside choiceValues:
    • the min and max options should be visible on the left and right side of the ui element
    • the name of the currently selected value should visible (maybe below the button?) - instantanious feedback to the end-user
  • their look should be as vanilla as possible - it should be easy to customize with css (so all the css options need to be documented fully!

Widening the selectizeInput options

Currently the selectizeInput functionality is limited:

  • when multiple = F it don't allow empty initial value, making mandatory = T redundant
  • with multiple = T there is currently no option for specifying how many selections are acceptable

Simplify the `quetzio_link_server` implementation

Currently, for the nested quetzio_servers 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"
    )

Make use of selectize wildcard option

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:

  • maxOptions (num)
  • create (T/F)
  • placeholder (char)

Changes need to be made in:

  • source creation
    • addition of "select_maxOptions" and "select_create" columns
    • removal of suffix from 'placeholder' (as it will now be available for all input types but radioButtons)
  • selectInput rendering

Option to pre-populate input values from external source

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.

Reducing dependencies

  • Need to handle dependencies: move all excessive 'depends' to 'imports'.
  • Possibly remove the 'yaml' and 'googlesheets4' dependencies (only needed if using these as source method

Add new options for source and output

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.

Normalize the `quetzio_server` ns inheritance

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).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.