Use order links in moderation section

Using order links in this case causes an unusual interface, where we
show filter links, then information about the number of results, and
then order links.

Whether or not this makes sense needs to be confirmed with usability
tests. In any case, this is still way better than using `<select>`
fields which automatically change to a new page, since they cause
problems to keyboard users, are harder to select for touchscreen users,
might confuse screen reader users who will notice a form but no way to
submit it, and are not elements we generally use to let users choose the
order of the records.

For a more detailed explanation of these issues, check the commit
message in the commit "Use order links to sort comments and topics"
(just a few commits ago).
This commit is contained in:
Javi Martín
2021-06-27 20:08:50 +02:00
parent 55cf502e8f
commit 227a5868b8
10 changed files with 25 additions and 25 deletions

View File

@@ -298,7 +298,8 @@ $table-header: #ecf1f6;
margin-bottom: 0;
}
.menu.simple {
.menu.simple,
.order-links {
margin-bottom: $line-height / 2;
h2 {
@@ -313,6 +314,10 @@ $table-header: #ecf1f6;
}
}
.order-links {
margin-bottom: $line-height;
}
.tabs-panel {
padding-left: 0;
padding-right: 0;

View File

@@ -3,10 +3,10 @@
<%= render "shared/filter_subnav", i18n_namespace: "moderation.#{i18n_namespace}.index" %>
<h3 class="inline-block"><%= page_entries_info records %></h3>
<div class="float-right">
<%= t("moderation.#{i18n_namespace}.index.order") %>
<%= render "shared/order_selector", i18n_namespace: "moderation.#{i18n_namespace}.index" %>
</div>
<% if records.any? %>
<%= render "shared/order_links", i18n_namespace: "moderation.#{i18n_namespace}.index" %>
<% end %>
<%= form_tag form_path, method: :put do %>
<p class="float-left js-check">