From e382a086bc1be73db3339b2a8192a2889a9bff8f Mon Sep 17 00:00:00 2001 From: Suzanne Aitchison Date: Thu, 25 Mar 2021 08:45:01 +0000 Subject: [PATCH] Add skip link functionality to dashboard pages (#13115) * add skip link functionality to dashboard pages * add skip link to listings dashboard * add missed follow users dashboard --- app/views/collections/index.html.erb | 4 +- app/views/dashboards/followers.html.erb | 84 +++++++------- .../following_organizations.html.erb | 82 +++++++------- .../dashboards/following_podcasts.html.erb | 82 +++++++------- app/views/dashboards/following_tags.html.erb | 106 +++++++++--------- app/views/dashboards/following_users.html.erb | 84 +++++++------- app/views/dashboards/show.html.erb | 2 +- app/views/listings/dashboard.html.erb | 16 +-- 8 files changed, 236 insertions(+), 224 deletions(-) diff --git a/app/views/collections/index.html.erb b/app/views/collections/index.html.erb index 6bfc9c2d5..eb069adad 100644 --- a/app/views/collections/index.html.erb +++ b/app/views/collections/index.html.erb @@ -4,7 +4,7 @@ <%= render "collections/meta", title_string: title_string %> <% end %> -
+

<%= title_string %>

@@ -22,4 +22,4 @@

This user doesn't have any series

<% end %>
- + diff --git a/app/views/dashboards/followers.html.erb b/app/views/dashboards/followers.html.erb index c2c035962..4963a4867 100644 --- a/app/views/dashboards/followers.html.erb +++ b/app/views/dashboards/followers.html.erb @@ -1,50 +1,52 @@ <% title("Dashboard - #{community_name}") %> -
-
-

Dashboard » Followers

- <%= render "actions_mobile" %> -
+
+
+
+

Dashboard » Followers

+ <%= render "actions_mobile" %> +
-
- +
+ -
- <% if @follows.any? %> -
- <% @follows.each do |follow| %> - <% user = follow.follower %> - <% if user %> -
- - <%= user.username %> profile image - +
+ <% if @follows.any? %> +
+ <% @follows.each do |follow| %> + <% user = follow.follower %> + <% if user %> +
+ + <%= user.username %> profile image + - -
+ <% end %> <% end %> - <% end %> -
- <% else %> -
You don't have any followers yet...
- <% end %> - <%= render "sublist" %> +
+ <% else %> +
You don't have any followers yet...
+ <% end %> + <%= render "sublist" %> +
-
-
+
+ diff --git a/app/views/dashboards/following_organizations.html.erb b/app/views/dashboards/following_organizations.html.erb index 6c037ab68..65eb979e3 100644 --- a/app/views/dashboards/following_organizations.html.erb +++ b/app/views/dashboards/following_organizations.html.erb @@ -1,49 +1,51 @@ <% title("Dashboard - #{community_name}") %> -
-
-

Dashboard » Following organizations

- <%= render "actions_mobile" %> -
+
+
+
+

Dashboard » Following organizations

+ <%= render "actions_mobile" %> +
-
- +
+ -
+
- <% if @followed_organizations.any? %> -
- <% @followed_organizations.each do |follow| %> - <% organization = follow.followable %> -
- + <% if @followed_organizations.any? %> +
+ <% @followed_organizations.each do |follow| %> + <% organization = follow.followable %> +
+ - -
- <% end %> -
- <% else %> -
You don't follow any organizations yet...
- <% end %> - <%= render "sublist" %> + <% end %> +
+ <% else %> +
You don't follow any organizations yet...
+ <% end %> + <%= render "sublist" %> +
-
-
+
+ diff --git a/app/views/dashboards/following_podcasts.html.erb b/app/views/dashboards/following_podcasts.html.erb index 945651986..54ae46d01 100644 --- a/app/views/dashboards/following_podcasts.html.erb +++ b/app/views/dashboards/following_podcasts.html.erb @@ -1,49 +1,51 @@ <% title("Dashboard - #{community_name}") %> -
-
-

Dashboard » Following podcasts

- <%= render "actions_mobile" %> -
+
+
+
+

Dashboard » Following podcasts

+ <%= render "actions_mobile" %> +
-
- +
+ -
+
- <% if @followed_podcasts.any? %> -
- <% @followed_podcasts.each do |follow| %> - <% podcast = follow.followable %> -
- + <% if @followed_podcasts.any? %> +
+ <% @followed_podcasts.each do |follow| %> + <% podcast = follow.followable %> +
+ - -
- <% end %> -
- <% else %> -
You don't follow any podcasts yet...
- <% end %> - <%= render "sublist" %> + <% end %> +
+ <% else %> +
You don't follow any podcasts yet...
+ <% end %> + <%= render "sublist" %> +
-
-
+
+ diff --git a/app/views/dashboards/following_tags.html.erb b/app/views/dashboards/following_tags.html.erb index bc1b97276..895bd4a53 100644 --- a/app/views/dashboards/following_tags.html.erb +++ b/app/views/dashboards/following_tags.html.erb @@ -1,62 +1,64 @@ <% title("Dashboard - #{community_name}") %> -
-
-

Dashboard » Following tags

- <%= render "actions_mobile" %> -
+
+
+
+

Dashboard » Following tags

+ <%= render "actions_mobile" %> +
-
- +
+ -
- <% if @followed_tags.any? %> - <%= javascript_packs_with_chunks_tag "dashboardTagsDisableUnchangedButtons", defer: true %> +
+ <% if @followed_tags.any? %> + <%= javascript_packs_with_chunks_tag "dashboardTagsDisableUnchangedButtons", defer: true %> -
- Adjust tag weight to modify your home feed. Higher values mean more appearances for that tag. - Default 1.0 -
-
- <% negative_follow_shown_once = false %> - <% @followed_tags.each do |follow| %> - <% tag = follow.followable %> - <% if tag %> - <% color = Color::CompareHex.new([tag.bg_color_hex || "#0000000", tag.text_color_hex || "#ffffff"]).brightness(0.8) %> -
-

- - #<%= tag.name %> - - <% if follow.explicit_points < 0 %> - Anti-follow +
+ Adjust tag weight to modify your home feed. Higher values mean more appearances for that tag. + Default 1.0 +
+
+ <% negative_follow_shown_once = false %> + <% @followed_tags.each do |follow| %> + <% tag = follow.followable %> + <% if tag %> + <% color = Color::CompareHex.new([tag.bg_color_hex || "#0000000", tag.text_color_hex || "#ffffff"]).brightness(0.8) %> +
+

+ + #<%= tag.name %> + + <% if follow.explicit_points < 0 %> + Anti-follow + <% end %> +

+ +

+ <%= strip_tags(tag.short_summary) %> +

+ + <%= fields(follow) do |f| %> + <%= f.hidden_field(:id, name: "follows[][id]", form: "follows_update_form") %> + <%= f.number_field(:explicit_points, step: :any, required: true, class: "crayons-textfield flex-1 fs-s", name: "follows[][explicit_points]", form: "follows_update_form") %> <% end %> -

- -

- <%= strip_tags(tag.short_summary) %> -

- - <%= fields(follow) do |f| %> - <%= f.hidden_field(:id, name: "follows[][id]", form: "follows_update_form") %> - <%= f.number_field(:explicit_points, step: :any, required: true, class: "crayons-textfield flex-1 fs-s", name: "follows[][explicit_points]", form: "follows_update_form") %> - <% end %> -
+
+ <% end %> <% end %> - <% end %> -
+
- <%= form_with url: bulk_update_follows_path, method: :patch, local: true, class: "sticky bg-base-10 pt-3 pb-1 z-elevate", html: { style: "bottom: 0;margin-left:-1px"}, id: "follows_update_form" do |f| %> - + <%= form_with url: bulk_update_follows_path, method: :patch, local: true, class: "sticky bg-base-10 pt-3 pb-1 z-elevate", html: { style: "bottom: 0;margin-left:-1px" }, id: "follows_update_form" do |f| %> + + <% end %> + <% else %> +
You don't follow any tags yet...
<% end %> - <% else %> -
You don't follow any tags yet...
- <% end %> - <%= render "sublist" %> + <%= render "sublist" %> +
-
-
+ + diff --git a/app/views/dashboards/following_users.html.erb b/app/views/dashboards/following_users.html.erb index eccb4b947..1f8a7cddb 100644 --- a/app/views/dashboards/following_users.html.erb +++ b/app/views/dashboards/following_users.html.erb @@ -1,51 +1,53 @@ <% title("Dashboard - #{community_name}") %> -
-
-

Dashboard » Following users

- <%= render "actions_mobile" %> -
+
+
+
+

Dashboard » Following users

+ <%= render "actions_mobile" %> +
-
- +
+ -
+
- <% if @follows.any? %> -
- <% @follows.each do |follow| %> - <% user = follow.followable %> - <% if user %> -
- - <%= user.username %> profile image - + <% if @follows.any? %> +
+ <% @follows.each do |follow| %> + <% user = follow.followable %> + <% if user %> +
+ + <%= user.username %> profile image + - -
+ <% end %> <% end %> - <% end %> -
- <% else %> -
You don't follow any users...
- <% end %> - <%= render "sublist" %> +
+ <% else %> +
You don't follow any users...
+ <% end %> + <%= render "sublist" %> +
-
-
+
+ diff --git a/app/views/dashboards/show.html.erb b/app/views/dashboards/show.html.erb index b1c7ec09b..b995bc56b 100644 --- a/app/views/dashboards/show.html.erb +++ b/app/views/dashboards/show.html.erb @@ -1,6 +1,6 @@ <% title "Dashboard" %> -
+

Dashboard

<%= render "actions_mobile" %> diff --git a/app/views/listings/dashboard.html.erb b/app/views/listings/dashboard.html.erb index 264d3df7d..ac0f6b122 100644 --- a/app/views/listings/dashboard.html.erb +++ b/app/views/listings/dashboard.html.erb @@ -1,9 +1,11 @@ <% title "Listings Dashboard" %> -
-
-<%= javascript_packs_with_chunks_tag "listingDashboard", defer: true %> +
+
+
+ <%= javascript_packs_with_chunks_tag "listingDashboard", defer: true %> +