From 529715dce984ff7e8c7b84bdc6526899ebdf6e48 Mon Sep 17 00:00:00 2001 From: Eric Dunsworth <1907279+EricDunsworth@users.noreply.github.com> Date: Tue, 6 Dec 2022 11:21:43 -0500 Subject: [PATCH 1/2] Page feedback tool: Revamp General: * Rename "page success widget" to "page feedback tool" * Turn it into a site component Jekyll: * Change the tool into an include * Use sub-includes for parameter/string variable declarations * Add a pageFeedback variable to enable the tool in page templates * Add pageFeedback sub-variables to optionally override the default values of the tool's form parameters: * institutionopt * themeopt * sectionopt * pageTitle (true re-uses the current page's title, without " - Canada.ca") * language (true re-uses the current page's language) * submissionPage (true re-uses the current page's URL) * Update the page details footer include to accommodate the tool: * Declare col-modified = "col-xs-12" only once at the beginning of variable assignments * Support pageFeedback and prioritize it over report a problem * Make pageFeedback take priority over noReportProblem (i.e. setting former to true and latter to false will show the page feedback tool) SCSS: * Add new classes (tied to the gc-pft class): * nojs-col-sm-12 * nojs-pr-sm-0 * nojs-text-left * Increase the share widget's top margin to make it look vertically-centered when used alongside the tool in small/medium view and over * Depends on the has() pseudo-class HTML: * Rename the gc-pg-hlpfl id/class prefix to gc-pft * Rename the gc-pg-hlpfl-btn class to gc-pft-btns ("s" suffix) * Use a fieldset for "Did you find what you were looking for?" and its yes/no buttons * Change "Did you find what you were looking for?" into a legend * Improve layout: * Remove heading classes * Use form classes (i.e. chkbxrdio-grp, field-name and form-group) * Increase spacing between groups of content * Move the details field's secondary information paragraph below the field * JS mode: * Center-align "Did you find what you were looking for?" in extra-small view * Vertically-center "Did you find what you were looking for?" and yes/no buttons in small view and over * Noscript/Basic HTML mode: * Position the yes button directly below "Did you find what you were looking for?" in all views * Use aria-live regions to announce transition messages to screen reader users: * "Tell us why below:" upon pressing the no button * "Thank you for your feedback." upon pressing the yes button or submitting the no button's questionnaire * Add aria-describedby attributes to: * Programmatically-associate the yes button to the "If not, tell us why below:" paragraph in noscript/basic HTML mode (to make screen readers announce the no button's instructions right after the yes button) * Programmatically-associate the secondary information paragraph to the more details field Content: * Add a visually-hidden "Page feedback" H3 heading * Add a period to the end of "Thank you for your feedback" * Add "below" to the end of "If not, tell us why:" in noscript/basic HTML mode * Add a visually-hidden "Tell us why below:" paragraph in JS mode * Combine "Please provide more details" and "Maximum 300 characters" into the same label * Write all values in an "EN-FR" format, derived from labels Demo pages: * Add a standard demo page (pageFeedback enabled) * Add a custom demo page (pageFeedback with sub-variables) Provisional functionality page: * Portray the widget as stable in the feature availability table * Remove "page success widget" section/example Co-authored-by: David Elisma --- _data/sites.json | 44 +++++++ .../gc-page-feedback/gc-page-feedback.html | 12 ++ _includes/page-details/footer.html | 45 +++++++ components/provisional-en.html | 90 ++----------- components/provisional-fr.html | 91 ++----------- sites/gc-page-feedback/_base.scss | 24 ++++ sites/gc-page-feedback/_print.scss | 7 + sites/gc-page-feedback/_screen-sm-min.scss | 14 ++ .../gc-page-feedback-custom-en.html | 29 +++++ .../gc-page-feedback-custom-fr.html | 29 +++++ .../gc-page-feedback/gc-page-feedback-en.html | 23 ++++ .../gc-page-feedback/gc-page-feedback-fr.html | 23 ++++ sites/gc-page-feedback/includes/css.html | 121 ++++++++++++++++++ .../includes/gc-page-feedback.html | 62 +++++++++ .../includes/parameters.liquid | 57 +++++++++ .../gc-page-feedback/includes/strings.liquid | 58 +++++++++ sites/gc-page-feedback/index.json-ld | 44 +++++++ sites/page-details/_base.scss | 14 +- sites/page-details/_screen-md-min.scss | 16 +++ sites/page-details/_screen-sm-min.scss | 16 +++ sites/page-details/includes/footer.html | 26 ++-- sites/theme.scss | 5 + 22 files changed, 671 insertions(+), 179 deletions(-) create mode 100644 _includes/gc-page-feedback/gc-page-feedback.html create mode 100644 _includes/page-details/footer.html create mode 100644 sites/gc-page-feedback/_base.scss create mode 100644 sites/gc-page-feedback/_print.scss create mode 100644 sites/gc-page-feedback/_screen-sm-min.scss create mode 100644 sites/gc-page-feedback/gc-page-feedback-custom-en.html create mode 100644 sites/gc-page-feedback/gc-page-feedback-custom-fr.html create mode 100644 sites/gc-page-feedback/gc-page-feedback-en.html create mode 100644 sites/gc-page-feedback/gc-page-feedback-fr.html create mode 100644 sites/gc-page-feedback/includes/css.html create mode 100644 sites/gc-page-feedback/includes/gc-page-feedback.html create mode 100644 sites/gc-page-feedback/includes/parameters.liquid create mode 100644 sites/gc-page-feedback/includes/strings.liquid create mode 100644 sites/gc-page-feedback/index.json-ld create mode 100644 sites/page-details/_screen-md-min.scss create mode 100644 sites/page-details/_screen-sm-min.scss diff --git a/_data/sites.json b/_data/sites.json index 1936294d9..9836b9390 100644 --- a/_data/sites.json +++ b/_data/sites.json @@ -354,6 +354,50 @@ ] } } +,{ + "@context": { + "@version": 1.1, + "dct": "http://purl.org/dc/terms/", + "title": { "@id": "dct:title", "@container": "@language" }, + "description": { "@id": "dct:description", "@container": "@language" }, + "modified": "dct:modified" + }, + "title": { + "en": "Page feedback tool", + "fr": "Outil de rétroaction sur la page" + }, + "description": { + "en": "Page feedback tool for Canada.ca", + "fr": "Outil de rétroaction sur la page pour Canada.ca" + }, + "modified": "2022-12-06", + "componentName": "gc-page-feedback", + "status": "stable", + "pages": { + "examples": [ + { + "title": "Page feedback tool", + "language": "en", + "path": "gc-page-feedback-en.html" + }, + { + "title": "Outil de rétroaction sur la page", + "language": "fr", + "path": "gc-page-feedback-fr.html" + }, + { + "title": "Page feedback tool with custom parameters", + "language": "en", + "path": "gc-page-feedback-custom-en.html" + }, + { + "title": "Outil de rétroaction sur la page avec paramètres personnalisés", + "language": "fr", + "path": "gc-page-feedback-custom-fr.html" + } + ] + } +} ,{ "@context": { "@version": 2.0, diff --git a/_includes/gc-page-feedback/gc-page-feedback.html b/_includes/gc-page-feedback/gc-page-feedback.html new file mode 100644 index 000000000..d614cd7e3 --- /dev/null +++ b/_includes/gc-page-feedback/gc-page-feedback.html @@ -0,0 +1,12 @@ + +{%- if page.dir == "/sites/gc-page-feedback/" -%} + {%- include_relative includes/css.html -%} + {%- include_relative includes/gc-page-feedback.html -%} +{%- else -%} +

Error: The page feedback tool only can only be activated in pages located at "sites/gc-page-feedback/*.html".

+{%- endif -%} diff --git a/_includes/page-details/footer.html b/_includes/page-details/footer.html new file mode 100644 index 000000000..cad6a7932 --- /dev/null +++ b/_includes/page-details/footer.html @@ -0,0 +1,45 @@ + + diff --git a/components/provisional-en.html b/components/provisional-en.html index 60511cbec..6ee0430af 100644 --- a/components/provisional-en.html +++ b/components/provisional-en.html @@ -7,7 +7,7 @@ { "title": "GCWeb home", "link": "https://wet-boew.github.io/themes-dist/GCWeb/index-en.html" } ], "secondlevel": false, - "dateModified": "2021-01-19", + "dateModified": "2022-12-06", "share": "true" } --- @@ -93,9 +93,16 @@

Provisional feature removal first notice

Template .gc-pg-hlpfl - "Page success widget" design pattern to let users share their experience on the page. + +

"Page success widget" design pattern to let users share their experience on the page.

+

Feature has been revised and renamed to "page feedback tool" (.gc-pft):

+ + v7.0 - + Stable (vX.X.X) (TODO) Plugin .wb-chtwzrd @@ -402,80 +409,3 @@

Icon warning color

With "provisional icon-warning-light" class

-

Page success widget

-

Planned to eventually replace Report a problem. Uses multiple features: wb-postback and data-wb-doaction plugins, as well as nojs-* styles and Font Awesome.

-
-
-
-
-
- - - - -
-
-
-

Did you find what you were looking for?

-
-
- - -
-
-
- -
-
- What was wrong? -
- -
-
- -
-
- -
-
- -
-
- -
-
- -

- (Don’t include any personal information) -
- Maximum 300 characters -

- - -
-
-
-

Thank you for your feedback

-
-
-
-
-
diff --git a/components/provisional-fr.html b/components/provisional-fr.html index 253deb5b9..5f95f0a38 100644 --- a/components/provisional-fr.html +++ b/components/provisional-fr.html @@ -7,7 +7,7 @@ { "title": "Accueil GCWeb", "link": "https://wet-boew.github.io/themes-dist/GCWeb/index-fr.html" } ], "secondlevel": false, - "dateModified": "2021-01-19", + "dateModified": "2022-12-06", "share": "true" } --- @@ -95,9 +95,16 @@

Provisional feature removal first notice

Gabarit .gc-pg-hlpfl - "Widget succès de page" configuration de conception pour laisser les utilisateurs partager leur expérience sur la page. + +

"Widget succès de page" configuration de conception pour laisser les utilisateurs partager leur expérience sur la page.

+

Cette fonctionnalité a été révisée et renommée « outil de rétroaction sur la page » (.gc-pft) :

+ + v7.0 - + Stable (vX.X.X) (TODO) Plugin .wb-chtwzrd @@ -408,81 +415,3 @@

Icon warning color

-

Widget succès de page

-

Est prévu pour remplacer Signaler un problème ou une erreur sur cette page éventuellement. Utilises plusieurs fonctionnalités : les plugiciels wb-postback et data-wb-doaction, ainsi que les styles nojs-* puis Font Awesome.

-
-
-
-
-
- - - - -
-
-
-

Avez-vous trouvé ce que vous cherchiez?

-
-
- - -
-
-
- -
-
- Qu’est-ce qui n’allait pas? -
- -
-
- -
-
- -
-
- -
-
- -
-
- -

- (N’incluez pas d’information personnelle) -
- Maximum de 300 caractères -

- -
- -
-
-
-

Merci de vos commentaires

-
-
-
-
-
diff --git a/sites/gc-page-feedback/_base.scss b/sites/gc-page-feedback/_base.scss new file mode 100644 index 000000000..10692aba5 --- /dev/null +++ b/sites/gc-page-feedback/_base.scss @@ -0,0 +1,24 @@ +/* + @title: Page feedback tool - Base + */ + +/* In noscript/basic HTML mode... */ +.no-js, +.wb-disable { + .gc-pft { + /* Disable row gutters (default selector isn't specific-enough) */ + .row-no-gutters { + @extend .row-no-gutters; + } + + /* Make the legend full width */ + .nojs-col-sm-12 { + @extend .col-sm-12; + } + + /* Left-align the legend and yes/no buttons */ + .nojs-text-left { + text-align: left; + } + } +} diff --git a/sites/gc-page-feedback/_print.scss b/sites/gc-page-feedback/_print.scss new file mode 100644 index 000000000..5f9c4031d --- /dev/null +++ b/sites/gc-page-feedback/_print.scss @@ -0,0 +1,7 @@ +/* + @title: Page feedback tool - Print view + */ + +.gc-pft { + @extend %gcweb-print-display-none-important; +} diff --git a/sites/gc-page-feedback/_screen-sm-min.scss b/sites/gc-page-feedback/_screen-sm-min.scss new file mode 100644 index 000000000..72627320f --- /dev/null +++ b/sites/gc-page-feedback/_screen-sm-min.scss @@ -0,0 +1,14 @@ +/* + @title: Page feedback tool - Small view and over + */ + +/* In noscript/basic HTML mode... */ +.no-js, +.wb-disable { + .gc-pft { + /* Disable the legend's right padding */ + .nojs-pr-sm-0 { + padding-right: 0 !important; + } + } +} diff --git a/sites/gc-page-feedback/gc-page-feedback-custom-en.html b/sites/gc-page-feedback/gc-page-feedback-custom-en.html new file mode 100644 index 000000000..00b0b2f1e --- /dev/null +++ b/sites/gc-page-feedback/gc-page-feedback-custom-en.html @@ -0,0 +1,29 @@ +--- +{ + "altLangPage": "gc-page-feedback-custom-fr.html", + "breadcrumbs": [ + { "title": "GCWeb home", "link": "https://wet-boew.github.io/GCWeb/index-en.html" } + ], + "css": ["https://use.fontawesome.com/releases/v5.15.4/css/all.css"], + "dateModified": "2022-12-06", + "description": "Page feedback tool for Canada.ca", + "language": "en", + "title": "Page feedback tool with custom parameters", + "pageFeedback": { + "institutionopt": "Custom institution", + "themeopt": "Custom theme", + "sectionopt": "Custom section", + "pageTitle": "true", + "language": "true", + "submissionPage": "true" + } +} +--- +
+ +

HTML code

+{%- comment -%} Manually-included variable-core.liquid so that gc-page-feedback.html's code sample can use the i18nText-lang variable {%- endcomment -%} +{% include variable-core.liquid %} +{% highlight text %} +{% include_relative includes/gc-page-feedback.html %} +{% endhighlight %} diff --git a/sites/gc-page-feedback/gc-page-feedback-custom-fr.html b/sites/gc-page-feedback/gc-page-feedback-custom-fr.html new file mode 100644 index 000000000..e2b493dc3 --- /dev/null +++ b/sites/gc-page-feedback/gc-page-feedback-custom-fr.html @@ -0,0 +1,29 @@ +--- +{ + "altLangPage": "gc-page-feedback-custom-en.html", + "breadcrumbs": [ + { "title": "Accueil GCWeb", "link": "https://wet-boew.github.io/GCWeb/index-fr.html" } + ], + "css": ["https://use.fontawesome.com/releases/v5.15.4/css/all.css"], + "dateModified": "2022-12-06", + "description": "Outil de rétroaction sur la page pour Canada.ca", + "language": "fr", + "title": "Outil de rétroaction sur la page avec paramètres personnalisés", + "pageFeedback": { + "institutionopt": "Institution personnalisée", + "themeopt": "Thème personnalisé", + "sectionopt": "Section personnalisée", + "pageTitle": "true", + "language": "true", + "submissionPage": "true" + } +} +--- +
+ +

Code HTML

+{%- comment -%} Manually-included variable-core.liquid so that gc-page-feedback.html's code sample can use the i18nText-lang variable {%- endcomment -%} +{% include variable-core.liquid %} +{% highlight text %} +{% include_relative includes/gc-page-feedback.html %} +{% endhighlight %} diff --git a/sites/gc-page-feedback/gc-page-feedback-en.html b/sites/gc-page-feedback/gc-page-feedback-en.html new file mode 100644 index 000000000..7bebd0b85 --- /dev/null +++ b/sites/gc-page-feedback/gc-page-feedback-en.html @@ -0,0 +1,23 @@ +--- +{ + "altLangPage": "gc-page-feedback-fr.html", + "breadcrumbs": [ + { "title": "GCWeb home", "link": "https://wet-boew.github.io/GCWeb/index-en.html" } + ], + "css": ["https://use.fontawesome.com/releases/v5.15.4/css/all.css"], + "dateModified": "2022-12-06", + "description": "Page feedback tool for Canada.ca", + "language": "en", + "title": "Page feedback tool", + "pageFeedback": "true", + "share": "true" +} +--- +
+ +

HTML code

+{%- comment -%} Manually-included variable-core.liquid so that gc-page-feedback.html's code sample can use the i18nText-lang variable {%- endcomment -%} +{% include variable-core.liquid %} +{% highlight text %} +{% include_relative includes/gc-page-feedback.html %} +{% endhighlight %} diff --git a/sites/gc-page-feedback/gc-page-feedback-fr.html b/sites/gc-page-feedback/gc-page-feedback-fr.html new file mode 100644 index 000000000..636ff3119 --- /dev/null +++ b/sites/gc-page-feedback/gc-page-feedback-fr.html @@ -0,0 +1,23 @@ +--- +{ + "altLangPage": "gc-page-feedback-en.html", + "breadcrumbs": [ + { "title": "Accueil GCWeb", "link": "https://wet-boew.github.io/GCWeb/index-fr.html" } + ], + "css": ["https://use.fontawesome.com/releases/v5.15.4/css/all.css"], + "dateModified": "2022-12-06", + "description": "Outil de rétroaction sur la page pour Canada.ca", + "language": "fr", + "title": "Outil de rétroaction sur la page", + "pageFeedback": "true", + "share": "true" +} +--- +
+ +

Code HTML

+{%- comment -%} Manually-included variable-core.liquid so that gc-page-feedback.html's code sample can use the i18nText-lang variable {%- endcomment -%} +{% include variable-core.liquid %} +{% highlight text %} +{% include_relative includes/gc-page-feedback.html %} +{% endhighlight %} diff --git a/sites/gc-page-feedback/includes/css.html b/sites/gc-page-feedback/includes/css.html new file mode 100644 index 000000000..6c703f071 --- /dev/null +++ b/sites/gc-page-feedback/includes/css.html @@ -0,0 +1,121 @@ + diff --git a/sites/gc-page-feedback/includes/gc-page-feedback.html b/sites/gc-page-feedback/includes/gc-page-feedback.html new file mode 100644 index 000000000..6acde9c18 --- /dev/null +++ b/sites/gc-page-feedback/includes/gc-page-feedback.html @@ -0,0 +1,62 @@ +{%- include_relative includes/parameters.liquid -%} +{%- include_relative includes/strings.liquid -%} + +
+
+
+

{{ pft_h3 }}

+
+ + + + + + +
+ {{ pft_legend }} +
+ +
+
+ + +
+
+
+

