marineenergy / www

Marine hydrokinetic energy & environmental compliance, website
https://marineenergy.app
MIT License
1 stars 1 forks source link

Need to create feedback form for users to document use and identification of bugs #32

Open Neil-Swanson opened 2 years ago

Neil-Swanson commented 2 years ago

Created draft questions on Google Drive for review; received feedback from everyone and generated a Google Form for testing.

Draft form: Marine Energy Toolkit Feedback Form

Responses: Linked Responses Google Sheet

@geocoug , @bbest , @cdobbelaere - please test the feedback form and let me know if you have any suggestions.

bbest commented 2 years ago

Two uses:

  1. Systematic survey. Ask users to explore content and give targeted feedback based on a curated set of questions.
  2. Report a bug. Fill out generic form, preferably with the starting URL from where the page the user was at, and allow feedback. We could direct users to a pre-filled out form per repo:
    • www
    • apps

This could use this trick Google Surveys -- a way to pass URL parameters into survey? - Stack Overflow to obtain url, eg:

  1. fill out form and inspect source to find entry. Screen Shot 2021-12-15 at 2 19 12 PM
  2. form URL from page based on populating this: \ https://docs.google.com/forms/d/e/1FAIpQLSfpDqJqvk5IEnMiqJv93Tw0W9XyE7oINI1fV_IrC5f8N-TdqQ/viewform?entry.362836173=1%20-%20Not%20Likely
  3. and the form gets prepopulated: \ image
bbest commented 2 years ago
<script>
// replace __js-replace_by_bug-url__.html in menu with 

document.getElementById("demo").innerHTML =
"Page location is " + window.location.href;

!expr paste0('https://docs.google.com/forms/d/e/1FAIpQLSfOKbx4Y_hNUjSj8gfuTuzvTFTIaBDJCojDoNThvkZImc6ZsA/viewform?entry.738205286=https://www.marineenergy.app/', fs::path_ext_set(knitr::current_input(), '.html'))
// http://www.javascripter.net/faq/searchin.htm

</script>
bbest commented 2 years ago

Thanks to @geocoug, got this to work with some JQuery JavaScript per commit https://github.com/marineenergy/www/commit/80c31952c1c482beb2b64cbc25c4e33ab57fb0c4: implemented menu 'Report a Bug' for regs-state #32 but commented out until later able to implement in footer for all pages:

<script>
// replace __js-replace_by_bug-url__.html in menu with 

$("a:contains('Report a Bug')").attr("href", "`r paste0('https://docs.google.com/forms/d/e/1FAIpQLSfOKbx4Y_hNUjSj8gfuTuzvTFTIaBDJCojDoNThvkZImc6ZsA/viewform?entry.738205286=https://www.marineenergy.app/', fs::path_ext_set(knitr::current_input(), '.html'))`");

</script>

Example:

https://www-dev.marineenergy.app/regs-state.html image