diff --git a/CHANGELOG.md b/CHANGELOG.md index 5c642c4b43..ad1dacda5c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,6 +24,12 @@ For the full list of changes, see the [release][0.8.0] notes. **Breaking changes**: +- **Page feedback**, or [User feedback]: + - Feedback-event attribute changes: + - Event `name`` is `page_helpful`rather than`click` + - Event `value` for "yes" is 100 by default, rather than 1, allowing for + more response options in the future. To override the default set + `params.ui.feedback.max_value`. - SCSS: `@function prepend()` and file `assets/scss/support/_functions.scss` have been dropped. Instead use the more general SASS/SCSS list `join()` function ([#1385]). @@ -34,6 +40,8 @@ For the full list of changes, see the [release][0.8.0] notes. [#1385]: https://github.com/google/docsy/issues/1385 [0.8.0]: https://github.com/google/docsy/releases/v0.8.0/#FIXME +[User feedback]: + https://www.docsy.dev/docs/adding-content/feedback/#user-feedback ## 0.7.2 diff --git a/layouts/partials/feedback.html b/layouts/partials/feedback.html index c13156b306..76ef03d3b5 100644 --- a/layouts/partials/feedback.html +++ b/layouts/partials/feedback.html @@ -45,7 +45,8 @@

{{- i18n "feedback_title" -}}

yesButton.addEventListener('click', () => { yesResponse.classList.add('feedback--response__visible'); disableButtons(); - sendFeedback(1); + {{ $maxValue := .max_value | default 100 -}} + sendFeedback({{ $maxValue }}); }); noButton.addEventListener('click', () => { noResponse.classList.add('feedback--response__visible'); diff --git a/userguide/content/en/docs/adding-content/feedback.md b/userguide/content/en/docs/adding-content/feedback.md index c6c401c9b3..b3a2503b46 100644 --- a/userguide/content/en/docs/adding-content/feedback.md +++ b/userguide/content/en/docs/adding-content/feedback.md @@ -94,7 +94,7 @@ of every documentation page, as shown in Figure 1. After clicking **Yes** the user should see a response like Figure 2. You can -[configure] the response text in the project's [configuration file] `hugo.toml`. +[configure] the response text in your project's [configuration file].