{{ pft_why_note_nojs }}

+

{{ pft_why_note_js }}

+
+
+ {{ pft_no_legend }} +
+ +
+
+ +
+
+ +
+
+ +
+ +
+
+ + +

{{ pft_problem6_note }}

+
+ +
+
+
+
+

{{ pft_submit_message }}

+
+
+
+
diff --git a/sites/gc-page-feedback/includes/parameters.liquid b/sites/gc-page-feedback/includes/parameters.liquid new file mode 100644 index 000000000..e17fb3b00 --- /dev/null +++ b/sites/gc-page-feedback/includes/parameters.liquid @@ -0,0 +1,57 @@ +{%- comment -%} +Set parameter variables +{%- endcomment -%} + +{%- capture pft_institutionopt_value -%} + {%- if page.pageFeedback.institutionopt -%} + {{ page.pageFeedback.institutionopt }} + {%- else -%} + Institution - required - must use same abbreviation value EN and FR + {%- endif -%} +{%- endcapture -%} + +{%- capture pft_themeopt_value -%} + {%- if page.pageFeedback.themeopt -%} + {{ page.pageFeedback.themeopt }} + {%- else -%} + Theme - required - must use same value EN and FR + {%- endif -%} +{%- endcapture -%} + +{%- capture pft_sectionopt_value -%} + {%- if page.pageFeedback.sectionopt -%} + {{ page.pageFeedback.sectionopt }} + {%- else -%} + Section - required but can be blank - same value EN and FR + {%- endif -%} +{%- endcapture -%} + +{%- capture pft_pageTitle_value -%} + {%- if page.pageFeedback.pageTitle == "true" -%} + {{ page.title }} + {%- elsif page.pageFeedback.title -%} + {{ page.pageFeedback.pageTitle }} + {%- else -%} + Page title (EN) - required + {%- endif -%} +{%- endcapture -%} + +{%- capture pft_language_value -%} + {%- if page.pageFeedback.language == "true" -%} + {{ i18nText-lang }} + {%- elsif page.pageFeedback.language -%} + {{ page.pageFeedback.language }} + {%- else -%} + Language - required - use EN or FR + {%- endif -%} +{%- endcapture -%} + +{%- capture pft_submissionPage_value -%} + {%- if page.pageFeedback.submissionPage == "true" -%} + {{ page.url | absolute_url }} + {%- elsif page.pageFeedback.submissionPage -%} + {{ page.pageFeedback.submissionPage }} + {%- else -%} + Page URL - required + {%- endif -%} +{%- endcapture -%} diff --git a/sites/gc-page-feedback/includes/strings.liquid b/sites/gc-page-feedback/includes/strings.liquid new file mode 100644 index 000000000..20f8155e2 --- /dev/null +++ b/sites/gc-page-feedback/includes/strings.liquid @@ -0,0 +1,58 @@ +{%- comment -%} +Set string variables +{%- endcomment -%} + +{%- assign pft_yes_en = "Yes" -%} +{%- assign pft_no_en = "No" -%} +{%- assign pft_problem1_label_en = "I can’t find the information" -%} +{%- assign pft_problem2_label_en = "The information is hard to understand" -%} +{%- assign pft_problem3_label_en = "There was an error or something didn’t work" -%} +{%- assign pft_problem4_label_en = "Other reason" -%} + +{%- assign pft_yes_fr = "Oui" -%} +{%- assign pft_no_fr = "Non" -%} +{%- assign pft_problem1_label_fr = "Je ne peux pas trouver l’information" -%} +{%- assign pft_problem2_label_fr = "L’information est difficile à comprendre" -%} +{%- assign pft_problem3_label_fr = "Il y avait une erreur ou quelque chose ne fonctionnait pas" -%} +{%- assign pft_problem4_label_fr = "Autre raison" -%} + +{%- assign pft_yes_value = pft_yes_en | append: "-" | append: pft_yes_fr -%} +{%- assign pft_no_value = pft_no_en | strip_html | append: "-" | append: pft_no_fr | strip_html -%} +{%- assign pft_problem1_value = pft_problem1_label_en | strip_html | append: "-" | append: pft_problem1_label_fr | strip_html -%} +{%- assign pft_problem2_value = pft_problem2_label_en | strip_html | append: "-" | append: pft_problem2_label_fr | strip_html -%} +{%- assign pft_problem3_value = pft_problem3_label_en | strip_html | append: "-" | append: pft_problem3_label_fr | strip_html -%} +{%- assign pft_problem4_value = pft_problem4_label_en | strip_html | append: "-" | append: pft_problem4_label_fr | strip_html -%} + +{%- if i18nText-lang == "en" -%} + {%- assign pft_h3 = "Page feedback" -%} + {%- assign pft_legend = "Did you find what you were looking for?" -%} + {%- assign pft_yes = pft_yes_en -%} + {%- assign pft_no = pft_no_en -%} + {%- assign pft_why_note_nojs = "If not, tell us why below:" -%} + {%- assign pft_why_note_js = "Tell us why below:" -%} + {%- assign pft_no_legend = "What was wrong?" -%} + {%- assign pft_problem1_label = pft_problem1_label_en -%} + {%- assign pft_problem2_label = pft_problem2_label_en -%} + {%- assign pft_problem3_label = pft_problem3_label_en -%} + {%- assign pft_problem4_label = pft_problem4_label_en -%} + {%- assign pft_problem6_label = "Please provide more details (maximum 300 characters)" -%} + {%- assign pft_problem6_note = "You will not receive a reply. Telephone numbers and email addresses will be removed." -%} + {%- assign pft_submit = "Submit" -%} + {%- assign pft_submit_message = "Thank you for your feedback." -%} +{%- elsif i18nText-lang == "fr" -%} + {%- assign pft_h3 = "Rétroaction sur la page" -%} + {%- assign pft_legend = "Avez-vous trouvé ce que vous cherchiez?" -%} + {%- assign pft_yes = pft_yes_fr -%} + {%- assign pft_no = pft_no_fr -%} + {%- assign pft_why_note_nojs = "Sinon, dites nous pourquoi ci-dessous :" -%} + {%- assign pft_why_note_js = "Dites nous pourquoi ci-dessous :" -%} + {%- assign pft_no_legend = "Qu’est-ce qui n’allait pas?" -%} + {%- assign pft_problem1_label = pft_problem1_label_fr -%} + {%- assign pft_problem2_label = pft_problem2_label_fr -%} + {%- assign pft_problem3_label = pft_problem3_label_fr -%} + {%- assign pft_problem4_label = pft_problem4_label_fr -%} + {%- assign pft_problem6_label = "Veuillez fournir plus de détails (maximum de 300 caractères)" -%} + {%- assign pft_problem6_note = "Vous ne recevrez aucune réponse. Les numéros de téléphone et les adresses électroniques seront supprimés." -%} + {%- assign pft_submit = "Soumettre" -%} + {%- assign pft_submit_message = "Merci de vos commentaires." -%} +{%- endif -%} diff --git a/sites/gc-page-feedback/index.json-ld b/sites/gc-page-feedback/index.json-ld new file mode 100644 index 000000000..b9e019806 --- /dev/null +++ b/sites/gc-page-feedback/index.json-ld @@ -0,0 +1,44 @@ +{ + "@context": { + "@version": 1.1, + "dct": "http://purl.org/dc/terms/", + "title": { "@id": "dct:title", "@container": "@language" }, + "description": { "@id": "dct:description", "@container": "@language" }, + "modified": "dct:modified" + }, + "title": { + "en": "Page feedback tool", + "fr": "Outil de rétroaction sur la page" + }, + "description": { + "en": "Page feedback tool for Canada.ca", + "fr": "Outil de rétroaction sur la page pour Canada.ca" + }, + "modified": "2022-12-06", + "componentName": "gc-page-feedback", + "status": "stable", + "pages": { + "examples": [ + { + "title": "Page feedback tool", + "language": "en", + "path": "gc-page-feedback-en.html" + }, + { + "title": "Outil de rétroaction sur la page", + "language": "fr", + "path": "gc-page-feedback-fr.html" + }, + { + "title": "Page feedback tool with custom parameters", + "language": "en", + "path": "gc-page-feedback-custom-en.html" + }, + { + "title": "Outil de rétroaction sur la page avec paramètres personnalisés", + "language": "fr", + "path": "gc-page-feedback-custom-fr.html" + } + ] + } +} diff --git a/sites/page-details/_base.scss b/sites/page-details/_base.scss index 82b9c7626..f1029d698 100644 --- a/sites/page-details/_base.scss +++ b/sites/page-details/_base.scss @@ -76,15 +76,15 @@ main { } } - .well { - margin: { - left: -$details-identation; - right: -$details-identation; - } - } - details { margin-bottom: 0; + + .well { + margin: { + left: -$details-identation; + right: -$details-identation; + } + } } // Add a top margin on the share button (only if its plugin has initialized). diff --git a/sites/page-details/_screen-md-min.scss b/sites/page-details/_screen-md-min.scss new file mode 100644 index 000000000..cf064c9a5 --- /dev/null +++ b/sites/page-details/_screen-md-min.scss @@ -0,0 +1,16 @@ +/* + * Share/feedback-specific overrides (medium view and over) + */ + +/* Add a larger top margin on the share button (only if its plugin has initialized) if adjacent to the page feedback tool. */ +.pagedetails { + div { + &:has( .gc-pft ) { + + { + .wb-share-inited { + margin-top: 21px; + } + } + } + } +} diff --git a/sites/page-details/_screen-sm-min.scss b/sites/page-details/_screen-sm-min.scss new file mode 100644 index 000000000..086e58e36 --- /dev/null +++ b/sites/page-details/_screen-sm-min.scss @@ -0,0 +1,16 @@ +/* + * Share/feedback-specific overrides (small view and over) + */ + +/* Add a larger top margin on the share button (only if its plugin has initialized) if adjacent to the page feedback tool. */ +.pagedetails { + div { + &:has( .gc-pft ) { + + { + .wb-share-inited { + margin-top: 29px; + } + } + } + } +} diff --git a/sites/page-details/includes/footer.html b/sites/page-details/includes/footer.html index 43abe5ae6..76b3e36c9 100644 --- a/sites/page-details/includes/footer.html +++ b/sites/page-details/includes/footer.html @@ -1,27 +1,31 @@

{{ i18nText-pageDetails }}

- {%- if page.noReportProblem -%} + {% assign col-modified = "col-xs-12" %} + {%- if page.pageFeedback or page.noReportProblem != true -%} + {% assign col-feedback = "col-sm-8 col-md-9 col-lg-9" %} {%- if page.share -%} - {% assign col-share = "col-sm-4 col-md-3 col-sm-push-8 col-md-push-9" %} - {% assign col-modified = "col-sm-6 col-md-5 col-lg-4 col-sm-pull-4 col-md-pull-3" %} - {%- else -%} - {% assign col-modified = "col-xs-12" %} + {% assign col-share = "col-sm-4 col-md-3" %} {%- endif -%} {%- else -%} - {% assign col-feedback = "col-sm-8 col-md-9 col-lg-9" %} {%- if page.share -%} - {% assign col-share = "col-sm-4 col-md-3" %} + {% assign col-share = "col-sm-4 col-md-3 col-sm-push-8 col-md-push-9" %} + {% assign col-modified = "col-sm-6 col-md-5 col-lg-4 col-sm-pull-4 col-md-pull-3" %} {%- endif -%} - {% assign col-modified = "col-xs-12" %} {%- endif -%}
- {%- unless page.noReportProblem -%} + {%- if page.pageFeedback or page.noReportProblem != true -%} - {%- endunless -%} + {%- endif -%} {%- if page.share -%} {%- endif -%} diff --git a/sites/theme.scss b/sites/theme.scss index 32b29ef13..eb1999684 100644 --- a/sites/theme.scss +++ b/sites/theme.scss @@ -74,6 +74,7 @@ @import "search/base"; @import "secondary-menu/base"; @import "page-details/base"; +@import "gc-page-feedback/base"; @import "gcweb-menu/base"; @import "authentication/base"; @import "header/base"; @@ -311,6 +312,7 @@ @import "baseline/lists/screen-md-min"; @import "gcweb-menu/screen-md-min"; + @import "page-details/screen-md-min"; @import "wet-boew/src/plugins/feeds/screen-md-min"; @import "wet-boew/src/plugins/tabs/screen-md-min"; @@ -366,6 +368,8 @@ @import "wet-boew/src/base/views/screen-sm-min-to-screen-sm-max"; @import "search/screen-sm-min-to-screen-sm-max"; + @import "page-details/screen-sm-min"; + @import "gc-page-feedback/screen-sm-min"; @import "../templates/campaign/screen-sm-min-to-screen-sm-max"; } @@ -406,6 +410,7 @@ @import "search/print"; @import "secondary-menu/print"; @import "page-details/print"; + @import "gc-page-feedback/print"; @import "wet-boew/src/plugins/footnotes/print"; @import "wet-boew/src/plugins/geomap/print"; From 0d812142b3454a00f1040c06323387885147ab01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Garneau?= Date: Fri, 13 Jan 2023 08:21:40 -0500 Subject: [PATCH 2/2] Feedback: implementing Page Feedback Tool --- Gruntfile.coffee | 4 +- _config.yml | 4 +- _data/sites.json | 86 +-- .../gc-page-feedback/gc-page-feedback.html | 12 - _includes/page-details/footer.html | 45 -- package-lock.json | 2 +- .../{gc-page-feedback => feedback}/_base.scss | 17 +- sites/feedback/_print.scss | 7 + .../_screen-md-min.scss | 4 +- .../_screen-sm-min-to-screen-sm-max.scss} | 2 +- .../ajax/deprecated/report-problem-v1-en.html | 57 ++ .../ajax/deprecated/report-problem-v1-fr.html | 57 ++ .../report-problem-v2-en.html | 0 .../report-problem-v2-fr.html | 0 .../ajax/deprecated/report-problem-v3-en.html | 77 ++ .../ajax/deprecated/report-problem-v3-fr.html | 77 ++ .../ajax/deprecated/report-problem-v4-en.html | 93 +++ .../ajax/deprecated/report-problem-v4-fr.html | 92 +++ sites/feedback/ajax/page-feedback-en.html | 84 +++ sites/feedback/ajax/page-feedback-fr.html | 84 +++ sites/feedback/ajax/report-problem-aa-en.html | 107 --- sites/feedback/ajax/report-problem-aa-fr.html | 109 --- sites/feedback/ajax/report-problem-en.html | 4 +- sites/feedback/ajax/report-problem-fr.html | 4 +- sites/feedback/ajax/report-problem-v1-en.html | 54 -- sites/feedback/ajax/report-problem-v1-fr.html | 54 -- sites/feedback/ajax/report-problem-v3-en.html | 78 -- sites/feedback/ajax/report-problem-v3-fr.html | 77 -- sites/feedback/feedback-aa-en.html | 24 - sites/feedback/feedback-aa-fr.html | 24 - sites/feedback/feedback-docs-en.html | 684 +++++++++-------- sites/feedback/feedback-docs-fr.html | 691 +++++++++--------- sites/feedback/feedback-en.html | 31 - sites/feedback/feedback-fr.html | 31 - sites/feedback/includes/feedback.html | 39 +- sites/feedback/index.json-ld | 42 +- sites/feedback/page-feedback-contact-en.html | 31 + sites/feedback/page-feedback-contact-fr.html | 31 + sites/feedback/page-feedback-en.html | 27 + sites/feedback/page-feedback-fr.html | 27 + sites/feedback/report-problem-en.html | 21 + sites/feedback/report-problem-fr.html | 21 + sites/gc-page-feedback/_print.scss | 7 - sites/gc-page-feedback/_screen-sm-min.scss | 14 - .../gc-page-feedback-custom-en.html | 29 - .../gc-page-feedback-custom-fr.html | 29 - .../gc-page-feedback/gc-page-feedback-en.html | 23 - .../gc-page-feedback/gc-page-feedback-fr.html | 23 - sites/gc-page-feedback/includes/css.html | 121 --- .../includes/gc-page-feedback.html | 62 -- .../includes/parameters.liquid | 57 -- .../gc-page-feedback/includes/strings.liquid | 58 -- sites/gc-page-feedback/index.json-ld | 44 -- sites/includes/settings.liquid | 1 + sites/page-details/includes/footer.html | 12 +- .../page-details-without-buttons-en.html | 2 +- .../page-details-without-buttons-fr.html | 2 +- .../page-details-without-report-btn-en.html | 2 +- .../page-details-without-report-btn-fr.html | 2 +- sites/theme.scss | 9 +- templates/home/home-en.html | 2 +- templates/home/home-fr.html | 2 +- templates/thematic/dark-theme-home-en.html | 2 +- templates/thematic/dark-theme-home-fr.html | 2 +- templates/thematic/pink-day-home-en.html | 2 +- templates/thematic/pink-day-home-fr.html | 2 +- 66 files changed, 1588 insertions(+), 1936 deletions(-) delete mode 100644 _includes/gc-page-feedback/gc-page-feedback.html delete mode 100644 _includes/page-details/footer.html rename sites/{gc-page-feedback => feedback}/_base.scss (66%) create mode 100644 sites/feedback/_print.scss rename sites/{page-details => feedback}/_screen-md-min.scss (85%) rename sites/{page-details/_screen-sm-min.scss => feedback/_screen-sm-min-to-screen-sm-max.scss} (93%) create mode 100644 sites/feedback/ajax/deprecated/report-problem-v1-en.html create mode 100644 sites/feedback/ajax/deprecated/report-problem-v1-fr.html rename sites/feedback/ajax/{ => deprecated}/report-problem-v2-en.html (100%) rename sites/feedback/ajax/{ => deprecated}/report-problem-v2-fr.html (100%) create mode 100644 sites/feedback/ajax/deprecated/report-problem-v3-en.html create mode 100644 sites/feedback/ajax/deprecated/report-problem-v3-fr.html create mode 100644 sites/feedback/ajax/deprecated/report-problem-v4-en.html create mode 100644 sites/feedback/ajax/deprecated/report-problem-v4-fr.html create mode 100644 sites/feedback/ajax/page-feedback-en.html create mode 100644 sites/feedback/ajax/page-feedback-fr.html delete mode 100644 sites/feedback/ajax/report-problem-aa-en.html delete mode 100644 sites/feedback/ajax/report-problem-aa-fr.html delete mode 100644 sites/feedback/ajax/report-problem-v1-en.html delete mode 100644 sites/feedback/ajax/report-problem-v1-fr.html delete mode 100644 sites/feedback/ajax/report-problem-v3-en.html delete mode 100644 sites/feedback/ajax/report-problem-v3-fr.html delete mode 100644 sites/feedback/feedback-aa-en.html delete mode 100644 sites/feedback/feedback-aa-fr.html delete mode 100644 sites/feedback/feedback-en.html delete mode 100644 sites/feedback/feedback-fr.html create mode 100644 sites/feedback/page-feedback-contact-en.html create mode 100644 sites/feedback/page-feedback-contact-fr.html create mode 100644 sites/feedback/page-feedback-en.html create mode 100644 sites/feedback/page-feedback-fr.html create mode 100644 sites/feedback/report-problem-en.html create mode 100644 sites/feedback/report-problem-fr.html delete mode 100644 sites/gc-page-feedback/_print.scss delete mode 100644 sites/gc-page-feedback/_screen-sm-min.scss delete mode 100644 sites/gc-page-feedback/gc-page-feedback-custom-en.html delete mode 100644 sites/gc-page-feedback/gc-page-feedback-custom-fr.html delete mode 100644 sites/gc-page-feedback/gc-page-feedback-en.html delete mode 100644 sites/gc-page-feedback/gc-page-feedback-fr.html delete mode 100644 sites/gc-page-feedback/includes/css.html delete mode 100644 sites/gc-page-feedback/includes/gc-page-feedback.html delete mode 100644 sites/gc-page-feedback/includes/parameters.liquid delete mode 100644 sites/gc-page-feedback/includes/strings.liquid delete mode 100644 sites/gc-page-feedback/index.json-ld diff --git a/Gruntfile.coffee b/Gruntfile.coffee index b8444e205..4eae805d8 100644 --- a/Gruntfile.coffee +++ b/Gruntfile.coffee @@ -557,12 +557,12 @@ module.exports = (grunt) -> # src: "_includes/settings.liquid" jekyllRunLocal: options: - banner: """{%- assign setting-resourcesBasePathTheme = "/<%= distFolder %>/GCWeb" -%}{%- assign setting-resourcesBasePathWetboew = "/<%= distFolder %>/wet-boew" -%}""" + banner: """{%- assign setting-resourcesBasePathTheme = "/<%= distFolder %>/GCWeb" -%}{%- assign setting-resourcesBasePathWetboew = "/<%= distFolder %>/wet-boew" -%}{%- assign setting-root = "" -%}""" position: "bottom" src: "<%= jekyllDist %>/_includes/settings.liquid" jekyllRunDemo: options: - banner: """{%- assign setting-resourcesBasePathTheme = "/wet-boew-demos/""" + grunt.option('branch') + """/<%= distFolder %>/GCWeb" -%}{%- assign setting-resourcesBasePathWetboew = "/wet-boew-demos/""" + grunt.option('branch') + """/<%= distFolder %>/wet-boew" -%}""" + banner: """{%- assign setting-resourcesBasePathTheme = "/wet-boew-demos/""" + grunt.option('branch') + """/<%= distFolder %>/GCWeb" -%}{%- assign setting-resourcesBasePathWetboew = "/wet-boew-demos/""" + grunt.option('branch') + """/<%= distFolder %>/wet-boew" -%}{%- assign setting-root = "/wet-boew-demos/""" + grunt.option('branch') + """ -%}""" position: "bottom" src: "<%= jekyllDist %>/_includes/settings.liquid" jekyllRunUnminified: diff --git a/_config.yml b/_config.yml index b80c3f89c..8709fd314 100644 --- a/_config.yml +++ b/_config.yml @@ -6,8 +6,8 @@ website: "https://wet-boew.github.io/GCWeb/" # URL of your public facing website global: lang: fr feedbackPath: - en: "/sites/feedback/ajax/report-problem-en.html" - fr: "/sites/feedback/ajax/report-problem-fr.html" + en: "/sites/feedback/ajax/page-feedback-en.html" + fr: "/sites/feedback/ajax/page-feedback-fr.html" # contextualFooter: # Contextual footer settings # title: # fr: "Référence d'implémentation de Canada.ca" diff --git a/_data/sites.json b/_data/sites.json index 9836b9390..fb980658a 100644 --- a/_data/sites.json +++ b/_data/sites.json @@ -181,39 +181,59 @@ "modified": "dct:modified" }, "title": { - "en": "Report a problem (RAP) - Feedback", - "fr": "Signaler un problème (SUP) - Commentaires" + "en": "Feedback area", + "fr": "Zone de rétroaction" }, "description": { - "en": "Documentation on how to use the page feedback form.", - "fr": "Documentation sur l'utilisation de formulaire de commentaires de page." + "en": "Documentation on how to use the elements of the feedback area.", + "fr": "Documentation sur l'utilisation des éléments de la zone commentaires." }, - "modified": "2022-04-26", + "modified": "2023-01-10", "componentName": "feedback", "status": "stable", "pages": { "docs": [ { - "title": "Documentation for Page feedback form", + "title": "Documentation for the feedback area", "language": "en", "path": "feedback-docs-en.html" }, { - "title": "Documentation pour formulaire de commentaire de page", + "title": "Documentation pour la zone de rétroaction", "language": "fr", "path": "feedback-docs-fr.html" } ], "examples": [ { - "title": "Page feedback form", + "title": "Page feedback tool", + "language": "en", + "path": "page-feedback-en.html" + }, + { + "title": "Outil de rétroaction sur la page", + "language": "fr", + "path": "page-feedback-fr.html" + }, + { + "title": "Page feedback tool with contact link", "language": "en", - "path": "feedback-en.html" + "path": "page-feedback-contact-en.html" }, { - "title": "Formulaire de commentaire de page", + "title": "Outil de rétroaction sur la page avec lien de contact", "language": "fr", - "path": "feedback-fr.html" + "path": "page-feedback-contact-fr.html" + }, + { + "title": "Report a problem", + "language": "en", + "path": "report-problem-en.html" + }, + { + "title": "Signaler un problème", + "language": "fr", + "path": "report-problem-fr.html" } ] } @@ -354,50 +374,6 @@ ] } } -,{ - "@context": { - "@version": 1.1, - "dct": "http://purl.org/dc/terms/", - "title": { "@id": "dct:title", "@container": "@language" }, - "description": { "@id": "dct:description", "@container": "@language" }, - "modified": "dct:modified" - }, - "title": { - "en": "Page feedback tool", - "fr": "Outil de rétroaction sur la page" - }, - "description": { - "en": "Page feedback tool for Canada.ca", - "fr": "Outil de rétroaction sur la page pour Canada.ca" - }, - "modified": "2022-12-06", - "componentName": "gc-page-feedback", - "status": "stable", - "pages": { - "examples": [ - { - "title": "Page feedback tool", - "language": "en", - "path": "gc-page-feedback-en.html" - }, - { - "title": "Outil de rétroaction sur la page", - "language": "fr", - "path": "gc-page-feedback-fr.html" - }, - { - "title": "Page feedback tool with custom parameters", - "language": "en", - "path": "gc-page-feedback-custom-en.html" - }, - { - "title": "Outil de rétroaction sur la page avec paramètres personnalisés", - "language": "fr", - "path": "gc-page-feedback-custom-fr.html" - } - ] - } -} ,{ "@context": { "@version": 2.0, diff --git a/_includes/gc-page-feedback/gc-page-feedback.html b/_includes/gc-page-feedback/gc-page-feedback.html deleted file mode 100644 index d614cd7e3..000000000 --- a/_includes/gc-page-feedback/gc-page-feedback.html +++ /dev/null @@ -1,12 +0,0 @@ - -{%- if page.dir == "/sites/gc-page-feedback/" -%} - {%- include_relative includes/css.html -%} - {%- include_relative includes/gc-page-feedback.html -%} -{%- else -%} -

