-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add generic thumbs up/down feedback buttons and analytics to all cards (#938, #939, #940). - Include a `feedback` config option in `dataForRender` so user can specify if feedback buttons should appear on the card or not. - Create a shared partial for the buttons that is used in all cards, including direct answer cards - Update analytics for direct answer feedback with additional event attributes. J=SLAP-1544, 1545 TEST=manual Smoke testing to see if thumbs up/down buttons function as expected on all cards and send analytics.
- Loading branch information
Showing
84 changed files
with
948 additions
and
373 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
{{#if directAnswerClass}} | ||
{{> feedback className=directAnswerClass cardType='HitchhikerDirectAnswerCard'}} | ||
{{else}} | ||
{{> feedback className='HitchhikerCard' cardType='HitchhikerCard'}} | ||
{{/if}} | ||
|
||
{{#*inline 'feedback'}} | ||
<div class="{{className}}-feedbackWrapper"> | ||
<div class="{{className}}-feedbackContent"> | ||
{{#if feedbackSubmitted}} | ||
<div class="{{className}}-feedbackText"> | ||
{{feedbackTextOnSubmission}} | ||
</div> | ||
{{else}} | ||
{{#if feedbackText}} | ||
<div class="{{className}}-feedbackText"> | ||
{{feedbackText}} | ||
</div> | ||
{{/if}} | ||
<div class="{{className}}-thumbsWrapper"> | ||
<form class="HitchhikerCard-thumbs js-{{cardType}}-feedbackForm"> | ||
<fieldset class="HitchhikerCard-fieldset"> | ||
<label class="HitchhikerCard-thumb"> | ||
<span class="HitchhikerCard-thumbUpIcon"> | ||
{{> icons/builtInIcon iconName='thumb' }} | ||
</span> | ||
<input type="radio" | ||
name="feedback" | ||
value="true" | ||
class="HitchhikerCard-feedback HitchhikerCard-thumbUpButton js-{{cardType}}-thumbInput"> | ||
<span class="sr-only"> | ||
{{positiveFeedbackSrText}} | ||
</span> | ||
</label> | ||
<label class="HitchhikerCard-thumb"> | ||
<span class="HitchhikerCard-thumbDownIcon"> | ||
{{> icons/builtInIcon iconName='thumb' }} | ||
</span> | ||
<input type="radio" | ||
name="feedback" | ||
value="false" | ||
class="HitchhikerCard-feedback HitchhikerCard-thumbDownButton js-{{cardType}}-thumbInput"> | ||
<span class="sr-only"> | ||
{{negativeFeedbackSrText}} | ||
</span> | ||
</label> | ||
</fieldset> | ||
<button type="submit" class="sr-only sr-only-focusable">Send feedback</button> | ||
</form> | ||
</div> | ||
{{/if}} | ||
</div> | ||
</div> | ||
{{/inline}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.