* 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.
13 lines
523 B
Text
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>
|