From f9aed44fd2cdbfba92f67b315c4f1ab53c3eb39a Mon Sep 17 00:00:00 2001 From: Jason Zimdars Date: Thu, 11 Sep 2025 16:22:57 -0500 Subject: [PATCH] Move involvement toggle and display all the watchers --- .../images/notification-bell-access-only.svg | 1 - .../images/notification-bell-watching.svg | 1 - app/assets/stylesheets/card-columns.css | 20 ++++++++++++++----- app/assets/stylesheets/icons.css | 4 ++-- app/helpers/accesses_helper.rb | 8 ++++---- app/views/cards/index.html.erb | 6 +----- .../cards/index/_add_card_button.html.erb | 16 +++++++++++++-- 7 files changed, 36 insertions(+), 20 deletions(-) delete mode 100644 app/assets/images/notification-bell-access-only.svg delete mode 100644 app/assets/images/notification-bell-watching.svg diff --git a/app/assets/images/notification-bell-access-only.svg b/app/assets/images/notification-bell-access-only.svg deleted file mode 100644 index b8fa159e8..000000000 --- a/app/assets/images/notification-bell-access-only.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/app/assets/images/notification-bell-watching.svg b/app/assets/images/notification-bell-watching.svg deleted file mode 100644 index 52a5611fb..000000000 --- a/app/assets/images/notification-bell-watching.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/app/assets/stylesheets/card-columns.css b/app/assets/stylesheets/card-columns.css index ec90b8e58..3b1790251 100644 --- a/app/assets/stylesheets/card-columns.css +++ b/app/assets/stylesheets/card-columns.css @@ -262,16 +262,26 @@ } .card--new { - --card-padding-block: var(--block-space-double); + --border-color: var(--color-selected-dark); + --border-size: 1px; + --card-padding-block: calc(var(--block-space) * 1.5) var(--block-space); border: 1px solid var(--color-selected-dark); - font-size: 0.8rem !important; - rotate: 0 !important; text-align: center; .btn { - border: 0; - color: var(--color-considering); + &.btn--link { + font-size: 1.2em; + } + + &:not(.btn--link) { + border: 0; + color: var(--color-link); + } + } + + footer { + font-size: var(--text-x-small); } } diff --git a/app/assets/stylesheets/icons.css b/app/assets/stylesheets/icons.css index 7d135bf49..356517f56 100644 --- a/app/assets/stylesheets/icons.css +++ b/app/assets/stylesheets/icons.css @@ -60,8 +60,8 @@ .icon--menu-dots-vertical { --svg: url("menu-dots-vertical.svg "); } .icon--minus { --svg: url("minus.svg "); } .icon--move { --svg: url("move.svg "); } - .icon--notification-bell-access-only { --svg: url("notification-bell-access-only.svg "); } - .icon--notification-bell-watching { --svg: url("notification-bell-watching.svg "); } + .icon--notification-bell-access-only { --svg: url("bell.svg "); } + .icon--notification-bell-watching { --svg: url("bell-off.svg "); } .icon--password { --svg: url("password.svg "); } .icon--pencil { --svg: url("pencil.svg "); } .icon--person { --svg: url("person.svg "); } diff --git a/app/helpers/accesses_helper.rb b/app/helpers/accesses_helper.rb index 3dd935214..97809ab55 100644 --- a/app/helpers/accesses_helper.rb +++ b/app/helpers/accesses_helper.rb @@ -21,10 +21,10 @@ module AccessesHelper turbo_frame_tag dom_id(collection, :involvement_button) do button_to collection_involvement_path(collection), method: :put, aria: { labelledby: dom_id(collection, :involvement_label) }, - class: [ "btn tooltip", { "btn--reversed": access.involvement == "watching" } ], + class: "btn", params: { involvement: next_involvement(access.involvement) } do icon_tag("notification-bell-#{access.involvement.dasherize}") + - tag.span(involvement_access_label(collection, access.involvement), class: "for-screen-reader", id: dom_id(collection, :involvement_label)) + tag.span(involvement_access_label(collection, access.involvement), class: "txt-nowrap txt-uppercase", id: dom_id(collection, :involvement_label)) end end end @@ -38,9 +38,9 @@ module AccessesHelper def involvement_access_label(collection, involvement) case involvement when "access_only" - "Not watching #{collection.name}" + "Watch this" when "watching" - "Watching #{collection.name}" + "Stop Watching" end end end diff --git a/app/views/cards/index.html.erb b/app/views/cards/index.html.erb index ad3470094..34b6e01d0 100644 --- a/app/views/cards/index.html.erb +++ b/app/views/cards/index.html.erb @@ -11,11 +11,7 @@ <% content_for :header do %> <%= render "filters/menu", user_filtering: @user_filtering %> -
- <% if collection = @filter.single_collection %> - <%= access_involvement_advance_button collection, Current.user %> - <% end %> -
+

<%= @user_filtering.selected_collections_label %> diff --git a/app/views/cards/index/_add_card_button.html.erb b/app/views/cards/index/_add_card_button.html.erb index 93d8d7442..3a821cbd7 100644 --- a/app/views/cards/index/_add_card_button.html.erb +++ b/app/views/cards/index/_add_card_button.html.erb @@ -1,8 +1,20 @@ <% if collection = user_filtering.single_collection %> -
- <%= button_to collection_cards_path(collection), method: :post, class: "btn" do %> +
+ <%= button_to collection_cards_path(collection), method: :post, class: "btn btn--link" do %> <%= icon_tag "add" %> Add a card <% end %> + + + +
<% end %>