Error: The page feedback tool only can only be activated in pages located at "sites/gc-page-feedback/*.html".

-{%- endif -%} diff --git a/_includes/page-details/footer.html b/_includes/page-details/footer.html deleted file mode 100644 index cad6a7932..000000000 --- a/_includes/page-details/footer.html +++ /dev/null @@ -1,45 +0,0 @@ - -
-

{{ i18nText-pageDetails }}

- - {% assign col-modified = "col-xs-12" %} - {%- if page.pageFeedback or page.noReportProblem != true -%} - {% assign col-feedback = "col-sm-8 col-md-9 col-lg-9" %} - {%- if page.share -%} - {% assign col-share = "col-sm-4 col-md-3" %} - {%- endif -%} - {%- else -%} - {%- if page.share -%} - {% assign col-share = "col-sm-4 col-md-3 col-sm-push-8 col-md-push-9" %} - {% assign col-modified = "col-sm-6 col-md-5 col-lg-4 col-sm-pull-4 col-md-pull-3" %} - {%- endif -%} - {%- endif -%} - -
- {%- if page.pageFeedback or page.noReportProblem != true -%} - - {%- endif -%} - {%- if page.share -%} - - {%- endif -%} - -
-
-
{{ i18nText-dateModified }}
-
-
-
-
-
diff --git a/package-lock.json b/package-lock.json index b3fd8b3e3..8bd4f4535 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6666,7 +6666,7 @@ "jsonpointer.js": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/jsonpointer.js/-/jsonpointer.js-0.4.0.tgz", - "integrity": "sha512-2bf/1crAmPpsmj1I6rDT6W0SOErkrNBpb555xNWcMVWYrX6VnXpG0GRMQ2shvOHwafpfse8q0gnzPFYVH6Tqdg==" + "integrity": "sha1-ACyxI/dnqv3rAZYTLOXE+ZQcyro=" }, "jsprim": { "version": "1.4.1", diff --git a/sites/gc-page-feedback/_base.scss b/sites/feedback/_base.scss similarity index 66% rename from sites/gc-page-feedback/_base.scss rename to sites/feedback/_base.scss index 10692aba5..e24f6269c 100644 --- a/sites/gc-page-feedback/_base.scss +++ b/sites/feedback/_base.scss @@ -2,10 +2,19 @@ @title: Page feedback tool - Base */ -/* In noscript/basic HTML mode... */ -.no-js, -.wb-disable { - .gc-pft { +#gc-pft { + details { + margin-bottom: 15px; + margin-top: 0; + } + + .gc-pft-no { + font-weight: $bold-weight; + } + + /* In noscript/basic HTML mode... */ + .no-js &, + .wb-disable & { /* Disable row gutters (default selector isn't specific-enough) */ .row-no-gutters { @extend .row-no-gutters; diff --git a/sites/feedback/_print.scss b/sites/feedback/_print.scss new file mode 100644 index 000000000..085024e43 --- /dev/null +++ b/sites/feedback/_print.scss @@ -0,0 +1,7 @@ +/* + @title: Page feedback tool - Print view + */ + +#gc-pft { + display: none !important; +} diff --git a/sites/page-details/_screen-md-min.scss b/sites/feedback/_screen-md-min.scss similarity index 85% rename from sites/page-details/_screen-md-min.scss rename to sites/feedback/_screen-md-min.scss index cf064c9a5..91e8c0367 100644 --- a/sites/page-details/_screen-md-min.scss +++ b/sites/feedback/_screen-md-min.scss @@ -5,10 +5,10 @@ /* Add a larger top margin on the share button (only if its plugin has initialized) if adjacent to the page feedback tool. */ .pagedetails { div { - &:has( .gc-pft ) { + &:has( #gc-pft ) { + { .wb-share-inited { - margin-top: 21px; + margin-top: 16px; } } } diff --git a/sites/page-details/_screen-sm-min.scss b/sites/feedback/_screen-sm-min-to-screen-sm-max.scss similarity index 93% rename from sites/page-details/_screen-sm-min.scss rename to sites/feedback/_screen-sm-min-to-screen-sm-max.scss index 086e58e36..e6b888f47 100644 --- a/sites/page-details/_screen-sm-min.scss +++ b/sites/feedback/_screen-sm-min-to-screen-sm-max.scss @@ -5,7 +5,7 @@ /* Add a larger top margin on the share button (only if its plugin has initialized) if adjacent to the page feedback tool. */ .pagedetails { div { - &:has( .gc-pft ) { + &:has( #gc-pft ) { + { .wb-share-inited { margin-top: 29px; diff --git a/sites/feedback/ajax/deprecated/report-problem-v1-en.html b/sites/feedback/ajax/deprecated/report-problem-v1-en.html new file mode 100644 index 000000000..21a260c3d --- /dev/null +++ b/sites/feedback/ajax/deprecated/report-problem-v1-en.html @@ -0,0 +1,57 @@ +
+
+
+ Report a problem on this page +
+
+
+
+ Please select all that apply: +
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ +
+
+
+

Thank you for your help!

+

You will not receive a reply. For enquiries, please contact us.

+
+
+
+
+
diff --git a/sites/feedback/ajax/deprecated/report-problem-v1-fr.html b/sites/feedback/ajax/deprecated/report-problem-v1-fr.html new file mode 100644 index 000000000..71e725788 --- /dev/null +++ b/sites/feedback/ajax/deprecated/report-problem-v1-fr.html @@ -0,0 +1,57 @@ +
+
+
+ Signaler un problème ou une erreur sur cette page +
+
+
+
+ Veuillez cocher toutes les réponses pertinentes : +
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ +
+
+
+

Merci de votre aide!

+

Vous ne recevrez pas de réponse. Pour toute question, s’il vous plaît contactez-nous.

+
+
+
+
+
diff --git a/sites/feedback/ajax/report-problem-v2-en.html b/sites/feedback/ajax/deprecated/report-problem-v2-en.html similarity index 100% rename from sites/feedback/ajax/report-problem-v2-en.html rename to sites/feedback/ajax/deprecated/report-problem-v2-en.html diff --git a/sites/feedback/ajax/report-problem-v2-fr.html b/sites/feedback/ajax/deprecated/report-problem-v2-fr.html similarity index 100% rename from sites/feedback/ajax/report-problem-v2-fr.html rename to sites/feedback/ajax/deprecated/report-problem-v2-fr.html diff --git a/sites/feedback/ajax/deprecated/report-problem-v3-en.html b/sites/feedback/ajax/deprecated/report-problem-v3-en.html new file mode 100644 index 000000000..5424322e8 --- /dev/null +++ b/sites/feedback/ajax/deprecated/report-problem-v3-en.html @@ -0,0 +1,77 @@ +
+
+ Report a problem on this page +
+
+
+
+ + + + + + + +
+ + Please select all that apply: + +
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ +
+
+
+

Thank you for your help!

+

You will not receive a reply. For enquiries, please contact us.

+
+

Something went wrong. Please submit your information via an alternative method.

+
+
+
+
diff --git a/sites/feedback/ajax/deprecated/report-problem-v3-fr.html b/sites/feedback/ajax/deprecated/report-problem-v3-fr.html new file mode 100644 index 000000000..f09f06c17 --- /dev/null +++ b/sites/feedback/ajax/deprecated/report-problem-v3-fr.html @@ -0,0 +1,77 @@ +
+
+ Signaler un problème ou une erreur sur cette page +
+
+
+
+ + + + + + + +
+ + Veuillez sélectionner toutes les cases qui s'appliquent : + +
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ +
+
+
+

Merci de votre aide!

+

Vous ne recevrez pas de réponse. Pour toute question, s’il vous plaît contactez-nous.

+
+

Nous somme désolé, un problème est survenu lors de la soumission de votre formulaire. Veuillez nous envoyer l'information via une méthode alternative.

+
+
+
+
diff --git a/sites/feedback/ajax/deprecated/report-problem-v4-en.html b/sites/feedback/ajax/deprecated/report-problem-v4-en.html new file mode 100644 index 000000000..202c60404 --- /dev/null +++ b/sites/feedback/ajax/deprecated/report-problem-v4-en.html @@ -0,0 +1,93 @@ +
+
+
+ Report a problem on this page +
+
+
+
+
+ +
+
+ + Please select all that apply: + +
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ +
+
+
+

Thank you for your help!

+

You will not receive a reply. For enquiries, please contact us.

+
+

Something went wrong. Please submit your information via an alternative method.

+
+
+
+
+
diff --git a/sites/feedback/ajax/deprecated/report-problem-v4-fr.html b/sites/feedback/ajax/deprecated/report-problem-v4-fr.html new file mode 100644 index 000000000..c43331a49 --- /dev/null +++ b/sites/feedback/ajax/deprecated/report-problem-v4-fr.html @@ -0,0 +1,92 @@ +
+
+ Signaler un problème ou une erreur sur cette page +
+
+
+
+
+ +
+
+ + Veuillez sélectionner toutes les cases qui s'appliquent : + +
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ +
+
+
+

Merci de votre aide!

+

Vous ne recevrez pas de réponse. Pour toute question, s’il vous plaît contactez-nous.

+
+

Nous somme désolé, un problème est survenu lors de la soumission de votre formulaire. Veuillez nous envoyer l'information via une méthode alternative.

+
+
+
+
+
diff --git a/sites/feedback/ajax/page-feedback-en.html b/sites/feedback/ajax/page-feedback-en.html new file mode 100644 index 000000000..5d6990078 --- /dev/null +++ b/sites/feedback/ajax/page-feedback-en.html @@ -0,0 +1,84 @@ +
+
+
+

Give feedback about this page

+
+
+ +
+
+ Did you find what you were looking for? +
+ +
+
+ + +
+
+
+

If not, tell us why below:

+

Tell us why below:

+
+ +
+
+ +

You will not receive a reply. Don't include personal information (telephone, email, SIN, financial, medical, or work details).

+

Maximum 300 characters

+ +
+ +
+
+
+

Thank you for your feedback.

+
+
+
+
diff --git a/sites/feedback/ajax/page-feedback-fr.html b/sites/feedback/ajax/page-feedback-fr.html new file mode 100644 index 000000000..c0c147076 --- /dev/null +++ b/sites/feedback/ajax/page-feedback-fr.html @@ -0,0 +1,84 @@ +
+
+
+

Donnez votre rétroaction sur cette page

+
+
+ +
+
+ Avez-vous trouvé ce que vous cherchiez? +
+ +
+
+ + +
+
+
+

Sinon, dites nous pourquoi ci-dessous :

+

Dites nous pourquoi ci-dessous :

+
+ +
+
+ +

Vous ne recevrez pas de réponse. N'incluez pas de renseignements personnels (téléphone, courriel, NAS, renseignements financiers, médicaux ou professionnels).

+

Maximum de 300 caractères

+ +
+ +
+
+
+

Merci de vos commentaires.

