Skip to content

Commit

Permalink
Merge pull request #608 from alphagov/add-maybe-link-to-feedback
Browse files Browse the repository at this point in the history
Add a maybe button to the feedback component
  • Loading branch information
thomasleese authored Nov 8, 2018
2 parents 959fd7b + a6fd25a commit db35a3a
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 15 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
useful summary for people upgrading their application, not a replication
of the commit log.

* Add a hidden 'Maybe' option to the feedback component. (PR #608)

## 12.4.0

* Updates current breadcrumbs components to be based on GOV.UK Frontend (PR #593)
Expand Down
47 changes: 32 additions & 15 deletions app/views/govuk_publishing_components/components/_feedback.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -12,40 +12,57 @@
<div class="gem-c-feedback__js-prompt-questions js-prompt-questions">
<h2 class="gem-c-feedback__prompt-question">Is this page useful?</h2>

<%= link_to contact_govuk_path, {
class: 'gem-c-feedback__prompt-link',
data: {
'track-category' => 'yesNoFeedbackForm',
'track-action' => 'ffMaybeClick'
},
'aria-expanded': false,
role: 'button',
style: 'display: none;',
hidden: 'hidden',
'aria-hidden': 'true',
} do %>
Maybe
<% end %>

<%= link_to contact_govuk_path, {
class: 'gem-c-feedback__prompt-link gem-c-feedback__prompt-link--useful js-page-is-useful',
data: {
'track-category' => 'yesNoFeedbackForm',
'track-action' => 'ffYesClick'
},
} do %>
Yes <span class="visually-hidden">this page is useful</span>
},
'aria-expanded': false,
role: 'button',
} do %>
Yes <span class="visually-hidden">this page is useful</span>
<% end %>

<%= link_to contact_govuk_path, {
class: 'gem-c-feedback__prompt-link js-toggle-form js-page-is-not-useful',
data: {
'track-category' => 'yesNoFeedbackForm',
'track-action' => 'ffNoClick'
},
'aria-controls': 'page-is-not-useful',
'aria-expanded': false,
'role': 'button'
} do %>
No <span class="visually-hidden">this page is not useful</span>
},
'aria-controls': 'page-is-not-useful',
'aria-expanded': false,
role: 'button',
} do %>
No <span class="visually-hidden">this page is not useful</span>
<% end %>

<%= link_to contact_govuk_path, {
class: 'gem-c-feedback__prompt-link gem-c-feedback__prompt-link--wrong js-toggle-form js-something-is-wrong',
data: {
'track-category' => 'Onsite Feedback',
'track-action' => 'GOV.UK Open Form'
},
'aria-controls': 'something-is-wrong',
'aria-expanded': false,
'role': 'button'
} do %>
Is there anything wrong with this page?
},
'aria-controls': 'something-is-wrong',
'aria-expanded': false,
role: 'button',
} do %>
Is there anything wrong with this page?
<% end %>
</div>

Expand Down

0 comments on commit db35a3a

Please sign in to comment.