diff --git a/app/assets/stylesheets/notifications.css b/app/assets/stylesheets/notifications.css index d8779c2e6..bc95412d7 100644 --- a/app/assets/stylesheets/notifications.css +++ b/app/assets/stylesheets/notifications.css @@ -94,3 +94,17 @@ } } } + +.notifications__empty-message { + .notificiations-list:has(.notification) & { + display: none; + } +} + +.notificiations-list--read { + display: none; + + &:has(.notification) { + display: flex; + } +} diff --git a/app/views/notifications/index.html.erb b/app/views/notifications/index.html.erb index bf83657ee..4b76c0779 100644 --- a/app/views/notifications/index.html.erb +++ b/app/views/notifications/index.html.erb @@ -13,7 +13,7 @@ <% end %> -
+
<% if @unread.any? %>

New for you

@@ -22,15 +22,13 @@ <%= render partial: "notifications/notification", collection: @unread, cached: true %> <% else %> - <%# FIXME: Need to reveal this section if there are unread notification records in it %> -
+
Nothing new for you.
<% end %>
-<%# FIXME: Need to hide this section if there are no notification records in it, but then it needs to appear when any are added %> -
+

Previously seen

diff --git a/test/controllers/cards_controller_test.rb b/test/controllers/cards_controller_test.rb index 5651ebcb9..5cb3a6582 100644 --- a/test/controllers/cards_controller_test.rb +++ b/test/controllers/cards_controller_test.rb @@ -39,7 +39,7 @@ class CardsControllerTest < ActionDispatch::IntegrationTest image: fixture_file_upload("moon.jpg", "image/jpeg"), description: "Something more in-depth", tag_ids: [ tags(:mobile).id ] } } - assert_redirected_to collection_card_path(collections(:writebook), cards(:logo)) + assert_response :success card = cards(:logo).reload assert_equal "Logo needs to change", card.title