docbrown/app/views/comments/_sort_option.html.erb
VISHAL DEEPAK 1345334b33
Added a way to sort comments on an article (#16686)
* Added a way to sort comments on an article

* Sorting of comments now uses crayons-dropwn. Some minor fixes as per comments on PR

* Add and fix test cases for sorting comments functionality

* Changes in code for sort comments.  Code  is more aligned with forem's conventions

* Added cyperss tests for sort comments on an article. Cleaned up code to better follow forem conventions

* Get fresh handle of triggerButton everytime clickOustideListener is clicked. Fix Cypress test cases to reflect the earlier.
2022-04-01 09:26:18 -05:00

13 lines
523 B
Text

<li class="comment-sort-option mt-2 pl-7">
<a
href="<%= @article.path %>?comments_sort=<%= sort_order %>"
class="comment-sort-option__header"
aria-describedby="<%= sort_order %>-description-text"
aria-current="<%= "page" if show_selected %>">
<%= crayons_icon_tag(:checkmark, title: "Selected Sort Option", aria_hidden: true) if show_selected %>
<%= sort_title %>
</a>
<div id="<%= sort_order %>-description-text" class="crayons-field__description">
<%= sort_description %>
</div>
</li>