* Optional hiding child comments (start) * Changed confirm button in comments hide form * Hide children comments if hide_children was passed * Added a spec for hidden child comment notifications * Hide only explicitly hidden comments * Hide comment modal on article page * Prevent default behaviour for hide comment link * Improved hide comments modal looks * Improved hide comments modal looks * Removed unused code * Send hide comment form via fetch * Hide comment descendants when hide_children was passed * Don't hide hidden comments descendants on permalink * Removed unnecesary span * Improved hide comments modal styling * Removed unused styles and js, improved styling * Clickable label Co-authored-by: ludwiczakpawel <ludwiczakpawel@gmail.com> * Fixed showing hidden comments spoiler for article author * Fixed hideArticleComments.spec.js * Fixed displaying hidden comments text for artice author, added specs * Target hide comments modal inside the modal when adding a listener Co-authored-by: Suzanne Aitchison <suzanne@forem.com> * Replaced hide comment link with a button * Refactored adding hide_children url param Co-authored-by: Suzanne Aitchison <suzanne@forem.com> * Fixed cypress hide comments test * Removed aria-label for submit on the hide comments modal * Fixed formatting Co-authored-by: ludwiczakpawel <ludwiczakpawel@gmail.com> Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
19 lines
957 B
Text
19 lines
957 B
Text
<div id="hide-comments-modal" class="hidden">
|
|
<%= form_with url: "/comments/hide", class: "hide-comments-modal__form", id: "hide-comments-modal__form", method: :patch, remote: true, html: { "data-type": "json" } do |f| %>
|
|
<div class="hide-comments-modal__content">
|
|
<p class="pb-2">
|
|
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
|
|
</p>
|
|
<label class="crayons-field crayons-field--checkbox my-2">
|
|
<%= f.check_box :hide_children, class: "hide_children crayons-checkbox" %>
|
|
<p class="crayons-field__label">Hide child comments as well</p>
|
|
</label>
|
|
<p class="pb-4 pt-2">
|
|
<button type="submit" class="crayons-btn">
|
|
Confirm
|
|
</button>
|
|
</p>
|
|
</div>
|
|
<% end %>
|
|
<p class="fs-s color-base-60">For further actions, you may consider blocking this person and/or reporting abuse</p>
|
|
</div>
|