+
+
+
+
diff --git a/sites/feedback/ajax/report-problem-aa-en.html b/sites/feedback/ajax/report-problem-aa-en.html deleted file mode 100644 index 5e2384442..000000000 --- a/sites/feedback/ajax/report-problem-aa-en.html +++ /dev/null @@ -1,107 +0,0 @@ -
-
- Report a problem on this page -
-
-
-
- - - - - - - -
- Please select all that apply: -
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
    -
  • - - -
  • -
  • - - -
  • -
  • - - -
  • -
  • - - -
  • -
  • - - -
  • -
-
- - -
-
- - -
-
- -
-
-
-

Thank you for your help!

-

You will not receive a reply. For enquiries, please contact us.

-
-

Something went wrong. Please submit your information via an alternative method.

-
-
-
-
diff --git a/sites/feedback/ajax/report-problem-aa-fr.html b/sites/feedback/ajax/report-problem-aa-fr.html deleted file mode 100644 index 5d883e9c3..000000000 --- a/sites/feedback/ajax/report-problem-aa-fr.html +++ /dev/null @@ -1,109 +0,0 @@ -
-
- Signaler un problème ou une erreur sur cette page -
-
-
-
- - - - - - - -
- - Veuillez sélectionner toutes les cases qui s'appliquent : - -
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
    -
  • - - -
  • -
  • - - -
  • -
  • - - -
  • -
  • - - -
  • -
  • - - -
  • -
-
- - -
-
- - -
-
- -
-
-
-

Merci de votre aide!

-

Vous ne recevrez pas de réponse. Pour toute question, s’il vous plaît contactez-nous.

-
-

Nous somme désolé, un problème est survenu lors de la soumission de votre formulaire. Veuillez nous envoyer l'information via une méthode alternative.

-
-
-
-
diff --git a/sites/feedback/ajax/report-problem-en.html b/sites/feedback/ajax/report-problem-en.html index 202c60404..e3b20d197 100644 --- a/sites/feedback/ajax/report-problem-en.html +++ b/sites/feedback/ajax/report-problem-en.html @@ -12,12 +12,10 @@ data-wb-jsonmanager='{ "name": "rap", "extractor": [ - { "interface": "referer", "path": "externalReferer" }, { "selector": "title", "path": "pageTitle" }, { "interface": "locationHref", "path": "submissionPage" }, { "selector": "html", "attr": "lang", "path": "lang" }, { "selector": "meta[name=\"dcterms.creator\"]", "attr": "content", "path": "pageOwner" }, - { "selector": "meta[name=\"dcterms.subject\"]", "attr": "content", "path": "subject" } ] }'>
diff --git a/sites/feedback/ajax/report-problem-v1-en.html b/sites/feedback/ajax/report-problem-v1-en.html deleted file mode 100644 index 5ffa139c1..000000000 --- a/sites/feedback/ajax/report-problem-v1-en.html +++ /dev/null @@ -1,54 +0,0 @@ -
-
Report a problem on this page -
-
-
-
- Please select all that apply: -
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- -
-
-
-

Thank you for your help!

-

You will not receive a reply. For enquiries, please contact us.

-
-
-
-
diff --git a/sites/feedback/ajax/report-problem-v1-fr.html b/sites/feedback/ajax/report-problem-v1-fr.html deleted file mode 100644 index e9a045d7a..000000000 --- a/sites/feedback/ajax/report-problem-v1-fr.html +++ /dev/null @@ -1,54 +0,0 @@ -
-
Signaler un problème ou une erreur sur cette page -
-
-
-
- Veuillez cocher toutes les réponses pertinentes : -
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- -
-
-
-

Merci de votre aide!

-

Vous ne recevrez pas de réponse. Pour toute question, s’il vous plaît contactez-nous.

-
-
-
-
diff --git a/sites/feedback/ajax/report-problem-v3-en.html b/sites/feedback/ajax/report-problem-v3-en.html deleted file mode 100644 index 1c10340a8..000000000 --- a/sites/feedback/ajax/report-problem-v3-en.html +++ /dev/null @@ -1,78 +0,0 @@ -
-
- Report a problem on this page -
-
-
-
- - - - - - - -
- - Please select all that apply: - -
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- -
- -
-
-

Thank you for your help!

-

You will not receive a reply. For enquiries, please contact us.

-
-

Something went wrong. Please submit your information via an alternative method.

-
-
-
-
diff --git a/sites/feedback/ajax/report-problem-v3-fr.html b/sites/feedback/ajax/report-problem-v3-fr.html deleted file mode 100644 index 6a673dc3a..000000000 --- a/sites/feedback/ajax/report-problem-v3-fr.html +++ /dev/null @@ -1,77 +0,0 @@ -
-
- Signaler un problème ou une erreur sur cette page -
-
-
-
- - - - - - - -
- - Veuillez sélectionner toutes les cases qui s'appliquent : - -
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- -
-
-
-

Merci de votre aide!

-

Vous ne recevrez pas de réponse. Pour toute question, s’il vous plaît contactez-nous.

-
-

Nous somme désolé, un problème est survenu lors de la soumission de votre formulaire. Veuillez nous envoyer l'information via une méthode alternative.

-
-
-
-
diff --git a/sites/feedback/feedback-aa-en.html b/sites/feedback/feedback-aa-en.html deleted file mode 100644 index 1420bce91..000000000 --- a/sites/feedback/feedback-aa-en.html +++ /dev/null @@ -1,24 +0,0 @@ ---- -{ - "title": "Page feedback form using Analytics data attributes", - "language": "en", - "altLangPage": "feedback-aa-fr.html", - "breadcrumbs": [ - { "title": "Canada.ca", "link": "https://www.canada.ca/en.html" } - ], - "secondlevel": false, - "dateModified": "2022-04-26", - "share": "true", - "feedbackPath": "ajax/report-problem-aa-en.html" -} ---- - -

This page feedback form is using analytics data attributes.

-

HTML code

-
<div data-ajax-replace="ajax/report-problem-aa-en.html">
-	<div class="row row-no-gutters">
-		<div class="col-sm-9 col-md-6 col-lg-5">
-			<a class="btn btn-default btn-block" href="https://www.canada.ca/en/report-problem.html">Report a problem on this page</a>
-		</div>
-	</div>
-</div>
diff --git a/sites/feedback/feedback-aa-fr.html b/sites/feedback/feedback-aa-fr.html deleted file mode 100644 index 0de3a1b7d..000000000 --- a/sites/feedback/feedback-aa-fr.html +++ /dev/null @@ -1,24 +0,0 @@ ---- -{ - "title": "Formulaire de commentaires de page utilisant les attributs de données analytiques", - "language": "fr", - "altLangPage": "feedback-aa-en.html", - "breadcrumbs": [ - { "title": "Canada.ca", "link": "https://www.canada.ca/en.html" } - ], - "secondlevel": false, - "dateModified": "2022-04-26", - "share": "true", - "feedbackPath": "ajax/report-problem-aa-fr.html" -} ---- - -

Ce formulaire de commentaires de page utilise des attributs de données analytiques.

-

Le code HTML

-
<div data-ajax-replace="ajax/report-problem-aa-fr.html">
-	<div class="row row-no-gutters">
-		<div class="col-sm-11 col-md-7 col-lg-6">
-			<a class="btn btn-default btn-block" href="https://www.canada.ca/fr/signaler-probleme.html">Signaler un problème ou une erreur sur cette page </a>
-		</div>
-	</div>
-</div>
diff --git a/sites/feedback/feedback-docs-en.html b/sites/feedback/feedback-docs-en.html index 3b2176c3d..e697ce38e 100644 --- a/sites/feedback/feedback-docs-en.html +++ b/sites/feedback/feedback-docs-en.html @@ -1,397 +1,379 @@ --- { - "title": "Page feedback (RAP) - Documentation", + "title": "Feedback area - Documentation", "language": "en", "altLangPage": "feedback-docs-fr.html", - "breadcrumbs": [ - { "title": "Canada.ca", "link": "https://www.canada.ca/en.html" } - ], "secondlevel": false, - "dateModified": "2022-04-26", - "share": true, - "feedbackPath": "ajax/report-problem-en.html" + "dateModified": "2023-01-10", + "share": true } ---
Status
Stable
+
Version
+
5.0.0
Type
Canada.ca site functionality
-
Last review
-
2022-04-26
-

Purpose

-

Displays the Page feedback form

+

Introduction

+

Purpose

+

Provide feedback on any given page through a form.

+

Evaluation and report

+

There is no evaluation and report available for this component.

+ +

Guidance

+ -

Working example

+

Variants

+

This component supports the following variants:

+
+

Note

+

All variants are comprised of two sub-components:

+
    +
  • The first one is used for the integration on the page.
  • +
  • The second one is the form which is inserted dynamically via an Ajax call. This sub-component is however out of scope of the API.
  • +
+
+ +

Variant 1: Page Feedback Tool (default) Provisional

+

Iteration 1

-

How to implement

+

Working example(s)

    -
  • To show the page feedback form, create a <div> with the following data attribute: data-ajax-replace="ajax/report-problem-en.html".

    -

    For the basic HTML version, a link element should be created inside a <div> that points to the report a problem form page: <div><a class="btn btn-default btn-block" href="https://www.canada.ca/en/report-problem.html">Report a problem on this page</a></div>

    -

    For more information about Data Ajax plugin, please visit Data Ajax documentation page

    +
  • Page feedback
  • +
+ +

How to implement

+
    +
  • To show the page feedback form, create a <div class="wb-disable-allow"> with the following data attributes: +
      +
    • Mandatory: data-ajax-replace="ajax/page-feedback-en.html"
    • +
    • Optional: data-feedback-theme="[Text defining the theme of your page]"
    • +
    • Optional: data-feedback-section="[Text defining the section where your page resides]"
    • +
  • +
  • Additionally, your page needs to have the following metadata: <meta name="dcterms.creator" content="[Department name]">
+

For more information about Data Ajax plugin, please visit Data Ajax documentation page.

-

Evaluation and report

-

There is no evaluation and report available for this component.

+
GCWeb Jekyll specific
+

To apply this variant's optional attributes on any given page, you will need to do the following in the page's front-matter:

+
    +
  • Set the variable feedbackData to an object containing the following customizable strings: +
      +
    • section: to define the section where your page resides.
    • +
    • theme: to define the theme of your page.
    • +
    +
  • +
+

For example:

+
"feedbackData": {
+	"theme": "Theme",
+	"section": "Section"
+}
+ +

Code sample

+{%- highlight html -%} +
+{%- endhighlight -%} +
+ Ajaxed-in content + {%- highlight html -%} + {%- include_relative ajax/page-feedback-en.html -%} + {%- endhighlight -%} +
+ +

Variant 2: Page Feedback Tool With Contact Link Provisional

+

Iteration 1

+ +

Working example(s)

+ -

API (Version 2.0)

+

How to implement

+
    +
  • To show the page feedback form, create a <div class="wb-disable-allow"> with the following data attributes: +
      +
    • Mandatory: data-ajax-replace="ajax/page-feedback-en.html"
    • +
    • Mandatory: data-feedback-link="[Contact link text]"
    • +
    • Mandatory: data-feedback-url="[Contact link URL]"
    • +
    • Optional: data-feedback-theme="[Text defining the theme of your page]"
    • +
    • Optional: data-feedback-section="[Text defining the section where your page resides]"
    • +
    +
  • +
  • For the basic HTML version, a link element should be created inside your <div> that points to the report a problem form page: <div><a class="btn btn-default btn-block" href="https://www.canada.ca/en/report-problem.html">Report a problem on this page</a></div>.
  • +
  • Additionally, you can define the following metadata: <meta name="dcterms.creator" content="[Department name]">
  • +
+

For more information about Data Ajax plugin, please visit Data Ajax documentation page.

+ +
GCWeb Jekyll specific
+

To apply this variant on any given page, you will need to do the following in the page's front-matter:

+
    +
  • Set the variable feedbackContact to an object containing the following customizable strings: +
      +
    • link: to define the contact link's text.
    • +
    • url: to define the contact link's URL.
    • +
    +
  • +
  • Optionally, you can set the variable feedbackData to an object containing the following customizable strings: +
      +
    • section: to define the section where your page resides.
    • +
    • theme: to define the theme of your page.
    • +
    +
  • +
+

For example:

+
"feedbackContact": {
+	"link": "Contact link",
+	"url": "https://canada.ca"
+},
+"feedbackData": {
+	"theme": "Theme",
+	"section": "Section"
+}
+ +

Code sample

+{%- highlight html -%} +
+{%- endhighlight -%} +
+ Ajaxed-in content + {%- highlight html -%} + {%- include_relative ajax/page-feedback-en.html -%} + {%- endhighlight -%} +
+

Variant 3: Report a Problem (RAP) Stable

+

Iteration 5

+

Here is a list of changes that happened since the previous iteration:

- - - - + + + + + + - - - - + +
CSS ClassTemplateVisual renderingSchemaBreaking +
    +
  • Removed JSON Manager extraction for "externalReferer" and "subject".
  • +
+
Additions +
    +
  • Added static hidden inputs for "externalReferer" and "subject"
  • +
+
n.a.Version 2.0n.a.n.a.Fixesn/a
-

Template (latest: v2.0)

-

Template migration notes

-

Site template includes

-
-
-
Version 2.0
-

The html inserted by the Data Ajax plugin can be found on the following page: https://github.com/wet-boew/GCWeb/blob/master/sites/feedback/ajax/report-problem-en.html.

-
<div data-ajax-replace="ajax/report-problem-en.html">
-	<div class="row row-no-gutters">
-		<div class="col-sm-9 col-md-6 col-lg-5">
-			<a class="btn btn-default btn-block" href="https://www.canada.ca/en/report-problem.html">Report a problem on this page</a>
-		</div>
-	</div>
-</div>
-
-
-
Before, version 1.0
-
<details class="brdr-0">
-	<summary class="btn btn-default text-center">Report a problem on this page</summary>
-	<div class="well row">
-		<div class="gc-rprt-prblm">
-			<div class="gc-rprt-prblm-frm gc-rprt-prblm-tggl" id="wb-auto-4">
-				{ feedback form }
-			</div>
-			<div class="gc-rprt-prblm-thnk gc-rprt-prblm-tggl hide" id="wb-auto-5">
-				<h3>Thank you for your help!</h3>
-				<p>You will not receive a reply. For enquiries, please <a href="https://www.canada.ca/en/contact.html">contact us</a>.</p>
-			</div>
-		</div>
-	</div>
-</details>
-
-
+

Working example(s)

+ -

Report a problem (RAP) form (feedback)

-

Implemented ajax files reference

+

How to implement

    -
  • Version 4.0
  • -
  • Version 3.0
  • -
  • Version 2.0
  • -
  • Version 2.0 with Adobe Analytic configuration
  • -
  • Version 1.0
  • +
  • To show the Report a problem form, create a <div> with the following data attribute: data-ajax-replace="ajax/report-problem-en.html".
  • +
  • For the basic HTML version, a link element should be created inside a <div> that points to the report a problem form page: <div><a class="btn btn-default btn-block" href="https://www.canada.ca/en/report-problem.html">Report a problem on this page</a></div>.
-
Version 4.0
-
<div class="row row-no-gutters">
-	<div class="col-sm-9 col-md-6 col-lg-5">
-		<details class="brdr-0">
-			<summary class="btn btn-default text-center">Report a problem on this page</summary>
-			<div class="well row">
-				<div class="gc-rprt-prblm">
-					<div class="gc-rprt-prblm-frm gc-rprt-prblm-tggl">
-						<form action="/sites/feedback/feedback-form-destination.html" id="gc-rprt-prblm-form" class="wb-postback"
-							data-wb-postback='{
-								"success": ".success-message",
-								"failure": ".failure-message"}'
-							data-wb-jsonmanager='{
-								"name": "rap",
-								"extractor": [
-									{ "interface": "referer", "path": "externalReferer" },
-									{ "selector": "title", "path": "pageTitle" },
-									{ "interface": "locationHref", "path": "submissionPage" },
-									{ "selector": "html", "attr": "lang", "path": "lang" },
-									{ "selector": "meta[name=\"dcterms.creator\"]", "attr": "content", "path": "pageOwner" },
-									{ "selector": "meta[name=\"dcterms.subject\"]", "attr": "content", "path": "subject" }
-								]
-							}'>
-							<div data-wb-json='{
-								"url": "#[rap]",
-								"mapping": [
-									{ "selector": "input", "attr": "name", "value": "/@id" },
-									{ "selector": "input", "attr": "value", "value": "/@value" }
-								]
-							}'>
-								<template>
-									<input type="hidden" name=" value=" />
-								</template>
-							</div>
-							<fieldset>
-								<legend>
-									<span class="field-name">Please select all that apply:</span>
-								</legend>
-								<div class="checkbox">
-									<label for="problem1">
-										<input name="problem1" id="problem1" type="checkbox" value="Yes" >A link, button or video is not working
-									</label>
-									<input name="problem1" type="hidden" value=">
-								</div>
-								<div class="checkbox">
-									<label for="problem2">
-										<input name="problem2" id="problem2" type="checkbox" value="Yes" >It has a spelling mistake
-									</label>
-									<input name="problem2" type="hidden" value=">
-								</div>
-								<div class="checkbox">
-									<label for="problem3">
-										<input name="problem3" id="problem3" type="checkbox" value="Yes" >Information is missing
-									</label>
-									<input name="problem3" type="hidden" value=">
-								</div>
-								<div class="checkbox">
-									<label for="problem4">
-										<input name="problem4" id="problem4" type="checkbox" value="Yes" >Information is outdated or wrong
-									</label>
-									<input name="problem4" type="hidden" value=">
-								</div>
-								<div class="checkbox">
-									<label for="problem5">
-										<input name="problem5" id="problem5" type="checkbox" value="Yes" >Login error when trying to access an account
-									</label>
-									<input name="problem5" type="hidden" value=">
-								</div>
-								<div class="checkbox">
-									<label for="problem11">
-										<input name="problem11" id="problem11" type="checkbox" value="Yes" >I can't find what I'm looking for
-									</label>
-									<input name="problem11" type="hidden" value=">
-								</div>
-								<div class="checkbox">
-									<label for="problem12">
-										<input name="problem12" id="problem12" type="checkbox" value="Yes" >Other issue not in this list
-									</label>
-									<input name="problem12" type="hidden" value=">
-								</div>
-							</fieldset>
-							<button type="submit" class="btn btn-primary">Submit</button>
-						</form>
-					</div>
-					<div class="success-message hide">
-						<h3>Thank you for your help!</h3>
-						<p>You will not receive a reply. For enquiries, please <a href="https://www.canada.ca/en/contact.html">contact us</a>.</p>
-					</div>
-					<p class="failure-message hide">Something went wrong. Please submit your information via an alternative method.</p>
-				</div>
-			</div>
-		</details>
-	</div>
+

