Skip to content

Commit

Permalink
Merge pull request #68 from jhelvy/pingfan-ui-design
Browse files Browse the repository at this point in the history
Update to v0.0.6
  • Loading branch information
pingfan-hu authored Aug 10, 2024
2 parents 0710d1e + dde697c commit b69e74f
Show file tree
Hide file tree
Showing 13 changed files with 152 additions and 101 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: surveydown
Title: Markdown-Based Surveys Using Quarto Shiny Documents
Version: 0.0.5
Version: 0.0.6
Authors@R: c(
person(given = "John Paul",
family = "Helveston",
Expand Down
8 changes: 8 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# surveydown (development version)

# surveydown 0.0.6

- In `sd_database`, a `gssencmode` argument is added and set to "prefer" by default. In some cases, local deployment may fail due to network environments such as VPN settings. It can be solved by setting `gssencmode = "disable"` in the survey `qmd` file.
- Now the survey can be updated even AFTER its deployment. You may add, delete, or modify a question. The old question column and its time stamp, will stay where they were. The new question column and time stamp will be concatenated in the end of the table.
- (extension) Now the `example.qmd` survey has instructions for supabase configuration and shinyapps deployment.
- (extension) Now the `.gitignore` file has `.Renviron` included. This file will store supabase password and is essential for shinyapps deployment. Eliminating this file from pushing to GitHub will ensure that your password is only saved locally.


# surveydown 0.0.5

- `create_survey()` changed to `sd_create_survey()` for function name consistency.
Expand Down
38 changes: 2 additions & 36 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ The {surveydown} R package works in tandem with our [surveydown Quarto extension

If you're curious where this whole idea came from, check out this [blog post](https://www.jhelvy.com/blog/2023-04-06-markdown-surveys/), which outlines more on the general idea and the motivation for it. The post is now outdated in terms of the overall design, but it provides something of an origin story and some of the motivation for developing this project.

# Quick Use Guide
# Quick Start

To install the {surveydown} **R package** (not available on CRAN yet):
Install the {surveydown} **R package** (not available on CRAN yet):

```{r}
#| eval: false
Expand All @@ -54,24 +54,6 @@ To install the {surveydown} **R package** (not available on CRAN yet):
remotes::install_github("jhelvy/surveydown")
```

To install the surveydown **Quarto extension**, your can either do so using the *Terminal*, or using the {surveydown} *R package*:

1. Using *Terminal* (next to the "Console" panel in your RStudio), run:

```
# Make sure you have Quarto installed.
quarto install extension jhelvy/surveydown-ext
```

2. Using the {surveydown} *R package*, run:

```{r}
#| eval: false
# Make sure you have the {surveydown} R package installed.
surveydown::sd_update_extension()
```

To start with an **example survey** (which includes the extension), run:

```{r}
Expand All @@ -84,22 +66,6 @@ surveydown::sd_create_survey()
surveydown::sd_create_survey("path/to/folder")
```

To check if the R package and Quarto extension versions are up to date, run:

```{r}
#| eval: false
surveydown::sd_check_versions()
```

To update the R package and Quarto extension to the latest version, run:

```{r}
#| eval: false
surveydown::sd_update_surveydown()
```

# TODO List

This is a running list of things we're working on adding to the project:
Expand Down
34 changes: 2 additions & 32 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,32 +57,15 @@ now outdated in terms of the overall design, but it provides something
of an origin story and some of the motivation for developing this
project.

# Quick Use Guide
# Quick Start

To install the {surveydown} **R package** (not available on CRAN yet):
Install the {surveydown} **R package** (not available on CRAN yet):

``` r
# install.packages("remotes")
remotes::install_github("jhelvy/surveydown")
```

To install the surveydown **Quarto extension**, your can either do so
using the *Terminal*, or using the {surveydown} *R package*:

1. Using *Terminal* (next to the “Console” panel in your RStudio), run:

<!-- -->

# Make sure you have Quarto installed.
quarto install extension jhelvy/surveydown-ext

2. Using the {surveydown} *R package*, run:

``` r
# Make sure you have the {surveydown} R package installed.
surveydown::sd_update_extension()
```

To start with an **example survey** (which includes the extension), run:

``` r
Expand All @@ -93,19 +76,6 @@ surveydown::sd_create_survey()
surveydown::sd_create_survey("path/to/folder")
```

To check if the R package and Quarto extension versions are up to date,
run:

``` r
surveydown::sd_check_versions()
```

To update the R package and Quarto extension to the latest version, run:

``` r
surveydown::sd_update_surveydown()
```

# TODO List

This is a running list of things we’re working on adding to the project:
Expand Down
30 changes: 18 additions & 12 deletions pkgdown/_pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,28 @@ navbar:
left:
- icon: fa-home fa-lg
href: index.html
- text: "Reference"
- text: "Functions"
href: reference/index.html
- text: "Articles"
- text: "Usage Guide"
menu:
- text: "Installation"
- text: "1. Quick Start"
href: articles/quick_start.html
- text: "2. Installation"
href: articles/installation.html
- text: "Overview"
href: articles/overview.html
- text: "Question types"
href: articles/question_types.html
- text: "Survey control logic"
href: articles/survey_control_logic.html
- text: "Formatting options"
href: articles/formatting_options.html
- text: "Database setup"
- text: "3. Editing Survey"
menu:
- text: "3.1 Overview"
href: articles/overview.html
- text: "3.2 Question Types"
href: articles/question_types.html
- text: "3.3 Question Formatting"
href: articles/question_formatting.html
- text: "4. Control Logic"
href: articles/control_logic.html
- text: "5. Database Setup"
href: articles/database_setup.html
- text: "6. Deployment"
href: articles/deployment.html
- text: "Changelog"
href: news/index.html

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
title: "Survey Control Logic"
title: "4. Control Logic"
output: rmarkdown::html_vignette
vignette: >
%\VignetteIndexEntry{Survey Control Logic}
%\VignetteIndexEntry{4. Control Logic}
%\VignetteEngine{knitr::rmarkdown}
\usepackage[utf8]{inputenc}
---
Expand Down Expand Up @@ -39,4 +39,4 @@ Use the `show_if` argument to control basic conditional display logic.

## Custom conditional display

Use the `show_if_custom` argument to control custom conditional display logic.
Use the `show_if_custom` argument to control custom conditional display logic.
10 changes: 5 additions & 5 deletions vignettes/database_setup.Rmd
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
title: "Database Setup using SupaBase"
title: "5. Database Setup"
output: rmarkdown::html_vignette
vignette: >
%\VignetteIndexEntry{Database Setup}
%\VignetteIndexEntry{5. Database Setup}
%\VignetteEngine{knitr::rmarkdown}
\usepackage[utf8]{inputenc}
---
Expand All @@ -17,12 +17,12 @@ knitr::opts_chunk$set(
)
```

> This guide will help users set up a Supabase account to work inside of SurveyDown
> This guide will help users set up a supabase account to work inside of SurveyDown
for quick & live server updates

# Step 1: Creating your account.

<p style="font-size: 18px;"> To begin your database setup that involves creating an account on the [SupaBase](https://supabase.com/) website.
<p style="font-size: 18px;"> To begin your database setup that involves creating an account on the [supabase](https://supabase.com/) website.
</p>

# Step 2: Creating your account.
Expand Down Expand Up @@ -162,7 +162,7 @@ Now that we have our password secure and all other parameters we can update our
db <- sd_database(
host = "aws-0-us-west-1.pooler.supabase.com", #This varies based on location,
#check Step 7.
db_name = "postgres", # For the purpose of Supabase, this will always be "postgres".
db_name = "postgres", # For the purpose of supabase, this will always be "postgres".
port = "####", # Your 4 digit port number from Step 7.
user = "postgres.UserValue", # This is the User parameter from Step 7.
table_name = "What Ever Name You Want", # This is what your table name will be.
Expand Down
20 changes: 20 additions & 0 deletions vignettes/deployment.Rmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
title: "6. Deployment"
output: rmarkdown::html_vignette
vignette: >
%\VignetteIndexEntry{6. Deployment}
%\VignetteEngine{knitr::rmarkdown}
\usepackage[utf8]{inputenc}
---

```{r setup, include=FALSE, message=FALSE, warning=FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
warning = FALSE,
message = FALSE,
fig.retina = 3,
comment = "#>"
)
```

This is the page for deployment.
12 changes: 6 additions & 6 deletions vignettes/installation.Rmd
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
title: "Installation"
title: "2. Installation"
output: rmarkdown::html_vignette
vignette: >
%\VignetteIndexEntry{Installation}
%\VignetteIndexEntry{2. Installation}
%\VignetteEngine{knitr::rmarkdown}
\usepackage[utf8]{inputenc}
---
Expand All @@ -27,7 +27,7 @@ It kind of goes without saying, but you need to [install R](https://cloud.r-proj

Also, Quarto works great with an IDE. We recommend [RStudio](https://www.rstudio.com/categories/rstudio-ide/), but you can also use it with [VS Code](https://code.visualstudio.com) or [Positron](https://github.com/posit-dev/positron) (a novel IDE made by Posit).

# Install the R package
# Install the {surveydown} R package

For now, {surveydown} is not get on CRAN, but you can install the development version from [GitHub](https://github.com/jhelvy/surveydown) by running the following command in R:

Expand All @@ -38,7 +38,7 @@ For now, {surveydown} is not get on CRAN, but you can install the development ve
remotes::install_github("jhelvy/surveydown")
```

# Install the Quarto extension
# Install the surveydown Quarto Extension

The {surveydown} package works in tandem with our [surveydown Quarto extension](https://github.com/jhelvy/surveydown-ext), which is required to make everything work. The extension is needed in the root directory folder of every survey project you create, so don't worry about installing it now - just know that you'll need it eventually.

Expand All @@ -60,9 +60,9 @@ quarto install extension jhelvy/surveydown-ext
surveydown::sd_update_extension()
```

# Versions
# Version Control

We recommend you to have the most up-to-date R pacakge and Quarto extension.
We recommend you to have the most up-to-date R package and Quarto extension.

To check if the R package and Quarto extension versions are up to date, run:

Expand Down
4 changes: 2 additions & 2 deletions vignettes/overview.Rmd
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
title: "Overview"
title: "3.1 Overview"
output: rmarkdown::html_vignette
vignette: >
%\VignetteIndexEntry{Overview}
%\VignetteIndexEntry{3.1 Overview}
%\VignetteEngine{knitr::rmarkdown}
\usepackage[utf8]{inputenc}
---
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
title: "Formatting Options"
title: "3.3 Question Formatting"
output: rmarkdown::html_vignette
vignette: >
%\VignetteIndexEntry{Formatting Options}
%\VignetteIndexEntry{3.3 Question Formatting}
%\VignetteEngine{knitr::rmarkdown}
\usepackage[utf8]{inputenc}
---
Expand Down
4 changes: 2 additions & 2 deletions vignettes/question_types.Rmd
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
title: "Question Types"
title: "3.2 Question Types"
output: rmarkdown::html_vignette
vignette: >
%\VignetteIndexEntry{Question Types}
%\VignetteIndexEntry{3.2 Question Types}
%\VignetteEngine{knitr::rmarkdown}
\usepackage[utf8]{inputenc}
---
Expand Down
Loading

0 comments on commit b69e74f

Please sign in to comment.