-
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 feedback buttons to cards (#938)
Add thumbs up/down feedback buttons to all cards without doing card-specific styling yet. Created a shared partial for the buttons, as well as a new config option in 'dataForRender', called 'feedback' that controls whether or not the buttons appear. Used the shared partial in all cards, including direct answers cards. J=SLAP-1544 TEST=manual Smoke testing to see if thumbs up/down buttons appear on each card
- Loading branch information
Showing
71 changed files
with
596 additions
and
422 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
<div class="{{cardType}}-feedbackWrapper"> | ||
<div class="{{cardType}}-feedback"> | ||
{{#if feedbackSubmitted}} | ||
<div class="{{cardType}}-feedbackText"> | ||
{{feedbackTextOnSubmission}} | ||
</div> | ||
{{else}} | ||
{{#if feedbackText}} | ||
<div class="{{cardType}}-feedbackText"> | ||
{{feedbackText}} | ||
</div> | ||
{{/if}} | ||
<div class="{{cardType}}-thumbsWrapper"> | ||
<form class="HitchhikerCard-thumbs js-HitchhikerCard-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-HitchhikerCard-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-HitchhikerCard-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> |
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
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.