For more information about Data Ajax plugin, please visit Data Ajax documentation page.

+
+ Adobe Analytics implementation +

To implement Adobe Analytics in the Report a problem form, simply add the attribute data-gc-analytics-rap to every checkbox with the value being the same as the current language's label, followed by a dash and followed by the other language's label.

+

For example:

+
<div class="checkbox">
+	<label for="problem2">
+		<input name="problem2" id="problem2" type="checkbox" value="Yes" data-gc-analytics-rap="It has a spelling mistake-Il y a une erreur d'orthographe ou de grammaire">It has a spelling mistake
+	</label>
+	<input name="problem2" type="hidden" value="">
 </div>
+
+ +
Hidden input fields
+

The Report a problem variant leverages JSON Manager and Data JSON to get information about the page and generate hidden input fields in the form.

+

The following tag needs to be present in the page: <meta name="dcterms.creator" content="[Department name]">
Where [Department name] is a department name from canada.ca controlled vocabulary, for example: gc:institutions/service-canada

+ +
GCWeb Jekyll specific
+

To apply this variant on any given page, you will need to do the following in the page's front-matter or in the site configurations (_config.yml):

+
    +
  • set the variable feedbackPath to "ajax/report-problem-en.html".
  • +
  • set the variable feedbackFallback to true.
  • +
+ +

Code sample

+{%- highlight html -%} + +{%- endhighlight -%} +
+ Ajaxed-in content + {%- highlight html -%} + {%- include_relative ajax/report-problem-en.html -%} + {%- endhighlight -%} +
+ +

Previous iterations

-
Previous versions
- Version 3.0 -
<form action="/sites/feedback/feedback-form-destination.html" id="gc-rprt-prblm-form" class="wb-postback" data-wb-postback="{"success":".success-message","failure":".failure-message","content":".form-content"}" >
-		<fieldset>
-			<legend>
-				<span class="field-name">Please select all that apply:</span>
-			</legend>
-			<div class="checkbox">
-				<label for="problem1">
-					<input name="problem1" id="problem1" type="checkbox" value="Yes" >A link, button or video is not working
-				</label>
-				<input name="problem1" type="hidden" value="">
-			</div>
-			<div class="checkbox">
-				<label for="problem2">
-					<input name="problem2" id="problem2" type="checkbox" value="Yes" >It has a spelling mistake
-				</label>
-				<input name="problem2" type="hidden" value="">
-			</div>
-			<div class="checkbox">
-				<label for="problem3">
-					<input name="problem3" id="problem3" type="checkbox" value="Yes" >Information is missing
-				</label>
-				<input name="problem3" type="hidden" value="">
-			</div>
-			<div class="checkbox">
-				<label for="problem4">
-					<input name="problem4" id="problem4" type="checkbox" value="Yes" >Information is outdated or wrong
-				</label>
-				<input name="problem4" type="hidden" value="">
-			</div>
-			<div class="checkbox">
-				<label for="problem5">
-					<input name="problem5" id="problem5" type="checkbox" value="Yes" >Login error when trying to access an account
-				</label>
-				<input name="problem5" type="hidden" value="">
-			</div>
-			<div class="checkbox">
-				<label for="problem11">
-					<input name="problem11" id="problem11" type="checkbox" value="Yes" >I can't find what I'm looking for
-				</label>
-				<input name="problem11" type="hidden" value="">
-			</div>
-			<div class="checkbox">
-				<label for="problem12">
-					<input name="problem12" id="problem12" type="checkbox" value="Yes" >Other issue not in this list
-				</label>
-				<input name="problem12" type="hidden" value="">
-			</div>
-		</fieldset>
-		<strong><button type="submit" class="btn btn-primary">Submit</button></strong>
-	</form>
-	<div class="success-message hide">
-		<h3>Thank you for your help!</h3>
-		<p>You will not receive a reply. For enquiries, please <a href="https://www.canada.ca/en/contact.html">contact us</a>.</p>
-	</div>
-	<p class="failure-message hide">Something went wrong. Please submit your information via an alternative method.</p>
+ Iteration 4 +

Here is a list of changes that happened since the previous iteration:

+ + + + + + + + + + + + + +
Breaking +
    +
  • Leveraging JSON Manager Extractor and Data JSON to generate hidden input fields
  • +
+
Additionsn/a
Fixesn/a
+ +

Code sample

+ {%- highlight html -%} + + {%- endhighlight -%} +
+ Ajaxed-in content + {%- highlight html -%} + {%- include_relative ajax/deprecated/report-problem-v4-en.html -%} + {%- endhighlight -%} +
+
- Version 2.0 -
<form action="/sites/feedback/feedback-form-destination.html" id="gc-rprt-prblm-form" class="wb-postback" data-wb-postback="{"success":".success-message","failure":".failure-message","content":".form-content"}" >
-		<fieldset>
-			<legend>
-				<span class="field-name">Please select all that apply:</span>
-			</legend>
-			<div class="checkbox">
-				<label for="problem1">
-					<input name="problem1" id="problem1" type="checkbox" value="Yes" >A link, button or video is not working
-				</label>
-				<input name="problem1" type="hidden" value="">
-			</div>
-			<div class="checkbox">
-				<label for="problem2">
-					<input name="problem2" id="problem2" type="checkbox" value="Yes" >It has a spelling mistake
-				</label>
-				<input name="problem2" type="hidden" value="">
-			</div>
-			<div class="checkbox">
-				<label for="problem3">
-					<input name="problem3" id="problem3" type="checkbox" value="Yes" >Information is missing
-				</label>
-				<input name="problem3" type="hidden" value="">
-			</div>
-			<div class="checkbox">
-				<label for="problem4">
-					<input name="problem4" id="problem4" type="checkbox" value="Yes" >Information is outdated or wrong
-				</label>
-				<input name="problem4" type="hidden" value="">
-			</div>
-			<div class="checkbox">
-				<label for="problem5">
-					<input name="problem5" id="problem5" type="checkbox" value="Yes" >Login error when trying to access an account (e.g. My Service Canada Account)
-				</label>
-				<input name="problem5" type="hidden" value="">
-			</div>
-			<ul>
-				<li class="checkbox">
-					<label for="problem6a">
-						<input name="problem6" id="problem6a" type="checkbox" value="Yes" >GC Key access
-					</label>
-					<input name="problem6" type="hidden" value="">
-				</li>
-				<li class="checkbox">
-					<label for="problem7">
-						<input name="problem7" id="problem7" type="checkbox" value="Yes" >SecureKey Concierge (Banking Credential) access
-					</label>
-					<input name="problem7" type="hidden" value="">
-				</li>
-				<li class="checkbox">
-					<label for="problem8">
-						<input name="problem8" id="problem8" type="checkbox" value="Yes" >Personal Access Code (PAC) problems or EI Access Code (AC) problems
-					</label>
-					<input name="problem8" type="hidden" value="">
-				</li>
-				<li class="checkbox">
-					<label for="problem9">
-						<input name="problem9" id="problem9" type="checkbox" value="Yes" >Social Insurance Number (SIN) validation problems
-					</label>
-					<input name="problem9" type="hidden" value="">
-				</li>
-				<li class="checkbox">
-					<label for="problem10">
-						<input name="problem10" id="problem10" type="checkbox" value="Yes" >Other login error not in this list
-					</label>
-					<input name="problem10" type="hidden" value="">
-				</li>
-			</ul>
-			<div class="checkbox">
-				<label for="problem11">
-					<input name="problem11" id="problem11" type="checkbox" value="Yes" >I can't find what I'm looking for
-				</label>
-				<input name="problem11" type="hidden" value="">
-			</div>
-			<div class="checkbox">
-				<label for="problem12">
-					<input name="problem12" id="problem12" type="checkbox" value="Yes" >Other issue not in this list
-				</label>
-				<input name="problem12" type="hidden" value="">
-			</div>
-		</fieldset>
-		<strong><button type="submit" class="btn btn-primary">Submit</button></strong>
-	</form>
-	<div class="success-message hide">
-		<h3>Thank you for your help!</h3>
-		<p>You will not receive a reply. For enquiries, please <a href="https://www.canada.ca/en/contact.html">contact us</a>.</p>
-	</div>
-	<p class="failure-message hide">Something went wrong. Please submit your information via an alternative method.</p>
+ Iteration 3 +

Here is a list of changes that happened since the previous iteration:

+ + + + + + + + + + + + + +
Breaking +
    +
  • Removed login error sub-options.
  • +
  • Renamed login error option.
  • +
+
Additionsn/a
Fixesn/a
+ +

Code sample

+ {%- highlight html -%} + + {%- endhighlight -%} +
+ Ajaxed-in content + {%- highlight html -%} + {%- include_relative ajax/deprecated/report-problem-v3-en.html -%} + {%- endhighlight -%} +
+ +
- Version 1.0 -
<form action="#">
-		<fieldset>
-			<legend><span class="field-name">Please select all that apply:</span></legend>
-			<div class="checkbox">
-				<label for="gc-rprt-prblm-f1">
-					<input type="checkbox" name="problem1" value="Yes" id="gc-rprt-prblm-f1" />A link, button or video is not working
-				</label>
-				<input name="problem1" type="hidden" value="No" />
-			</div>
-			<div class="checkbox">
-				<label for="gc-rprt-prblm-f2">
-					<input type="checkbox" name="problem2" value="Yes" id="gc-rprt-prblm-f2" />It has a spelling mistake
-				</label>
-				<input name="problem2" type="hidden" value="No" />
-			</div>
-			<div class="checkbox">
-				<label for="gc-rprt-prblm-f3">
-					<input type="checkbox" name="problem3" value="Yes" id="gc-rprt-prblm-f3" />Information is missing
-				</label>
-				<input name="problem3" type="hidden" value="No" />
-			</div>
-			<div class="checkbox">
-				<label for="gc-rprt-prblm-f4">
-					<input type="checkbox" name="problem4" value="Yes" id="gc-rprt-prblm-f4" />Information is outdated or wrong
-				</label>
-				<input name="problem4" type="hidden" value="No" />
-			</div>
-			<div class="checkbox">
-				<label for="gc-rprt-prblm-f5">
-					<input type="checkbox" name="problem5" value="Yes" id="gc-rprt-prblm-f5" />I can't find what I'm looking for
-				</label>
-				<input name="problem5" type="hidden" value="No" />
-			</div>
-			<div class="checkbox">
-				<label for="gc-rprt-prblm-f6">
-					<input type="checkbox" name="problem6" value="Yes" id="gc-rprt-prblm-f6" />Other issue not in this list
-				</label>
-				<input name="problem6" type="hidden" value="No" />
-			</div>
-		</fieldset>
-		<button type="submit" class="btn btn-primary wb-toggle" data-toggle='{"stateOff": "hide", "stateOn": "show", "selector": ".gc-rprt-prblm-tggl"}'>Submit</button>
-	</form>
+ Iteration 2 +

Here is a list of changes that happened since the previous iteration:

+ + + + + + + + + + + + + +
Breaking +
    +
  • Rework of the template to use data-ajax. Includes fallback for basic HTML version.
  • +
  • Updated form: +
      +
    • Now implements wb-postback for form validation and no longer uses data-toggle on submit.
    • +
    • Added login error options (problem 5 to problem 10).
    • +
    • Added error and success messages.
    • +
    +
  • +
+
Additionsn/a
Fixesn/a
+ +

Code sample

+ {%- highlight html -%} + + {%- endhighlight -%} +
+ Ajaxed-in content + {%- highlight html -%} + {%- include_relative ajax/deprecated/report-problem-v2-en.html -%} + {%- endhighlight -%} +
+
+
+ Iteration 1 +

Code sample

+ {%- highlight html -%} + {%- include_relative ajax/deprecated/report-problem-v1-en.html -%} + {%- endhighlight -%}
diff --git a/sites/feedback/feedback-docs-fr.html b/sites/feedback/feedback-docs-fr.html index e2f445223..d80d1d531 100644 --- a/sites/feedback/feedback-docs-fr.html +++ b/sites/feedback/feedback-docs-fr.html @@ -1,396 +1,377 @@ --- { - "title": "Commentaires de page (SUP) - Documentation", + "title": "Zone de rétroaction - Documentation", "language": "fr", "altLangPage": "feedback-docs-en.html", - "breadcrumbs": [ - { "title": "Canada.ca", "link": "https://www.canada.ca/en.html" } - ], "secondlevel": false, - "dateModified": "2022-04-26", - "share": "true", - "feedbackPath": "ajax/report-problem-fr.html" - + "dateModified": "2023-01-10", + "share": "true" } --- -
Statut
Stable
+
Version
+
5.0.0
Type
-
Fonctionnalité du site Canada.ca
-
Dernière révision
-
2022-04-26
+
Fonctionnalité globale de site de Canada.ca
-

Objectif

-

Affiche le formulaire de commentaires sur la page

+

Introduction

+

Objectif

+

Obtenir une rétroaction des utilisateurs sur une page donnée via un formulaire.

+ +

Évaluation et rapport

+

Il n'y a pas d'évaluation ni de rapport disponible pour cette composante.

+ +

Orientation

+ + +

Variantes

+

Ce composant prend en charge les variantes suivantes :

+ +
+

Note

+

Toutes les variantes sont composées de deux sous-composants :

+
    +
  • Le premier est utilisé pour l'intégration sur la page.
  • +
  • Le second est le formulaire qui est inséré dynamiquement via un appel Ajax. Ce sous-composant est par contre hors de portée de l'API.
  • +
+
+ +

Variante 1: Outil de rétroaction sur la page (par défaut) Provisoire

+

Itération 1

+ +

Exemple(s) pratique(s)

+ + +

Comment mettre en œuvre

+
    +
  • Pour afficher le formulaire de rétroaction sur la page, créez un <div> avec les attributs suivants : +
      +
    • Obligatoire : data-ajax-replace="ajax/page-feedback-en.html"
    • +
    • Optionnel : data-feedback-theme="[Texte définissant le thème de votre page]"
    • +
    • Optionnel : data-feedback-section="[Texte définissant la section où réside votre page]"
    • +
    +
  • +
  • Pour la version HTML de base, un lien doit être créé dans un <div> qui pointe vers la page du formulaire de signalement d'un problème : <div><a class="btn btn-default btn-block" href="https://www.canada.ca/fr/signaler-probleme.html">Signaler un problème sur cette page</a></div>.
  • +
  • De plus, vous pouvez définir les métadonnées suivantes: <meta name="dcterms.creator" content="[Nom du département]">
  • +
+

Pour plus d'informations sur le plugin Data Ajax, veuillez visiter la page de documentation Data Ajax.

-

Exemple pratique

+
Spécifique à GCWeb Jekyll
+

Pour appliquer les attributs facultatifs de cette variante sur une page donnée, vous devrez procéder comme suit dans le front-matter de la page :

+

Par exemple :

+
"feedbackData": {
+	"theme": "Thème",
+	"section": "Section"
+}
+ +

Exemple de code

+{%- highlight html -%} +
+{%- endhighlight -%} +
+ Contenu ajouté via Ajax + {%- highlight html -%} + {%- include_relative ajax/page-feedback-fr.html -%} + {%- endhighlight -%} +
+

Variante 2: Outil de rétroaction sur la page avec lien de contact Provisoire

+

Itération 1

+ +

Exemple(s) pratique(s)

+ -

Comment mettre en œuvre

+

Comment mettre en œuvre

    -
  • -

    Pour afficher le formulaire de commentaires de page, créez une code><div> avec l'attribut de données suivant : data-ajax-replace="ajax/report-problem-fr.html".

    -

    Pour la version HTML simplifiée, un élément de lien doit être créé qui pointe vers la page du formulaire de signalement d'un problème : <a class="btn btn-default btn-block" href="https://www.canada.ca/fr/signaler-probleme.html">Signaler un problème sur cette page</a>

    -

    Pour plus d'informations sur le plugiciel Data Ajax, veuillez visiter Page de documentation Data Ajax

    +
  • Pour afficher le formulaire de rétroaction sur la page, créez un <div> avec les attributs suivants : +
      +
    • Obligatoire : data-ajax-replace="ajax/page-feedback-en.html"
    • +
    • Obligatoire : data-feedback-link="[Texte du lien de contact]"
    • +
    • Obligatoire : data-feedback-url="[URL du lien de contact]"
    • +
    • Optionnel : data-feedback-theme="[Texte définissant le thème de votre page]"
    • +
    • Optionnel : data-feedback-section="[Texte définissant la section où réside votre page]"
    • +
  • +
  • Pour la version HTML de base, un lien doit être créé dans un <div> qui pointe vers la page du formulaire de signalement d'un problème : <div><a class="btn btn-default btn-block" href="https://www.canada.ca/fr/signaler-probleme.html">Signaler un problème sur cette page</a></div>.
  • +
  • De plus, votre page doit avoir les métadonnées suivantes: <meta name="dcterms.creator" content="[Nom du département]">
+

Pour plus d'informations sur le plugin Data Ajax, veuillez visiter la page de documentation Data Ajax.

-

Évaluation et rapport

-

Il n'y a pas d'évaluation ni de rapport disponible pour ce composant.

+
Spécifique à GCWeb Jekyll
+

Pour appliquer cette variante sur une page donnée, vous devrez faire ce qui suit dans l'en-tête de la page :

+
    +
  • Définissez la variable feedbackContact à un objet contenant les chaînes personnalisables suivantes: +
      +
    • link: pour définir le texte du lien de contact.
    • +
    • url: pour définir l'URL du lien de contact.
    • +
    +
  • +
  • Facultativement, vous pouvez définir la variable feedbackData à un objet contenant les chaînes de caractères suivantes: +
      +
    • section : pour définir la section où réside votre page.
    • +
    • theme : pour définir le thème de votre page.
    • +
    +
  • +
+

Par exemple :

+
"feedbackContact": {
+	"link": "Lien de contact",
+	"url": "https://canada.ca/fr"
+},
+"feedbackData": {
+	"theme": "Thème",
+	"section": "Section"
+}
-

API (version 2.0)

- +

Exemple de code

+{%- highlight html -%} +
+{%- endhighlight -%} +
+ Contenu ajouté via Ajax + {%- highlight html -%} + {%- include_relative ajax/page-feedback-fr.html -%} + {%- endhighlight -%} +
+ +

Variante 3: Signaler un problème sur cette page (SUP) Stable

+

Itération 5

+

Voici une liste des changements qui se sont produits depuis l'itération précédente :

+
+ + + + - - - - + + - - - - + +
Majeurs +
    +
  • Suppression de l'extraction de données avec JSON Manager pour "externalReferer" et "subject".
  • +
