From 989bc21b3ffc8fe424bb35918ad4cad9ba216080 Mon Sep 17 00:00:00 2001 From: zeotuan <48720253+zeotuan@users.noreply.github.com> Date: Wed, 28 Jul 2021 07:03:59 +1000 Subject: [PATCH] Fix inappropriate landmark nesting dashboard 10873 (#14308) * change dashboard landmark nesting * switch to main db/schema.rb * remove unnecessary div * revert scema.rb to main * fix user_visits_dashboard test * change aside to nav, put nav back into main-content * remove unnecessary file * remove duplicate nav * add id to main Co-authored-by: Suzanne Aitchison Co-authored-by: Suzanne Aitchison --- app/views/articles/stats.html.erb | 6 +- app/views/dashboards/analytics.erb | 64 +++++++++---------- app/views/dashboards/followers.html.erb | 11 ++-- .../following_organizations.html.erb | 13 ++-- .../dashboards/following_podcasts.html.erb | 12 ++-- app/views/dashboards/following_tags.html.erb | 11 ++-- app/views/dashboards/following_users.html.erb | 13 ++-- app/views/dashboards/show.html.erb | 10 ++- .../dashboards/user_visits_dashboard_spec.rb | 2 +- 9 files changed, 60 insertions(+), 82 deletions(-) diff --git a/app/views/articles/stats.html.erb b/app/views/articles/stats.html.erb index 45c81ab68..5b6ab3c8c 100644 --- a/app/views/articles/stats.html.erb +++ b/app/views/articles/stats.html.erb @@ -1,11 +1,9 @@ <% title "Stats for Your Article" %>
-
-

Stats for "<%= link_to @article.title, @article.current_state_path, id: "article", data: { "article-id" => @article.id, "organization-id" => @organization_id } %>"

+

Stats for "<%= link_to @article.title, @article.current_state_path, id: "article", data: { "article-id" => @article.id, "organization-id" => @organization_id } %>"

- <%= render "shared/stats" %> -
+ <%= render "shared/stats" %>
<%= javascript_packs_with_chunks_tag "analyticsArticle", defer: true %> diff --git a/app/views/dashboards/analytics.erb b/app/views/dashboards/analytics.erb index 2717a4de3..d5a6180d9 100644 --- a/app/views/dashboards/analytics.erb +++ b/app/views/dashboards/analytics.erb @@ -1,43 +1,41 @@ <% title "Analytics" %> -
-
- <% if @organizations.any? %> - + <% end %> -
-

Analytics Dashboard for <%= @user_or_org.name %>

-

Welcome to the Analytics Dashboard, the home of in-depth user metrics so that authors can make data-driven decisions about the <%= Settings::Community.member_label %> ecosystem.

-

This dashboard highlights deep insights especially relevant to <%= Settings::Community.member_label %> relations, authors, and serious bloggers.

-
- - <%= render "shared/stats" %> +
+

Analytics Dashboard for <%= @user_or_org.name %>

+

Welcome to the Analytics Dashboard, the home of in-depth user metrics so that authors can make data-driven decisions about the <%= Settings::Community.member_label %> ecosystem.

+

This dashboard highlights deep insights especially relevant to <%= Settings::Community.member_label %> relations, authors, and serious bloggers.

+ + <%= render "shared/stats" %>
<%= javascript_packs_with_chunks_tag "analyticsDashboard", defer: true %> diff --git a/app/views/dashboards/followers.html.erb b/app/views/dashboards/followers.html.erb index 77be335c5..b72061f04 100644 --- a/app/views/dashboards/followers.html.erb +++ b/app/views/dashboards/followers.html.erb @@ -3,17 +3,15 @@
-

Dashboard » Followers

<%= render "actions_mobile" %>
-
- - +
<% if @follows.any? %>
@@ -47,6 +45,5 @@ <% end %> <%= render "sublist" %>
-
-
+
diff --git a/app/views/dashboards/following_organizations.html.erb b/app/views/dashboards/following_organizations.html.erb index 4993978fb..dfab51ad3 100644 --- a/app/views/dashboards/following_organizations.html.erb +++ b/app/views/dashboards/following_organizations.html.erb @@ -3,19 +3,17 @@
-
+

Dashboard » Following organizations

<%= render "actions_mobile" %>
-
- - +
- <% if @followed_organizations.any? %>
<% @followed_organizations.each do |follow| %> @@ -46,6 +44,5 @@ <% end %> <%= render "sublist" %>
-
-
+
diff --git a/app/views/dashboards/following_podcasts.html.erb b/app/views/dashboards/following_podcasts.html.erb index 265db0aa6..3d6c8837b 100644 --- a/app/views/dashboards/following_podcasts.html.erb +++ b/app/views/dashboards/following_podcasts.html.erb @@ -3,19 +3,16 @@
-

Dashboard » Following podcasts

<%= render "actions_mobile" %>
-
- - +
- <% if @followed_podcasts.any? %>
<% @followed_podcasts.each do |follow| %> @@ -46,6 +43,5 @@ <% end %> <%= render "sublist" %>
-
-
+
diff --git a/app/views/dashboards/following_tags.html.erb b/app/views/dashboards/following_tags.html.erb index 11bf1bae7..7706b81f7 100644 --- a/app/views/dashboards/following_tags.html.erb +++ b/app/views/dashboards/following_tags.html.erb @@ -3,17 +3,15 @@
-

Dashboard » Following tags

<%= render "actions_mobile" %>
-
- - +
<% if @followed_tags.any? %> <%= javascript_packs_with_chunks_tag "dashboardTagsDisableUnchangedButtons", defer: true %> @@ -59,6 +57,5 @@ <% end %> <%= render "sublist" %>
-
- + diff --git a/app/views/dashboards/following_users.html.erb b/app/views/dashboards/following_users.html.erb index 1d8f691b3..c34031abb 100644 --- a/app/views/dashboards/following_users.html.erb +++ b/app/views/dashboards/following_users.html.erb @@ -3,19 +3,17 @@
-
+

Dashboard » Following users

<%= render "actions_mobile" %>
-
- - +
- <% if @follows.any? %>
<% @follows.each do |follow| %> @@ -48,6 +46,5 @@ <% end %> <%= render "sublist" %>
-
-
+
diff --git a/app/views/dashboards/show.html.erb b/app/views/dashboards/show.html.erb index 0a07c709b..3d9c39f57 100644 --- a/app/views/dashboards/show.html.erb +++ b/app/views/dashboards/show.html.erb @@ -1,16 +1,15 @@ <% title "Dashboard" %> -

Dashboard

<%= render "actions_mobile" %> <%= render "analytics" %>
-
- +
@@ -66,5 +65,4 @@
<% end %>
- -
+ diff --git a/spec/system/dashboards/user_visits_dashboard_spec.rb b/spec/system/dashboards/user_visits_dashboard_spec.rb index 79ffefb14..ae9bc22fb 100644 --- a/spec/system/dashboards/user_visits_dashboard_spec.rb +++ b/spec/system/dashboards/user_visits_dashboard_spec.rb @@ -22,7 +22,7 @@ RSpec.describe "Dashboard", type: :system, js: true do visit dashboard_path - within "main > header" do + within "header:nth-child(1)" do expect(page).to have_text("1") end end