+
Classe CSSGabaritRendu visuelSchémaAdditions +
    +
  • Ajout de champs de saisie masqués statiques pour "externalReferer" et "subject"
  • +
+
n.d.Version 2.0n.d.n.d.Correctifsn/a
-

Gabarit (dernière : v.2.0)

-

Notes sur la migration du gabarit

-

Composant du gabarit de site

-
-
-
Version 2.0
-

Le html inséré par le plugiciel Data Ajax se trouve sur la page suivante : https://github.com/wet-boew/GCWeb/blob/master/sites/feedback/ajax/report-problem-fr.html.

-
<div data-ajax-replace="ajax/report-problem-fr.html">
-	<div class="row row-no-gutters">
-		<div class="col-sm-11 col-md-7 col-lg-6">
-			<a class="btn btn-default btn-block" href="https://www.canada.ca/fr/signaler-probleme.html">Signaler un problème ou une erreur sur cette page </a>
-		</div>
-	</div>
-</div>
-
-
-
Avant, la version 1.0
-
<details class="brdr-0">
-	<summary class="btn btn-default text-center">Signaler un problème sur cette page</summary>
-	<div class="well row">
-		<div class="gc-rprt-prblm">
-			<div class="gc-rprt-prblm-frm gc-rprt-prblm-tggl" >
-				{ formulaire de commentaires }
-			</div>
-			<div class="gc-rprt-prblm-thnk gc-rprt-prblm-tggl hide" >
-				<h3>Merci pour votre aide !</h3>
-				<p>Vous ne recevrez pas de réponse. Pour toute demande, veuillez <a href="https://www.canada.ca/fr/contact.html">nous contacter</a>.</p>
-			</div>
-		</div>
-	</div>
-</details>
-
-
-

Formulaire de signalement d'un problème (SUP) (commentaires)

-

Référence des fichiers ajax implémentés

+

Exemple(s) pratique(s)

-
Version 4.0
-
<div class="row row-no-gutters"><div class="col-sm-11 col-md-7 col-lg-6">
-	<details class="brdr-0">
-		<summary class="btn btn-default text-center">Signaler un problème ou une erreur sur cette page</summary>
-		<div class="well row">
-			<div class="gc-rprt-prblm">
-				<div class="gc-rprt-prblm-frm gc-rprt-prblm-tggl">
-					<form action="/sites/feedback/feedback-form-destination.html" id="gc-rprt-prblm-form" class="wb-postback"
-						data-wb-postback='{
-							"success": ".success-message",
-							"failure": ".failure-message"}'
-						data-wb-jsonmanager='{
-							"name": "rap",
-							"extractor": [
-								{ "interface": "referer", "path": "externalReferer" },
-								{ "selector": "title", "path": "pageTitle" },
-								{ "interface": "locationHref", "path": "submissionPage" },
-								{ "selector": "html", "attr": "lang", "path": "lang" },
-								{ "selector": "meta[name=\"dcterms.creator\"]", "attr": "content", "path": "pageOwner" },
-								{ "selector": "meta[name=\"dcterms.subject\"]", "attr": "content", "path": "subject" }
-							]
-						}'>
-						<div data-wb-json='{
-							"url": "#[rap]",
-							"mapping": [
-								{ "selector": "input", "attr": "name", "value": "/@id" },
-								{ "selector": "input", "attr": "value", "value": "/@value" }
-							]
-						}'>
-							<template>
-								<input type="hidden" name=" value=" />
-							</template>
-						</div>
-						<fieldset>
-							<legend>
-								<span class="field-name">Veuillez sélectionner toutes les cases qui s'appliquent :</span>
-							</legend>
-							<div class="checkbox">
-								<label for="problem1">
-									<input name="problem1" id="problem1" type="checkbox" value="Yes" >Un lien, un bouton ou une vidéo ne fonctionne pas
-								</label>
-								<input name="problem1" type="hidden" value=">
-							</div>
-							<div class="checkbox">
-								<label for="problem2">
-									<input name="problem2" id="problem2" type="checkbox" value="Yes" >Il y a une erreur d'orthographe ou de grammaire
-								</label>
-								<input name="problem2" type="hidden" value=">
-							</div>
-							<div class="checkbox">
-								<label for="problem3">
-									<input name="problem3" id="problem3" type="checkbox" value="Yes" >Les renseignements sont incomplets
-								</label>
-								<input name="problem3" type="hidden" value=">
-							</div>
-							<div class="checkbox">
-								<label for="problem4">
-									<input name="problem4" id="problem4" type="checkbox" value="Yes" >L'information n'est plus à jour ou est erronée
-								</label>
-								<input name="problem4" type="hidden" value=">
-							</div>
-							<div class="checkbox">
-								<label for="problem5">
-									<input name="problem5" id="problem5" type="checkbox" value="Yes" >Message d'erreur à l'ouverture de la session lorsque je tente d'accéder à un compte
-								</label>
-								<input name="problem5" type="hidden" value=">
-							</div>
-							<div class="checkbox">
-								<label for="problem11">
-									<input name="problem11" id="problem11" type="checkbox" value="Yes" >Je n'arrive pas à trouver ce que je cherche
-								</label>
-								<input name="problem11" type="hidden" value=">
-							</div>
-								<div class="checkbox">
-									<label for="problem12">
-										<input name="problem12" id="problem12" type="checkbox" value="Yes" >Autre problème qui ne figure pas sur cette liste
-									</label>
-								<input name="problem12" type="hidden" value=">
-							</div>
-						</fieldset>
-						<button type="submit" class="btn btn-primary">Soumettre</button>
-					</form>
-				</div>
-				<div class="success-message hide">
-					<h3>Merci de votre aide!</h3>
-					<p>Vous ne recevrez pas de réponse. Pour toute question, s’il vous plaît <a href="https://www.canada.ca/fr/contact.html">contactez-nous</a>.</p>
-				</div>
-				<p class="failure-message hide">Nous somme désolé, un problème est survenu lors de la soumission de votre formulaire. Veuillez nous envoyer l'information via une méthode alternative.</p>
-			</div>
-		</div>
-	</details>
-	</div>
-</div>
-
+

Comment mettre en œuvre

+
    +
  • Pour afficher le formulaire de commentaires sur la page, créez un <div> avec l'attribut suivant : data-ajax-replace="ajax/report-problem-fr.html".
  • +
  • Pour la version HTML de base, un lien doit être créé dans un <div> qui pointe vers la page du formulaire de signalement d'un problème : <div><a class="btn btn-default btn-block" href="https://www.canada.ca/fr/signaler-probleme.html">Signaler un problème sur cette page</a></div>.
  • +
+

Pour plus d'informations sur le plugin Data Ajax, veuillez visiter la page de documentation Data Ajax.

+
+ Implémentation de Adobe Analytics +

Pour implémenter Adobe Analytics dans le formulaire Signaler un problème, ajoutez simplement l'attribut data-gc-analytics-rap à chaque case à cocher avec la valeur étant la même que le "label" de la langue actuelle, suivie d'un tiret et suivi par le "label" de l'autre langue.

+

Par exemple :

+
<div class="checkbox">
+	<label for="problem2">
+		<input name="problem2" id="problem2" type="checkbox" value="Yes" data-gc-analytics-rap="Il y a une erreur d'orthographe ou de grammaire-It has a spelling mistake">Il y a une erreur d'orthographe ou de grammaire
+	</label>
+	<input name="problem2" type="hidden" value="">
+</div>
+
+ +
Champs de saisie masqués
+

La variante Signaler un problème utilise JSON Manager et Data JSON pour obtenir des informations sur la page et générer des champs de saisie masqués dans le formulaire.

+

La balise suivante doit être présente dans la page : <meta name="author" content="[Nom du service]">
Où [Nom du ministère] est un nom de ministère du vocabulaire contrôlé de canada.ca, par exemple : gc:institutions/service-canada

+ +
Spécifique à GCWeb Jekyll
+

Pour appliquer cette variante sur une page donnée, vous devrez faire ce qui suit dans l'en-tête de la page ou dans les configurations du site (_config.yml).

+
    +
  • définir la variable feedbackPath à "ajax/report-problem-fr.html".
  • +
  • définir la variable feedbackFallback à true.
  • +
-
Versions précédentes
+

Exemple de code

+{%- highlight html -%} + +{%- endhighlight -%}
- Version 3.0 -
<form action="/sites/feedback/feedback-form-destination.html" id="gc-rprt-prblm-form" class="wb-postback" data-wb-postback="{"success":".success-message","failure":".failure-message","content":".form-content"}">
-	<fieldset>
-		<legend>
-			<span class="field-name">Veuillez sélectionner toutes les cases qui s'appliquent :</span>
-		</legend>
-		<div class="checkbox">
-			<label for="problem1">
-				<input name="problem1" id="problem1" type="checkbox" value="Yes" >Un lien, un bouton ou une vidéo ne fonctionne pas
-			</label>
-			<input name="problem1" type="hidden" value="">
-		</div>
-		<div class="checkbox">
-			<label for="problem2">
-				<input name="problem2" id="problem2" type="checkbox" value="Yes" >Il y a une erreur d'orthographe ou de grammaire
-			</label>
-			<input name="problem2" type="hidden" value="">
-		</div>
-		<div class="checkbox">
-			<label for="problem3">
-				<input name="problem3" id="problem3" type="checkbox" value="Yes" >Les renseignements sont incomplets
-			</label>
-			<input name="problem3" type="hidden" value="">
-		</div>
-		<div class="checkbox">
-			<label for="problem4">
-				<input name="problem4" id="problem4" type="checkbox" value="Yes" >L'information n'est plus à jour ou est erronée
-			</label>
-			<input name="problem4" type="hidden" value="">
-		</div>
-		<div class="checkbox">
-			<label for="problem5">
-				<input name="problem5" id="problem5" type="checkbox" value="Yes" >Message d'erreur à l'ouverture de la session lorsque je tente d'accéder à un compte
-			</label>
-			<input name="problem5" type="hidden" value="">
-		</div>
-		<div class="checkbox">
-			<label for="problem11">
-				<input name="problem11" id="problem11" type="checkbox" value="Yes" >Je n'arrive pas à trouver ce que je cherche
-			</label>
-			<input name="problem11" type="hidden" value="">
-		</div>
-			<div class="checkbox">
-				<label for="problem12">
-					<input name="problem12" id="problem12" type="checkbox" value="Yes" >Autre problème qui ne figure pas sur cette liste
-				</label>
-			<input name="problem12" type="hidden" value="">
-		</div>
-	</fieldset>
-	<strong><button type="submit" class="btn btn-primary">Soumettre</button></strong>
-</form><div class="success-message hide">
-	<h3>Merci de votre aide!</h3>
-	<p>Vous ne recevrez pas de réponse. Pour toute question, s’il vous plaît <a href="https://www.canada.ca/fr/contact.html">contactez-nous</a>.</p>
-</div>
-<p class="failure-message hide">Nous somme désolé, un problème est survenu lors de la soumission de votre formulaire. Veuillez nous envoyer l'information via une méthode alternative.</p>
+ Contenu ajouté via Ajax + {%- highlight html -%} + {%- include_relative ajax/report-problem-fr.html -%} + {%- endhighlight -%} +
+ +

Itérations précédentes

+
+ Itération 4 +

Voici une liste des changements qui se sont produits depuis l'itération précédente :

+ + + + + + + + + + + + + +
Majeurs +
    +
  • Utilise JSON Manager Extractor et Data JSON pour générer des champs de saisie masqués
  • +
+
Additionsn/a
Correctifsn/a
+ +

Exemple de code

+ {%- highlight html -%} + + {%- endhighlight -%} +
+ Contenu ajouté via Ajax + {%- highlight html -%} + {%- include_relative ajax/deprecated/report-problem-v4-fr.html -%} + {%- endhighlight -%} +
+
- Version 2.0 -
<form action="/sites/feedback/feedback-form-destination.html" id="gc-rprt-prblm-form" class="wb-postback" data-wb-postback="{"success":".success-message","failure":".failure-message","content":".form-content"}"  >
-	<fieldset>
-		<legend>
-			<span class="field-name">Veuillez sélectionner toutes les cases qui s'appliquent :</span>
-		</legend>
-		<div class="checkbox">
-			<label for="problem1">
-				<input name="problem1" id="problem1" type="checkbox" value="Yes" >Un lien, un bouton ou une vidéo ne fonctionne pas
-			</label>
-			<input name="problem1" type="hidden" value="">
-		</div>
-		<div class="checkbox">
-			<label for="problem2">
-				<input name="problem2" id="problem2" type="checkbox" value="Yes" >Il y a une erreur d'orthographe ou de grammaire
-			</label>
-			<input name="problem2" type="hidden" value="">
-		</div>
-		<div class="checkbox">
-			<label for="problem3">
-				<input name="problem3" id="problem3" type="checkbox" value="Yes" >Les renseignements sont incomplets
-			</label>
-			<input name="problem3" type="hidden" value="">
-		</div>
-		<div class="checkbox">
-			<label for="problem4">
-				<input name="problem4" id="problem4" type="checkbox" value="Yes" >L'information n'est plus à jour ou est erronée
-			</label>
-			<input name="problem4" type="hidden" value="">
-		</div>
-		<div class="checkbox">
-			<label for="problem5">
-				<input name="problem5" id="problem5" type="checkbox" value="Yes" >Message d'erreur à l'ouverture de la session lorsque je tente d'accéder à un compte (ex. Mon dossier Service Canada)
-			</label>
-			<input name="problem5" type="hidden" value="">
-		</div>
-		<ul>
-			<li class="checkbox">
-				<label for="problem6a">
-					<input name="problem6" id="problem6a" type="checkbox" value="Yes" >Accès CléGC
-				</label>
-				<input name="problem6" type="hidden" value="">
-			</li>
-			<li class="checkbox">
-				<label for="problem7">
-					<input name="problem7" id="problem7" type="checkbox" value="Yes" >Accès SecureKey Service de Concierge (justificatifs d'identité bancaires)
-				</label>
-				<input name="problem7" type="hidden" value="">
-			</li>
-			<li class="checkbox">
-				<label for="problem8">
-					<input name="problem8" id="problem8" type="checkbox" value="Yes" >Problème avec le Code d'accès personnel (CAP) ou avec le Code d'accès (CA) de l'assurance emploi
-				</label>
-				<input name="problem8" type="hidden" value="">
-			</li>
-			<li class="checkbox">
-				<label for="problem9">
-					<input name="problem9" id="problem9" type="checkbox" value="Yes" >Problème lié à la validation du numéro d'assurance sociale (NAS)
-				</label>
-				<input name="problem9" type="hidden" value="">
-			</li>
-			<li class="checkbox">
-				<label for="problem10">
-					<input name="problem10" id="problem10" type="checkbox" value="Yes" >Autre erreur lors de l'ouverture de session qui ne figure pas sur cette liste
-				</label>
-				<input name="problem10" type="hidden" value="">
-			</li>
-		</ul>
-		<div class="checkbox">
-			<label for="problem11">
-				<input name="problem11" id="problem11" type="checkbox" value="Yes" >Je n'arrive pas à trouver ce que je cherche
-			</label>
-			<input name="problem11" type="hidden" value="">
-		</div>
-			<div class="checkbox">
-				<label for="problem12">
-					<input name="problem12" id="problem12" type="checkbox" value="Yes" >Autre problème qui ne figure pas sur cette liste
-				</label>
-			<input name="problem12" type="hidden" value="">
-		</div>
-	</fieldset>
-	<strong><button type="submit" class="btn btn-primary">Soumettre</button></strong>
-</form><div class="success-message hide">
-	<h3>Merci de votre aide!</h3>
-	<p>Vous ne recevrez pas de réponse. Pour toute question, s'il vous plaît <a href="https://www.canada.ca/fr/contact.html">contactez-nous</a>.</p>
-</div>
-<p class="failure-message hide">Nous somme désolé, un problème est survenu lors de la soumission de votre formulaire. Veuillez nous envoyer l'information via une méthode alternative.</p>
+ Itération 3 +

Voici une liste des changements qui se sont produits depuis l'itération précédente :

+ + + + + + + + + + + + + +
Majeurs +
    +
  • Suppression des sous-options d'erreur de connexion.
  • +
  • Option d'erreur de connexion renommée.
  • +
+
Additionsn/a
Correctifsn/a
+ +

Exemple de code

+ {%- highlight html -%} + + {%- endhighlight -%} +
+ Contenu ajouté via Ajax + {%- highlight html -%} + {%- include_relative ajax/deprecated/report-problem-v3-fr.html -%} + {%- endhighlight -%} +
+
- Version 1.0 -
<form action="#">
-	<fieldset>
-		<legend><span class="field-name">Veuillez cocher toutes les réponses pertinentes :</span></legend>
-		<div class="checkbox">
-			<label for="gc-rprt-prblm-f1">
-				<input type="checkbox" name="problem1" value="Oui" id="gc-rprt-prblm-f1" />Un lien, un bouton ou une vidéo ne fonctionne pas
-			</label>
-			<input name="problem1" type="hidden" value="Non" />
-		</div>
-		<div class="checkbox">
-			<label for="gc-rprt-prblm-f2">
-				<input type="checkbox" name="problem2" value="Oui" id="gc-rprt-prblm-f2" />Il y a une erreur d'orthographe ou de grammaire
-			</label>
-			<input name="problem2" type="hidden" value="Non" />
-		</div>
-		<div class="checkbox">
-			<label for="gc-rprt-prblm-f3">
-				<input type="checkbox" name="problem3" value="Oui" id="gc-rprt-prblm-f3" />Les renseignements sont incomplets
-			</label>
-			<input name="problem3" type="hidden" value="Non" />
-		</div>
-		<div class="checkbox">
-			<label for="gc-rprt-prblm-f4">
-				<input type="checkbox" name="problem4" value="Oui" id="gc-rprt-prblm-f4" />L'information n'est plus à jour ou est erronée
-			</label>
-			<input name="problem4" type="hidden" value="Non" />
-		</div>
-		<div class="checkbox">
-			<label for="gc-rprt-prblm-f5">
-				<input type="checkbox" name="problem5" value="Oui" id="gc-rprt-prblm-f5" />Je n'arrive pas à trouver ce que je cherche
-			</label>
-			<input name="problem5" type="hidden" value="Non" />
-		</div>
-		<div class="checkbox">
-			<label for="gc-rprt-prblm-f6">
-				<input type="checkbox" name="problem6" value="Oui" id="gc-rprt-prblm-f6" />Autre problème qui ne figure pas sur cette liste
-			</label>
-			<input name="problem6" type="hidden" value="Non" />
-		</div>
-	</fieldset>
-	<button type="submit" class="btn btn-primary wb-toggle" data-toggle='{"stateOff": "hide", "stateOn": "show", "selector": ".gc-rprt-prblm-tggl"}'>Soumettre</button>
-</form>
+ Itération 2 +

Here is a list of changes that happened since the previous itération:

+ + + + + + + + + + + + + +
Majeurs +
    +
  • Refonte du gabarit pour utiliser data-ajax. Inclut la solution de secours pour la version HTML de base.
  • +
  • Mise à jour du formulaire: +
      +
    • Implémente désormais wb-postback pour la validation des formulaires et n'utilise plus data-toggle lors de l'envoi.
    • +
    • Ajout d'options d'erreur de connexion (problème 5 à problème 10).
    • +
    • Ajout de messages d'erreur et de réussite.
    • +
    +
  • +
+
Additionsn/a
Correctifsn/a
+ +

Exemple de code

+ {%- highlight html -%} + + {%- endhighlight -%} +
+ Contenu ajouté via Ajax + {%- highlight html -%} + {%- include_relative ajax/deprecated/report-problem-v2-fr.html -%} + {%- endhighlight -%} +
+
+
+ Itération 1 +

Exemple de code

+ {%- highlight html -%} + {%- include_relative ajax/deprecated/report-problem-v1-fr.html -%} + {%- endhighlight -%}
diff --git a/sites/feedback/feedback-en.html b/sites/feedback/feedback-en.html deleted file mode 100644 index 81e81945a..000000000 --- a/sites/feedback/feedback-en.html +++ /dev/null @@ -1,31 +0,0 @@ ---- -{ - "title": "Page feedback form", - "language": "en", - "altLangPage": "feedback-fr.html", - "breadcrumbs": [ - { "title": "Canada.ca", "link": "https://www.canada.ca/en.html" } - ], - "secondlevel": false, - "dateModified": "2022-04-26", - "share": "true", - "feedbackPath": "ajax/report-problem-en.html" -} ---- - -

This page feedback form leverage the version 2 of the page-details container which leverage the data ajax plugin.

-

Data ajax replace links:

-
    -
  • Version 2 - https://www.canada.ca/ .... /report-problem-en.html (link to come)
  • -
  • Version 2 with Adobe Analytic - https://www.canada.ca/ .... /report-problem-en.html (link to come)
  • -
  • Version 1 - Deprecated, see the documentation for a code sample
  • -
-

The version 2 of the page-details container leverage a progressive enhancement design and that is why a link element need be created to point at the report a problem form page: <a class="btn btn-default btn-block" href="https://www.canada.ca/en/report-problem.html">Report a problem on this page</a>. You can experience that fallback through the basic HTML version mode.

-

HTML code

-
<div data-ajax-replace="ajax/report-problem-en.html">
-	<div class="row row-no-gutters">
-		<div class="col-sm-9 col-md-6 col-lg-5">
-			<a class="btn btn-default btn-block" href="https://www.canada.ca/en/report-problem.html">Report a problem on this page</a>
-		</div>
-	</div>
-</div>
diff --git a/sites/feedback/feedback-fr.html b/sites/feedback/feedback-fr.html deleted file mode 100644 index fe2f3c9ba..000000000 --- a/sites/feedback/feedback-fr.html +++ /dev/null @@ -1,31 +0,0 @@ ---- -{ - "title": "Formulaire de commentaires de la page", - "language": "fr", - "altLangPage": "feedback-en.html", - "breadcrumbs": [ - { "title": "Canada.ca", "link": "https://www.canada.ca/en.html" } - ], - "secondlevel": false, - "dateModified": "2022-04-26", - "share": "true", - "feedbackPath": "ajax/report-problem-fr.html" -} ---- - -

Ce formulaire de commentaires de page exploite la version 2 du conteneur page-details qui exploite le plugiciel data ajax.

-

Data ajax remplace les liens :

-
    -
  • Version 2 - https://www.canada.ca/ ... /signaler-probleme.html (lien à venir)
  • -
  • Version 2 avec Adobe Analytic - https://www.canada.ca/ ... ./signaler-probleme.html (lien à venir)
  • -
  • Version 1 - Obsolète, consultez la documentation pour un exemple de code
  • -
-

La version 2 du conteneur page-details implique une conception d'amélioration progressive et c'est pourquoi un lien doit être créé pour pointer vers la page du formulaire de signalement d'un problème : <a class="btn btn-default btn-block" href="https://www.canada.ca/fr/signaler-probleme.html">Signaler un problème sur cette page</a>. Vous pouvez faire l'expérience de ce repli via le mode de version HTML de base.

-

Le code HTML

-
<div data-ajax-replace="ajax/report-problem-fr.html">
-	<div class="row row-no-gutters">
-		<div class="col-sm-11 col-md-7 col-lg-6">
-			<a class="btn btn-default btn-block" href="https://www.canada.ca/fr/signaler-probleme.html">Signaler un problème ou une erreur sur cette page </a>
-		</div>
-	</div>
-</div>
diff --git a/sites/feedback/includes/feedback.html b/sites/feedback/includes/feedback.html index 7d15638f0..13d38aa4b 100644 --- a/sites/feedback/includes/feedback.html +++ b/sites/feedback/includes/feedback.html @@ -2,21 +2,38 @@ {%- if page.feedbackPath -%} {{ page.feedbackPath }} {%- elsif site.global.feedbackPath and site.global.feedbackPath.first -%} - {{ site.global.feedbackPath[ i18nText-lang ] | relative_url }} + {{ setting-root }}{{ site.global.feedbackPath[ i18nText-lang ] }} + {%- endif -%} +{%- endcapture -%} +{%- capture feedbackFallback -%} + {%- if page.feedbackFallback -%} + {{ page.feedbackFallback }} + {%- elsif site.global.feedbackFallback -%} + {{ site.global.feedbackFallback }} {%- endif -%} {%- endcapture -%} -
-
- {%- if i18nText-lang == "en" -%} -
- {%- else -%} -
- {%- endif -%} - {{ i18nText-feedback }} + {% unless feedbackFallback and feedbackFallback != "" %} + class="wb-disable-allow" + {%- endunless -%} + {%- endif -%} + {% if page.feedbackContact %} data-feedback-link="{{page.feedbackContact.link}}" data-feedback-url="{{page.feedbackContact.url}}" {% endif %} + {% if page.feedbackData.section %} data-feedback-section="{{page.feedbackData.section}}" {% endif %} + {% if page.feedbackData.theme %} data-feedback-theme="{{page.feedbackData.theme}}" {% endif %}> + {%- if feedbackFallback and feedbackFallback != "" -%} +
+ {%- if i18nText-lang == "en" -%} +
+ {%- else -%} +
+ {%- endif -%} + {{ i18nText-feedback }} +
-
+ {%- else -%} + + {%- endif -%}
diff --git a/sites/feedback/index.json-ld b/sites/feedback/index.json-ld index 355bb2467..1fd13b970 100644 --- a/sites/feedback/index.json-ld +++ b/sites/feedback/index.json-ld @@ -7,39 +7,59 @@ "modified": "dct:modified" }, "title": { - "en": "Report a problem (RAP) - Feedback", - "fr": "Signaler un problème (SUP) - Commentaires" + "en": "Feedback area", + "fr": "Zone de rétroaction" }, "description": { - "en": "Documentation on how to use the page feedback form.", - "fr": "Documentation sur l'utilisation de formulaire de commentaires de page." + "en": "Documentation on how to use the elements of the feedback area.", + "fr": "Documentation sur l'utilisation des éléments de la zone commentaires." }, - "modified": "2022-04-26", + "modified": "2023-01-10", "componentName": "feedback", "status": "stable", "pages": { "docs": [ { - "title": "Documentation for Page feedback form", + "title": "Documentation for the feedback area", "language": "en", "path": "feedback-docs-en.html" }, { - "title": "Documentation pour formulaire de commentaire de page", + "title": "Documentation pour la zone de rétroaction", "language": "fr", "path": "feedback-docs-fr.html" } ], "examples": [ { - "title": "Page feedback form", + "title": "Page feedback tool", "language": "en", - "path": "feedback-en.html" + "path": "page-feedback-en.html" }, { - "title": "Formulaire de commentaire de page", + "title": "Outil de rétroaction sur la page", "language": "fr", - "path": "feedback-fr.html" + "path": "page-feedback-fr.html" + }, + { + "title": "Page feedback tool with contact link", + "language": "en", + "path": "page-feedback-contact-en.html" + }, + { + "title": "Outil de rétroaction sur la page avec lien de contact", + "language": "fr", + "path": "page-feedback-contact-fr.html" + }, + { + "title": "Report a problem", + "language": "en", + "path": "report-problem-en.html" + }, + { + "title": "Signaler un problème", + "language": "fr", + "path": "report-problem-fr.html" } ] } diff --git a/sites/feedback/page-feedback-contact-en.html b/sites/feedback/page-feedback-contact-en.html new file mode 100644 index 000000000..e67b46b65 --- /dev/null +++ b/sites/feedback/page-feedback-contact-en.html @@ -0,0 +1,31 @@ +--- +{ + "altLangPage": "page-feedback-contact-fr.html", + "breadcrumbs": [ + { "title": "Feedback area - Documentation", "link": "sites/feedback/feedback-docs-en.html" } + ], + "dateModified": "2023-04-12", + "description": "Page feedback tool for Canada.ca", + "language": "en", + "title": "Page feedback tool with contact link", + "share": "true", + "feedbackContact": { + "link": "Contact Service Name", + "url": "https://canada.ca" + }, + "feedbackData": { + "theme": "Theme", + "section": "Section" + } +} +--- + +{% include alert-provisional.html siteroot="../../" %} +{% include alert-softlaunch.html genre="e" component="Page feedback tool with contact link" version="provisional" %} + +
+ +

HTML code

+{% highlight text %} +{% include_relative ajax/page-feedback-en.html %} +{% endhighlight %} diff --git a/sites/feedback/page-feedback-contact-fr.html b/sites/feedback/page-feedback-contact-fr.html new file mode 100644 index 000000000..92fa17bed --- /dev/null +++ b/sites/feedback/page-feedback-contact-fr.html @@ -0,0 +1,31 @@ +--- +{ + "altLangPage": "page-feedback-contact-en.html", + "breadcrumbs": [ + { "title": "Zone de rétroaction - Documentation", "link": "sites/feedback/feedback-docs-fr.html" } + ], + "dateModified": "2023-04-12", + "description": "Outil de rétroaction sur la page pour Canada.ca", + "language": "fr", + "title": "Outil de rétroaction sur la page avec lien de contact", + "share": "true", + "feedbackContact": { + "link": "Contacter Nom du service", + "url": "https://canada.ca/fr" + }, + "feedbackData": { + "theme": "Thème", + "section": "Section" + } +} +--- + +{% include alert-provisional.html siteroot="../../" %} +{% include alert-softlaunch.html genre="e" component="Outil de rétroaction sur la page avec lien de contact" version="provisoire" %} + +
+ +

Code HTML

+{% highlight text %} +{% include_relative ajax/page-feedback-fr.html %} +{% endhighlight %} diff --git a/sites/feedback/page-feedback-en.html b/sites/feedback/page-feedback-en.html new file mode 100644 index 000000000..a9f1ebed8 --- /dev/null +++ b/sites/feedback/page-feedback-en.html @@ -0,0 +1,27 @@ +--- +{ + "altLangPage": "page-feedback-fr.html", + "breadcrumbs": [ + { "title": "Feedback area - Documentation", "link": "sites/feedback/feedback-docs-en.html" } + ], + "dateModified": "2023-01-10", + "description": "Page feedback tool for Canada.ca", + "language": "en", + "title": "Page feedback tool", + "share": "true", + "feedbackData": { + "theme": "Theme", + "section": "Section" + } +} +--- + +{% include alert-provisional.html siteroot="../../" %} +{% include alert-softlaunch.html genre="e" component="Page feedback tool" version="provisional" %} + +
+ +

HTML code

+{% highlight text %} +{% include_relative ajax/page-feedback-en.html %} +{% endhighlight %} diff --git a/sites/feedback/page-feedback-fr.html b/sites/feedback/page-feedback-fr.html new file mode 100644 index 000000000..a94f1538e --- /dev/null +++ b/sites/feedback/page-feedback-fr.html @@ -0,0 +1,27 @@ +--- +{ + "altLangPage": "page-feedback-en.html", + "breadcrumbs": [ + { "title": "Zone de rétroaction - Documentation", "link": "sites/feedback/feedback-docs-fr.html" } + ], + "dateModified": "2023-01-10", + "description": "Outil de rétroaction sur la page pour Canada.ca", + "language": "fr", + "title": "Outil de rétroaction sur la page", + "share": "true", + "feedbackData": { + "theme": "Thème", + "section": "Section" + } +} +--- + +{% include alert-provisional.html siteroot="../../" %} +{% include alert-softlaunch.html genre="e" component="Outil de rétroaction sur la page" version="provisoire" %} + +
+ +

Code HTML

+{% highlight text %} +{% include_relative ajax/page-feedback-fr.html %} +{% endhighlight %} diff --git a/sites/feedback/report-problem-en.html b/sites/feedback/report-problem-en.html new file mode 100644 index 000000000..8acaef12f --- /dev/null +++ b/sites/feedback/report-problem-en.html @@ -0,0 +1,21 @@ +--- +{ + "title": "Report a problem", + "language": "en", + "altLangPage": "report-problem-fr.html", + "breadcrumbs": [ + { "title": "Feedback area - Documentation", "link": "sites/feedback/feedback-docs-en.html" } + ], + "secondlevel": false, + "dateModified": "2023-01-10", + "share": "true", + "feedbackPath": "ajax/report-problem-en.html", + "feedbackFallback": true +} +--- +
+ +

Code HTML

+{% highlight text %} +{% include_relative ajax/report-problem-en.html %} +{% endhighlight %} diff --git a/sites/feedback/report-problem-fr.html b/sites/feedback/report-problem-fr.html new file mode 100644 index 000000000..311f779a7 --- /dev/null +++ b/sites/feedback/report-problem-fr.html @@ -0,0 +1,21 @@ +--- +{ + "title": "Signaler un problème", + "language": "fr", + "altLangPage": "report-problem-en.html", + "breadcrumbs": [ + { "title": "Zone de rétroaction - Documentation", "link": "sites/feedback/feedback-docs-fr.html" } + ], + "secondlevel": false, + "dateModified": "2023-01-10", + "share": "true", + "feedbackPath": "ajax/report-problem-fr.html", + "feedbackFallback": true +} +--- +
+ +

Code HTML

+{% highlight text %} +{% include_relative ajax/report-problem-fr.html %} +{% endhighlight %} diff --git a/sites/gc-page-feedback/_print.scss b/sites/gc-page-feedback/_print.scss deleted file mode 100644 index 5f9c4031d..000000000 --- a/sites/gc-page-feedback/_print.scss +++ /dev/null @@ -1,7 +0,0 @@ -/* - @title: Page feedback tool - Print view - */ - -.gc-pft { - @extend %gcweb-print-display-none-important; -} diff --git a/sites/gc-page-feedback/_screen-sm-min.scss b/sites/gc-page-feedback/_screen-sm-min.scss deleted file mode 100644 index 72627320f..000000000 --- a/sites/gc-page-feedback/_screen-sm-min.scss +++ /dev/null @@ -1,14 +0,0 @@ -/* - @title: Page feedback tool - Small view and over - */ - -/* In noscript/basic HTML mode... */ -.no-js, -.wb-disable { - .gc-pft { - /* Disable the legend's right padding */ - .nojs-pr-sm-0 { - padding-right: 0 !important; - } - } -} diff --git a/sites/gc-page-feedback/gc-page-feedback-custom-en.html b/sites/gc-page-feedback/gc-page-feedback-custom-en.html deleted file mode 100644 index 00b0b2f1e..000000000 --- a/sites/gc-page-feedback/gc-page-feedback-custom-en.html +++ /dev/null @@ -1,29 +0,0 @@ ---- -{ - "altLangPage": "gc-page-feedback-custom-fr.html", - "breadcrumbs": [ - { "title": "GCWeb home", "link": "https://wet-boew.github.io/GCWeb/index-en.html" } - ], - "css": ["https://use.fontawesome.com/releases/v5.15.4/css/all.css"], - "dateModified": "2022-12-06", - "description": "Page feedback tool for Canada.ca", - "language": "en", - "title": "Page feedback tool with custom parameters", - "pageFeedback": { - "institutionopt": "Custom institution", - "themeopt": "Custom theme", - "sectionopt": "Custom section", - "pageTitle": "true", - "language": "true", - "submissionPage": "true" - } -} ---- -
- -

HTML code

-{%- comment -%} Manually-included variable-core.liquid so that gc-page-feedback.html's code sample can use the i18nText-lang variable {%- endcomment -%} -{% include variable-core.liquid %} -{% highlight text %} -{% include_relative includes/gc-page-feedback.html %} -{% endhighlight %} diff --git a/sites/gc-page-feedback/gc-page-feedback-custom-fr.html b/sites/gc-page-feedback/gc-page-feedback-custom-fr.html deleted file mode 100644 index e2b493dc3..000000000 --- a/sites/gc-page-feedback/gc-page-feedback-custom-fr.html +++ /dev/null @@ -1,29 +0,0 @@ ---- -{ - "altLangPage": "gc-page-feedback-custom-en.html", - "breadcrumbs": [ - { "title": "Accueil GCWeb", "link": "https://wet-boew.github.io/GCWeb/index-fr.html" } - ], - "css": ["https://use.fontawesome.com/releases/v5.15.4/css/all.css"], - "dateModified": "2022-12-06", - "description": "Outil de rétroaction sur la page pour Canada.ca", - "language": "fr", - "title": "Outil de rétroaction sur la page avec paramètres personnalisés", - "pageFeedback": { - "institutionopt": "Institution personnalisée", - "themeopt": "Thème personnalisé", - "sectionopt": "Section personnalisée", - "pageTitle": "true", - "language": "true", - "submissionPage": "true" - } -} ---- -
- -

Code HTML

-{%- comment -%} Manually-included variable-core.liquid so that gc-page-feedback.html's code sample can use the i18nText-lang variable {%- endcomment -%} -{% include variable-core.liquid %} -{% highlight text %} -{% include_relative includes/gc-page-feedback.html %} -{% endhighlight %} diff --git a/sites/gc-page-feedback/gc-page-feedback-en.html b/sites/gc-page-feedback/gc-page-feedback-en.html deleted file mode 100644 index 7bebd0b85..000000000 --- a/sites/gc-page-feedback/gc-page-feedback-en.html +++ /dev/null @@ -1,23 +0,0 @@ ---- -{ - "altLangPage": "gc-page-feedback-fr.html", - "breadcrumbs": [ - { "title": "GCWeb home", "link": "https://wet-boew.github.io/GCWeb/index-en.html" } - ], - "css": ["https://use.fontawesome.com/releases/v5.15.4/css/all.css"], - "dateModified": "2022-12-06", - "description": "Page feedback tool for Canada.ca", - "language": "en", - "title": "Page feedback tool", - "pageFeedback": "true", - "share": "true" -} ---- -
- -

HTML code

-{%- comment -%} Manually-included variable-core.liquid so that gc-page-feedback.html's code sample can use the i18nText-lang variable {%- endcomment -%} -{% include variable-core.liquid %} -{% highlight text %} -{% include_relative includes/gc-page-feedback.html %} -{% endhighlight %} diff --git a/sites/gc-page-feedback/gc-page-feedback-fr.html b/sites/gc-page-feedback/gc-page-feedback-fr.html deleted file mode 100644 index 636ff3119..000000000 --- a/sites/gc-page-feedback/gc-page-feedback-fr.html +++ /dev/null @@ -1,23 +0,0 @@ ---- -{ - "altLangPage": "gc-page-feedback-en.html", - "breadcrumbs": [ - { "title": "Accueil GCWeb", "link": "https://wet-boew.github.io/GCWeb/index-fr.html" } - ], - "css": ["https://use.fontawesome.com/releases/v5.15.4/css/all.css"], - "dateModified": "2022-12-06", - "description": "Outil de rétroaction sur la page pour Canada.ca", - "language": "fr", - "title": "Outil de rétroaction sur la page", - "pageFeedback": "true", - "share": "true" -} ---- -
- -

Code HTML

-{%- comment -%} Manually-included variable-core.liquid so that gc-page-feedback.html's code sample can use the i18nText-lang variable {%- endcomment -%} -{% include variable-core.liquid %} -{% highlight text %} -{% include_relative includes/gc-page-feedback.html %} -{% endhighlight %} diff --git a/sites/gc-page-feedback/includes/css.html b/sites/gc-page-feedback/includes/css.html deleted file mode 100644 index 6c703f071..000000000 --- a/sites/gc-page-feedback/includes/css.html +++ /dev/null @@ -1,121 +0,0 @@ - diff --git a/sites/gc-page-feedback/includes/gc-page-feedback.html b/sites/gc-page-feedback/includes/gc-page-feedback.html deleted file mode 100644 index 6acde9c18..000000000 --- a/sites/gc-page-feedback/includes/gc-page-feedback.html +++ /dev/null @@ -1,62 +0,0 @@ -{%- include_relative includes/parameters.liquid -%} -{%- include_relative includes/strings.liquid -%} - -
-
-
-

{{ pft_h3 }}

-
- - - - - - -
- {{ pft_legend }} -
- -
-
- - -
-
-
-

{{ pft_why_note_nojs }}

-

{{ pft_why_note_js }}

-
-
- {{ pft_no_legend }} -
- -
-
- -
-
- -
-
- -
- -
-
- - -

{{ pft_problem6_note }}

-
- -
-
-
-
-

{{ pft_submit_message }}

-
-
-
-
diff --git a/sites/gc-page-feedback/includes/parameters.liquid b/sites/gc-page-feedback/includes/parameters.liquid deleted file mode 100644 index e17fb3b00..000000000 --- a/sites/gc-page-feedback/includes/parameters.liquid +++ /dev/null @@ -1,57 +0,0 @@ -{%- comment -%} -Set parameter variables -{%- endcomment -%} - -{%- capture pft_institutionopt_value -%} - {%- if page.pageFeedback.institutionopt -%} - {{ page.pageFeedback.institutionopt }} - {%- else -%} - Institution - required - must use same abbreviation value EN and FR - {%- endif -%} -{%- endcapture -%} - -{%- capture pft_themeopt_value -%} - {%- if page.pageFeedback.themeopt -%} - {{ page.pageFeedback.themeopt }} - {%- else -%} - Theme - required - must use same value EN and FR - {%- endif -%} -{%- endcapture -%} - -{%- capture pft_sectionopt_value -%} - {%- if page.pageFeedback.sectionopt -%} - {{ page.pageFeedback.sectionopt }} - {%- else -%} - Section - required but can be blank - same value EN and FR - {%- endif -%} -{%- endcapture -%} - -{%- capture pft_pageTitle_value -%} - {%- if page.pageFeedback.pageTitle == "true" -%} - {{ page.title }} - {%- elsif page.pageFeedback.title -%} - {{ page.pageFeedback.pageTitle }} - {%- else -%} - Page title (EN) - required - {%- endif -%} -{%- endcapture -%} - -{%- capture pft_language_value -%} - {%- if page.pageFeedback.language == "true" -%} - {{ i18nText-lang }} - {%- elsif page.pageFeedback.language -%} - {{ page.pageFeedback.language }} - {%- else -%} - Language - required - use EN or FR - {%- endif -%} -{%- endcapture -%} - -{%- capture pft_submissionPage_value -%} - {%- if page.pageFeedback.submissionPage == "true" -%} - {{ page.url | absolute_url }} - {%- elsif page.pageFeedback.submissionPage -%} - {{ page.pageFeedback.submissionPage }} - {%- else -%} - Page URL - required - {%- endif -%} -{%- endcapture -%} diff --git a/sites/gc-page-feedback/includes/strings.liquid b/sites/gc-page-feedback/includes/strings.liquid deleted file mode 100644 index 20f8155e2..000000000 --- a/sites/gc-page-feedback/includes/strings.liquid +++ /dev/null @@ -1,58 +0,0 @@ -{%- comment -%} -Set string variables -{%- endcomment -%} - -{%- assign pft_yes_en = "Yes" -%} -{%- assign pft_no_en = "No" -%} -{%- assign pft_problem1_label_en = "I can’t find the information" -%} -{%- assign pft_problem2_label_en = "The information is hard to understand" -%} -{%- assign pft_problem3_label_en = "There was an error or something didn’t work" -%} -{%- assign pft_problem4_label_en = "Other reason" -%} - -{%- assign pft_yes_fr = "Oui" -%} -{%- assign pft_no_fr = "Non" -%} -{%- assign pft_problem1_label_fr = "Je ne peux pas trouver l’information" -%} -{%- assign pft_problem2_label_fr = "L’information est difficile à comprendre" -%} -{%- assign pft_problem3_label_fr = "Il y avait une erreur ou quelque chose ne fonctionnait pas" -%} -{%- assign pft_problem4_label_fr = "Autre raison" -%} - -{%- assign pft_yes_value = pft_yes_en | append: "-" | append: pft_yes_fr -%} -{%- assign pft_no_value = pft_no_en | strip_html | append: "-" | append: pft_no_fr | strip_html -%} -{%- assign pft_problem1_value = pft_problem1_label_en | strip_html | append: "-" | append: pft_problem1_label_fr | strip_html -%} -{%- assign pft_problem2_value = pft_problem2_label_en | strip_html | append: "-" | append: pft_problem2_label_fr | strip_html -%} -{%- assign pft_problem3_value = pft_problem3_label_en | strip_html | append: "-" | append: pft_problem3_label_fr | strip_html -%} -{%- assign pft_problem4_value = pft_problem4_label_en | strip_html | append: "-" | append: pft_problem4_label_fr | strip_html -%} - -{%- if i18nText-lang == "en" -%} - {%- assign pft_h3 = "Page feedback" -%} - {%- assign pft_legend = "Did you find what you were looking for?" -%} - {%- assign pft_yes = pft_yes_en -%} - {%- assign pft_no = pft_no_en -%} - {%- assign pft_why_note_nojs = "If not, tell us why below:" -%} - {%- assign pft_why_note_js = "Tell us why below:" -%} - {%- assign pft_no_legend = "What was wrong?" -%} - {%- assign pft_problem1_label = pft_problem1_label_en -%} - {%- assign pft_problem2_label = pft_problem2_label_en -%} - {%- assign pft_problem3_label = pft_problem3_label_en -%} - {%- assign pft_problem4_label = pft_problem4_label_en -%} - {%- assign pft_problem6_label = "Please provide more details (maximum 300 characters)" -%} - {%- assign pft_problem6_note = "You will not receive a reply. Telephone numbers and email addresses will be removed." -%} - {%- assign pft_submit = "Submit" -%} - {%- assign pft_submit_message = "Thank you for your feedback." -%} -{%- elsif i18nText-lang == "fr" -%} - {%- assign pft_h3 = "Rétroaction sur la page" -%} - {%- assign pft_legend = "Avez-vous trouvé ce que vous cherchiez?" -%} - {%- assign pft_yes = pft_yes_fr -%} - {%- assign pft_no = pft_no_fr -%} - {%- assign pft_why_note_nojs = "Sinon, dites nous pourquoi ci-dessous :" -%} - {%- assign pft_why_note_js = "Dites nous pourquoi ci-dessous :" -%} - {%- assign pft_no_legend = "Qu’est-ce qui n’allait pas?" -%} - {%- assign pft_problem1_label = pft_problem1_label_fr -%} - {%- assign pft_problem2_label = pft_problem2_label_fr -%} - {%- assign pft_problem3_label = pft_problem3_label_fr -%} - {%- assign pft_problem4_label = pft_problem4_label_fr -%} - {%- assign pft_problem6_label = "Veuillez fournir plus de détails (maximum de 300 caractères)" -%} - {%- assign pft_problem6_note = "Vous ne recevrez aucune réponse. Les numéros de téléphone et les adresses électroniques seront supprimés." -%} - {%- assign pft_submit = "Soumettre" -%} - {%- assign pft_submit_message = "Merci de vos commentaires." -%} -{%- endif -%} diff --git a/sites/gc-page-feedback/index.json-ld b/sites/gc-page-feedback/index.json-ld deleted file mode 100644 index b9e019806..000000000 --- a/sites/gc-page-feedback/index.json-ld +++ /dev/null @@ -1,44 +0,0 @@ -{ - "@context": { - "@version": 1.1, - "dct": "http://purl.org/dc/terms/", - "title": { "@id": "dct:title", "@container": "@language" }, - "description": { "@id": "dct:description", "@container": "@language" }, - "modified": "dct:modified" - }, - "title": { - "en": "Page feedback tool", - "fr": "Outil de rétroaction sur la page" - }, - "description": { - "en": "Page feedback tool for Canada.ca", - "fr": "Outil de rétroaction sur la page pour Canada.ca" - }, - "modified": "2022-12-06", - "componentName": "gc-page-feedback", - "status": "stable", - "pages": { - "examples": [ - { - "title": "Page feedback tool", - "language": "en", - "path": "gc-page-feedback-en.html" - }, - { - "title": "Outil de rétroaction sur la page", - "language": "fr", - "path": "gc-page-feedback-fr.html" - }, - { - "title": "Page feedback tool with custom parameters", - "language": "en", - "path": "gc-page-feedback-custom-en.html" - }, - { - "title": "Outil de rétroaction sur la page avec paramètres personnalisés", - "language": "fr", - "path": "gc-page-feedback-custom-fr.html" - } - ] - } -} diff --git a/sites/includes/settings.liquid b/sites/includes/settings.liquid index 631fce2fc..16eb9205a 100644 --- a/sites/includes/settings.liquid +++ b/sites/includes/settings.liquid @@ -12,3 +12,4 @@ https://wet-boew.github.io/themes-dist/GCWeb/{{ setting-packageName }} {%- endcapture -%} {%- assign setting-resourcesBasePathWetboew = "https://wet-boew.github.io/themes-dist/GCWeb/wet-boew" -%} +{%- assign setting-root = "/GCWeb" -%} diff --git a/sites/page-details/includes/footer.html b/sites/page-details/includes/footer.html index 76b3e36c9..1a189a7e1 100644 --- a/sites/page-details/includes/footer.html +++ b/sites/page-details/includes/footer.html @@ -2,7 +2,7 @@

{{ i18nText-pageDetails }}

{% assign col-modified = "col-xs-12" %} - {%- if page.pageFeedback or page.noReportProblem != true -%} + {%- if page.noFeedback != true -%} {% assign col-feedback = "col-sm-8 col-md-9 col-lg-9" %} {%- if page.share -%} {% assign col-share = "col-sm-4 col-md-3" %} @@ -15,15 +15,9 @@

{{ i18nText-pageDetails }}

{%- endif -%}
- {%- if page.pageFeedback or page.noReportProblem != true -%} + {%- if page.noFeedback != true -%} {%- endif -%} {%- if page.share -%} diff --git a/sites/page-details/page-details-without-buttons-en.html b/sites/page-details/page-details-without-buttons-en.html index a8418c98f..6868bf8b8 100644 --- a/sites/page-details/page-details-without-buttons-en.html +++ b/sites/page-details/page-details-without-buttons-en.html @@ -8,7 +8,7 @@ ], "secondlevel": false, "dateModified": "2022-04-14", - "noReportProblem": true + "noFeedback": true } --- diff --git a/sites/page-details/page-details-without-buttons-fr.html b/sites/page-details/page-details-without-buttons-fr.html index 93d8c6046..ffc66742c 100644 --- a/sites/page-details/page-details-without-buttons-fr.html +++ b/sites/page-details/page-details-without-buttons-fr.html @@ -8,7 +8,7 @@ ], "secondlevel": false, "dateModified": "2022-04-14", - "noReportProblem": true + "noFeedback": true } --- diff --git a/sites/page-details/page-details-without-report-btn-en.html b/sites/page-details/page-details-without-report-btn-en.html index 2309601b8..20e32ccfe 100644 --- a/sites/page-details/page-details-without-report-btn-en.html +++ b/sites/page-details/page-details-without-report-btn-en.html @@ -9,7 +9,7 @@ "secondlevel": false, "dateModified": "2022-04-14", "share": true, - "noReportProblem": true + "noFeedback": true } --- diff --git a/sites/page-details/page-details-without-report-btn-fr.html b/sites/page-details/page-details-without-report-btn-fr.html index 94944df34..66aace63c 100644 --- a/sites/page-details/page-details-without-report-btn-fr.html +++ b/sites/page-details/page-details-without-report-btn-fr.html @@ -9,7 +9,7 @@ "secondlevel": false, "dateModified": "2022-04-14", "share": true, - "noReportProblem": true + "noFeedback": true } --- diff --git a/sites/theme.scss b/sites/theme.scss index eb1999684..83bcc6334 100644 --- a/sites/theme.scss +++ b/sites/theme.scss @@ -74,7 +74,7 @@ @import "search/base"; @import "secondary-menu/base"; @import "page-details/base"; -@import "gc-page-feedback/base"; +@import "feedback/base"; @import "gcweb-menu/base"; @import "authentication/base"; @import "header/base"; @@ -312,7 +312,7 @@ @import "baseline/lists/screen-md-min"; @import "gcweb-menu/screen-md-min"; - @import "page-details/screen-md-min"; + @import "feedback/screen-md-min"; @import "wet-boew/src/plugins/feeds/screen-md-min"; @import "wet-boew/src/plugins/tabs/screen-md-min"; @@ -368,8 +368,7 @@ @import "wet-boew/src/base/views/screen-sm-min-to-screen-sm-max"; @import "search/screen-sm-min-to-screen-sm-max"; - @import "page-details/screen-sm-min"; - @import "gc-page-feedback/screen-sm-min"; + @import "feedback/screen-sm-min-to-screen-sm-max"; @import "../templates/campaign/screen-sm-min-to-screen-sm-max"; } @@ -410,7 +409,7 @@ @import "search/print"; @import "secondary-menu/print"; @import "page-details/print"; - @import "gc-page-feedback/print"; + @import "feedback/print"; @import "wet-boew/src/plugins/footnotes/print"; @import "wet-boew/src/plugins/geomap/print"; diff --git a/templates/home/home-en.html b/templates/home/home-en.html index c4af65ddc..cb6114e01 100644 --- a/templates/home/home-en.html +++ b/templates/home/home-en.html @@ -4,7 +4,7 @@ altLangPage: home-fr.html dateModified: 2021-07-07 layout: home -noReportProblem: true +noFeedback: true breadcrumbs: false --- diff --git a/templates/home/home-fr.html b/templates/home/home-fr.html index becf0d7ff..f597052c4 100644 --- a/templates/home/home-fr.html +++ b/templates/home/home-fr.html @@ -4,7 +4,7 @@ altLangPage: home-en.html dateModified: 2021-07-07 layout: home -noReportProblem: true +noFeedback: true breadcrumbs: false --- diff --git a/templates/thematic/dark-theme-home-en.html b/templates/thematic/dark-theme-home-en.html index 8978dddd0..9df0df8e2 100644 --- a/templates/thematic/dark-theme-home-en.html +++ b/templates/thematic/dark-theme-home-en.html @@ -4,7 +4,7 @@ altLangPage: dark-theme-home-fr.html dateModified: 2021-07-07 layout: home -noReportProblem: true +noFeedback: true share: true pageclass: provisional dark-theme --- diff --git a/templates/thematic/dark-theme-home-fr.html b/templates/thematic/dark-theme-home-fr.html index 7f6d9ec55..8398d74ae 100644 --- a/templates/thematic/dark-theme-home-fr.html +++ b/templates/thematic/dark-theme-home-fr.html @@ -4,7 +4,7 @@ altLangPage: dark-theme-home-en.html dateModified: 2021-07-07 layout: home -noReportProblem: true +noFeedback: true share: true pageclass: provisional dark-theme --- diff --git a/templates/thematic/pink-day-home-en.html b/templates/thematic/pink-day-home-en.html index c87c1a9d8..313b7d6ba 100644 --- a/templates/thematic/pink-day-home-en.html +++ b/templates/thematic/pink-day-home-en.html @@ -4,7 +4,7 @@ altLangPage: pink-day-home-fr.html dateModified: 2021-07-07 layout: home -noReportProblem: true +noFeedback: true share: true pageclass: provisional pnkDy-theme --- diff --git a/templates/thematic/pink-day-home-fr.html b/templates/thematic/pink-day-home-fr.html index aec32142c..fac217ff7 100644 --- a/templates/thematic/pink-day-home-fr.html +++ b/templates/thematic/pink-day-home-fr.html @@ -4,7 +4,7 @@ altLangPage: pink-day-home-en.html dateModified: 2021-07-07 layout: home -noReportProblem: true +noFeedback: true share: true pageclass: provisional pnkDy-theme ---