From 0045e48f70296a26a54b11a0e64b05ccbd6a0c01 Mon Sep 17 00:00:00 2001 From: Jorge Manrubia Date: Thu, 1 May 2025 12:57:25 +0200 Subject: [PATCH 01/32] Don't notify yourself of self-assignments --- app/models/notifier/card_event_notifier.rb | 2 +- test/models/notifier/event_notifier_test.rb | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/app/models/notifier/card_event_notifier.rb b/app/models/notifier/card_event_notifier.rb index 899ee53fb..f36a1f12c 100644 --- a/app/models/notifier/card_event_notifier.rb +++ b/app/models/notifier/card_event_notifier.rb @@ -6,7 +6,7 @@ class Notifier::CardEventNotifier < Notifier def recipients case source.action when "card_assigned" - source.assignees.excluding(source.collection.access_only_users) + source.assignees.excluding(creator, *source.collection.access_only_users) when "card_published" watchers_and_subscribers(include_only_watching: true).without(creator, *card.mentionees) when "comment_created" diff --git a/test/models/notifier/event_notifier_test.rb b/test/models/notifier/event_notifier_test.rb index aafc2fcc1..2a99a2d39 100644 --- a/test/models/notifier/event_notifier_test.rb +++ b/test/models/notifier/event_notifier_test.rb @@ -56,6 +56,15 @@ class Notifier::EventNotifierTest < ActiveSupport::TestCase end test "assignment events do not notify users who are access-only for the collection" do + collections(:writebook).access_for(users(:jz)).watching! + events(:logo_assignment_jz).update! creator: users(:jz) + + notifications = Notifier.for(events(:logo_assignment_jz)).notify + + assert_empty notifications + end + + test "assignment events do not notify you if you assigned yourself" do collections(:writebook).access_for(users(:jz)).access_only! notifications = Notifier.for(events(:logo_assignment_jz)).notify From ca1e002806f6a7ff061b8435e634f6c4d89aa680 Mon Sep 17 00:00:00 2001 From: Jorge Manrubia Date: Thu, 1 May 2025 13:08:15 +0200 Subject: [PATCH 02/32] Set default "Untitled" title for published cards --- app/models/card.rb | 11 +++++++---- test/models/card_test.rb | 8 ++++++++ 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/app/models/card.rb b/app/models/card.rb index 00a6312a2..2f6b0fe1e 100644 --- a/app/models/card.rb +++ b/app/models/card.rb @@ -11,6 +11,8 @@ class Card < ApplicationRecord has_markdown :description + before_save :set_default_title + scope :reverse_chronologically, -> { order created_at: :desc, id: :desc } scope :chronologically, -> { order created_at: :asc, id: :asc } scope :latest, -> { order updated_at: :desc, id: :desc } @@ -25,11 +27,12 @@ class Card < ApplicationRecord end end - def title=(new_title) - self[:title] = new_title.presence || "Untitled" - end - def cache_key [ super, collection.name ].compact.join("/") end + + private + def set_default_title + self.title = "Untitled" if published? && title.blank? + end end diff --git a/test/models/card_test.rb b/test/models/card_test.rb index dac35aa3d..94fc9ab86 100644 --- a/test/models/card_test.rb +++ b/test/models/card_test.rb @@ -120,4 +120,12 @@ class CardTest < ActiveSupport::TestCase assert_includes card.cache_key, ApplicationRecord.current_tenant, "cache key must always include the tenant" end + + test "for published cards, it should set the default title 'Untitiled' when not provided" do + card = collections(:writebook).cards.create! + assert_nil card.title + + card.publish + assert_equal "Untitled", card.reload.title + end end From 7b6de076e3cf158941cf91a53293d362c2cee3b0 Mon Sep 17 00:00:00 2001 From: Jorge Manrubia Date: Thu, 1 May 2025 13:09:42 +0200 Subject: [PATCH 03/32] Move condition to the callback --- app/models/card.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/card.rb b/app/models/card.rb index 2f6b0fe1e..0c0da3eb5 100644 --- a/app/models/card.rb +++ b/app/models/card.rb @@ -11,7 +11,7 @@ class Card < ApplicationRecord has_markdown :description - before_save :set_default_title + before_save :set_default_title, if: :published? scope :reverse_chronologically, -> { order created_at: :desc, id: :desc } scope :chronologically, -> { order created_at: :asc, id: :asc } @@ -33,6 +33,6 @@ class Card < ApplicationRecord private def set_default_title - self.title = "Untitled" if published? && title.blank? + self.title = "Untitled" if published? end end From db50b643b38556d1c6a35f60ab9acbdd3982e8c3 Mon Sep 17 00:00:00 2001 From: Jorge Manrubia Date: Thu, 1 May 2025 13:10:34 +0200 Subject: [PATCH 04/32] Revert "Move condition to the callback" This reverts commit 7b6de076e3cf158941cf91a53293d362c2cee3b0. --- app/models/card.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/card.rb b/app/models/card.rb index 0c0da3eb5..2f6b0fe1e 100644 --- a/app/models/card.rb +++ b/app/models/card.rb @@ -11,7 +11,7 @@ class Card < ApplicationRecord has_markdown :description - before_save :set_default_title, if: :published? + before_save :set_default_title scope :reverse_chronologically, -> { order created_at: :desc, id: :desc } scope :chronologically, -> { order created_at: :asc, id: :asc } @@ -33,6 +33,6 @@ class Card < ApplicationRecord private def set_default_title - self.title = "Untitled" if published? + self.title = "Untitled" if published? && title.blank? end end From 448989bfa22cddae9361b9fdd63595a996809de1 Mon Sep 17 00:00:00 2001 From: Jorge Manrubia Date: Thu, 1 May 2025 13:10:36 +0200 Subject: [PATCH 05/32] Revert "Set default "Untitled" title for published cards" This reverts commit ca1e002806f6a7ff061b8435e634f6c4d89aa680. --- app/models/card.rb | 11 ++++------- test/models/card_test.rb | 8 -------- 2 files changed, 4 insertions(+), 15 deletions(-) diff --git a/app/models/card.rb b/app/models/card.rb index 2f6b0fe1e..00a6312a2 100644 --- a/app/models/card.rb +++ b/app/models/card.rb @@ -11,8 +11,6 @@ class Card < ApplicationRecord has_markdown :description - before_save :set_default_title - scope :reverse_chronologically, -> { order created_at: :desc, id: :desc } scope :chronologically, -> { order created_at: :asc, id: :asc } scope :latest, -> { order updated_at: :desc, id: :desc } @@ -27,12 +25,11 @@ class Card < ApplicationRecord end end + def title=(new_title) + self[:title] = new_title.presence || "Untitled" + end + def cache_key [ super, collection.name ].compact.join("/") end - - private - def set_default_title - self.title = "Untitled" if published? && title.blank? - end end diff --git a/test/models/card_test.rb b/test/models/card_test.rb index 94fc9ab86..dac35aa3d 100644 --- a/test/models/card_test.rb +++ b/test/models/card_test.rb @@ -120,12 +120,4 @@ class CardTest < ActiveSupport::TestCase assert_includes card.cache_key, ApplicationRecord.current_tenant, "cache key must always include the tenant" end - - test "for published cards, it should set the default title 'Untitiled' when not provided" do - card = collections(:writebook).cards.create! - assert_nil card.title - - card.publish - assert_equal "Untitled", card.reload.title - end end From db1a9d8b458815b56eb4a7ebdf29f350e3816df1 Mon Sep 17 00:00:00 2001 From: Jorge Manrubia Date: Thu, 1 May 2025 13:10:58 +0200 Subject: [PATCH 06/32] Reapply "Set default "Untitled" title for published cards" This reverts commit 448989bfa22cddae9361b9fdd63595a996809de1. --- app/models/card.rb | 11 +++++++---- test/models/card_test.rb | 8 ++++++++ 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/app/models/card.rb b/app/models/card.rb index 00a6312a2..2f6b0fe1e 100644 --- a/app/models/card.rb +++ b/app/models/card.rb @@ -11,6 +11,8 @@ class Card < ApplicationRecord has_markdown :description + before_save :set_default_title + scope :reverse_chronologically, -> { order created_at: :desc, id: :desc } scope :chronologically, -> { order created_at: :asc, id: :asc } scope :latest, -> { order updated_at: :desc, id: :desc } @@ -25,11 +27,12 @@ class Card < ApplicationRecord end end - def title=(new_title) - self[:title] = new_title.presence || "Untitled" - end - def cache_key [ super, collection.name ].compact.join("/") end + + private + def set_default_title + self.title = "Untitled" if published? && title.blank? + end end diff --git a/test/models/card_test.rb b/test/models/card_test.rb index dac35aa3d..94fc9ab86 100644 --- a/test/models/card_test.rb +++ b/test/models/card_test.rb @@ -120,4 +120,12 @@ class CardTest < ActiveSupport::TestCase assert_includes card.cache_key, ApplicationRecord.current_tenant, "cache key must always include the tenant" end + + test "for published cards, it should set the default title 'Untitiled' when not provided" do + card = collections(:writebook).cards.create! + assert_nil card.title + + card.publish + assert_equal "Untitled", card.reload.title + end end From 75bc2460aefb06e09521694ba42d612e18187e3c Mon Sep 17 00:00:00 2001 From: Jorge Manrubia Date: Thu, 1 May 2025 13:11:01 +0200 Subject: [PATCH 07/32] Reapply "Move condition to the callback" This reverts commit db50b643b38556d1c6a35f60ab9acbdd3982e8c3. --- app/models/card.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/card.rb b/app/models/card.rb index 2f6b0fe1e..0c0da3eb5 100644 --- a/app/models/card.rb +++ b/app/models/card.rb @@ -11,7 +11,7 @@ class Card < ApplicationRecord has_markdown :description - before_save :set_default_title + before_save :set_default_title, if: :published? scope :reverse_chronologically, -> { order created_at: :desc, id: :desc } scope :chronologically, -> { order created_at: :asc, id: :asc } @@ -33,6 +33,6 @@ class Card < ApplicationRecord private def set_default_title - self.title = "Untitled" if published? && title.blank? + self.title = "Untitled" if published? end end From 7478e7692f223da0a3877076f3e323daaf24cf43 Mon Sep 17 00:00:00 2001 From: Jorge Manrubia Date: Thu, 1 May 2025 13:11:16 +0200 Subject: [PATCH 08/32] Fix condition in callback --- app/models/card.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/card.rb b/app/models/card.rb index 0c0da3eb5..4b8f96db7 100644 --- a/app/models/card.rb +++ b/app/models/card.rb @@ -33,6 +33,6 @@ class Card < ApplicationRecord private def set_default_title - self.title = "Untitled" if published? + self.title = "Untitled" if title.blank? end end From 9c813720e535a5e58aaaa54b1283a6ef82cce512 Mon Sep 17 00:00:00 2001 From: Jason Zimdars Date: Fri, 2 May 2025 14:18:28 +0200 Subject: [PATCH 09/32] Remove duplicate class name --- app/helpers/workflows_helper.rb | 2 +- app/views/cards/display/preview/_stages.html.erb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/helpers/workflows_helper.rb b/app/helpers/workflows_helper.rb index 560e1aebf..21b697531 100644 --- a/app/helpers/workflows_helper.rb +++ b/app/helpers/workflows_helper.rb @@ -4,7 +4,7 @@ module WorkflowsHelper tag.span(stage.name, class: "overflow-ellipsis"), card_staging_path(card, stage_id: stage), method: :put, - class: [ "btn justify-start workflow-stage txt-uppercase workflow-stage", { "workflow-stage--current": stage == card.stage } ], + class: [ "btn justify-start workflow-stage txt-uppercase", { "workflow-stage--current": stage == card.stage } ], form_class: "flex align-center gap-half", data: { turbo_frame: "_top" } end diff --git a/app/views/cards/display/preview/_stages.html.erb b/app/views/cards/display/preview/_stages.html.erb index 1ab34b675..142b17435 100644 --- a/app/views/cards/display/preview/_stages.html.erb +++ b/app/views/cards/display/preview/_stages.html.erb @@ -3,7 +3,7 @@ <% if workflow %>
<% workflow.stages.each do |stage| %> - <%= tag.span stage.name, class: ["overflow-ellipsis btn justify-start workflow-stage txt-uppercase workflow-stage", { "workflow-stage--current": stage == card.stage }] %> + <%= tag.span stage.name, class: ["overflow-ellipsis btn justify-start workflow-stage txt-uppercase", { "workflow-stage--current": stage == card.stage }] %> <% end %>
<% end %> From 47978966864c05ba866d9a05dc687e2d69cb8de9 Mon Sep 17 00:00:00 2001 From: Jason Zimdars Date: Fri, 2 May 2025 14:18:42 +0200 Subject: [PATCH 10/32] Copy edit --- app/views/cards/display/common/_meta.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/cards/display/common/_meta.html.erb b/app/views/cards/display/common/_meta.html.erb index 86640f3cc..12dca7c9e 100644 --- a/app/views/cards/display/common/_meta.html.erb +++ b/app/views/cards/display/common/_meta.html.erb @@ -17,7 +17,7 @@ <% end %> - Added by <%= card.creator.familiar_name %> + By <%= card.creator.familiar_name %> <%= card.assignees.any? ? "Assigned to" : "Not assigned" %> From 51d6a4ebeb1e3146b74e8a63836d64f7e764c3cc Mon Sep 17 00:00:00 2001 From: Jason Zimdars Date: Fri, 2 May 2025 14:18:57 +0200 Subject: [PATCH 11/32] Unnecessary --- app/assets/stylesheets/workflows.css | 1 - 1 file changed, 1 deletion(-) diff --git a/app/assets/stylesheets/workflows.css b/app/assets/stylesheets/workflows.css index b9eeccc6b..150c6cffc 100644 --- a/app/assets/stylesheets/workflows.css +++ b/app/assets/stylesheets/workflows.css @@ -8,7 +8,6 @@ color: inherit; inline-size: 100%; - text-transform: uppercase; @media (hover: hover) { &:hover { From 09a2405d507cd728ea465fedbe7d195e5e553109 Mon Sep 17 00:00:00 2001 From: Jason Zimdars Date: Fri, 2 May 2025 14:21:51 +0200 Subject: [PATCH 12/32] Remove letter-spacing --- app/assets/stylesheets/cards.css | 1 - 1 file changed, 1 deletion(-) diff --git a/app/assets/stylesheets/cards.css b/app/assets/stylesheets/cards.css index 3d5bc251a..9b79d4e08 100644 --- a/app/assets/stylesheets/cards.css +++ b/app/assets/stylesheets/cards.css @@ -86,7 +86,6 @@ background-color: var(--card-color); border-radius: var(--border-radius) 0 var(--border-radius) 0; font-weight: 800; - letter-spacing: 0.4ch; padding: var(--block-space-half) var(--inline-space-double); } From 38062aab47e9f8284c44ed7b75cab03d31a80b1a Mon Sep 17 00:00:00 2001 From: Jason Zimdars Date: Fri, 2 May 2025 15:38:36 +0200 Subject: [PATCH 13/32] No need to set this here, it's inherited --- app/views/cards/container/_closure.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/cards/container/_closure.html.erb b/app/views/cards/container/_closure.html.erb index f69cab694..766b1feb6 100644 --- a/app/views/cards/container/_closure.html.erb +++ b/app/views/cards/container/_closure.html.erb @@ -1,4 +1,4 @@ -
+
<% if card.closed? %>
Completed by <%= card.closed_by.name %> on <%= local_datetime_tag(card.closed_at, style: :shortdate) %>. From dc1d9203792f039f4a5a52ec809fa3d719dcef53 Mon Sep 17 00:00:00 2001 From: Jason Zimdars Date: Fri, 2 May 2025 15:39:10 +0200 Subject: [PATCH 14/32] Use black for closed cards only --- app/assets/stylesheets/cards.css | 6 +++++- app/models/card/colored.rb | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/app/assets/stylesheets/cards.css b/app/assets/stylesheets/cards.css index 9b79d4e08..9c2a261ed 100644 --- a/app/assets/stylesheets/cards.css +++ b/app/assets/stylesheets/cards.css @@ -230,7 +230,6 @@ .card__closed { align-items: center; aspect-ratio: 8/5; - background-color: var(--color-canvas); border: var(--block-space-half) solid var(--card-color); border-radius: 0.2em; color: var(--card-color); @@ -248,6 +247,11 @@ @media (prefers-color-scheme: dark) { mix-blend-mode: screen; } + + .card:has(&), + .card-perma:has(&) { + --card-color: #3b3633 !important; + } } .card__closed-by { diff --git a/app/models/card/colored.rb b/app/models/card/colored.rb index 9a16ee4a4..5b5be64c2 100644 --- a/app/models/card/colored.rb +++ b/app/models/card/colored.rb @@ -1,7 +1,7 @@ module Card::Colored extend ActiveSupport::Concern - COLORS = %w[ #3b3633 #67695e #eb7a32 #bf7c2b #c09c6f #746b1e #2c6da8 #5d618f #663251 #ff63a8 ] + COLORS = %w[ #67695e #eb7a32 #bf7c2b #c09c6f #746b1e #2c6da8 #5d618f #663251 #ff63a8 ] DEFAULT_COLOR = "#2c6da8" def color From c9d5a78ac4e5a10f1b69762e3c8aa2ffd3a8fc15 Mon Sep 17 00:00:00 2001 From: Jason Zimdars Date: Fri, 2 May 2025 15:47:14 +0200 Subject: [PATCH 15/32] Avoid truncating workflow name, adjust alignment and sizing --- app/assets/stylesheets/workflows.css | 5 +++-- app/views/collections/edit/_workflows.html.erb | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/app/assets/stylesheets/workflows.css b/app/assets/stylesheets/workflows.css index 150c6cffc..0cda31190 100644 --- a/app/assets/stylesheets/workflows.css +++ b/app/assets/stylesheets/workflows.css @@ -29,11 +29,11 @@ } .workflow-preview { - --border-size: 3px; + --border-size: 0.2em; aspect-ratio: 1; flex: 1 1 30%; - max-inline-size: 33%; + max-inline-size: 30%; button { --hover-size: 0; @@ -51,6 +51,7 @@ margin: 0; max-inline-size: 100%; outline: 0; + overflow: hidden; padding: 1em; text-align: start; } diff --git a/app/views/collections/edit/_workflows.html.erb b/app/views/collections/edit/_workflows.html.erb index 092b6195f..1b6154415 100644 --- a/app/views/collections/edit/_workflows.html.erb +++ b/app/views/collections/edit/_workflows.html.erb @@ -1,11 +1,11 @@ Workflows
Use a Workflow to track progress in this Collection.
-
+
<% Workflow.all.each do |workflow| %>
<%= button_to collection_workflow_path(collection), method: :patch do %> <%= hidden_field_tag "collection[workflow_id]", workflow.id %> - <%= workflow.name %> + <%= workflow.name %>
    <% workflow.stages.each do |stage| %>
  • From 61be8ef3b8bf391a8f0760b525b8db458a908bf6 Mon Sep 17 00:00:00 2001 From: Jason Zimdars Date: Fri, 2 May 2025 15:48:06 +0200 Subject: [PATCH 16/32] No need to separate users with a space --- app/views/collections/edit/_users.html.erb | 5 ----- 1 file changed, 5 deletions(-) diff --git a/app/views/collections/edit/_users.html.erb b/app/views/collections/edit/_users.html.erb index f38d2924c..926bfce21 100644 --- a/app/views/collections/edit/_users.html.erb +++ b/app/views/collections/edit/_users.html.erb @@ -29,11 +29,6 @@
    <%= access_toggles_for selected_users, selected: true %> - - <% if selected_users.any? && unselected_users.any? %> -
    - <% end %> - <%= access_toggles_for unselected_users, selected: false %>
    <% end %> From 1ef1839a81d2d08c0d4acf19c98448cc11b9ac84 Mon Sep 17 00:00:00 2001 From: Jason Zimdars Date: Fri, 2 May 2025 15:51:29 +0200 Subject: [PATCH 17/32] No need for it to be huge --- app/views/collections/edit/_name.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/collections/edit/_name.html.erb b/app/views/collections/edit/_name.html.erb index e08e885ce..6c70cd6aa 100644 --- a/app/views/collections/edit/_name.html.erb +++ b/app/views/collections/edit/_name.html.erb @@ -1,6 +1,6 @@
    From b94b9e9a4b48c0f2791a9785944c5ab0b465e9f4 Mon Sep 17 00:00:00 2001 From: Jason Zimdars Date: Fri, 2 May 2025 15:51:45 +0200 Subject: [PATCH 18/32] Less padding, reduce truncation --- app/assets/stylesheets/workflows.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/assets/stylesheets/workflows.css b/app/assets/stylesheets/workflows.css index 0cda31190..2486b99fa 100644 --- a/app/assets/stylesheets/workflows.css +++ b/app/assets/stylesheets/workflows.css @@ -52,7 +52,7 @@ max-inline-size: 100%; outline: 0; overflow: hidden; - padding: 1em; + padding: var(--inline-space); text-align: start; } } From 360d37d6ff1e51378dd0d254203862bd8dd2b388 Mon Sep 17 00:00:00 2001 From: Jason Zimdars Date: Fri, 2 May 2025 16:04:32 +0200 Subject: [PATCH 19/32] Stub stalled setting, adjust auto-close options --- app/helpers/collections_helper.rb | 15 ++++++++++++--- app/views/collections/edit.html.erb | 8 ++++---- app/views/collections/edit/_stalled.html.erb | 6 ++++++ 3 files changed, 22 insertions(+), 7 deletions(-) create mode 100644 app/views/collections/edit/_stalled.html.erb diff --git a/app/helpers/collections_helper.rb b/app/helpers/collections_helper.rb index 5f872079c..07cfa0a71 100644 --- a/app/helpers/collections_helper.rb +++ b/app/helpers/collections_helper.rb @@ -1,11 +1,20 @@ module CollectionsHelper def collection_auto_close_options [ + [ "7 days", 7.days ], [ "30 days", 30.days ], - [ "60 days", 60.days ], [ "90 days", 90.days ], - [ "6 months", 180.days ], - [ "1 year", 365.days ], + [ "Never", nil ] + ] + end + + def collection_stalled_options + [ + [ "1 day", 1.days ], + [ "2 days", 2.days ], + [ "3 days", 3.days ], + [ "7 days", 7.days ], + [ "30 days", 30.days ], [ "Never", nil ] ] end diff --git a/app/views/collections/edit.html.erb b/app/views/collections/edit.html.erb index c7d03827d..dce927fcb 100644 --- a/app/views/collections/edit.html.erb +++ b/app/views/collections/edit.html.erb @@ -31,12 +31,12 @@
    - <%= render "collections/edit/auto_close", collection: @collection %> - - <%= render "collections/edit/workflows", collection: @collection %> - + <%= render "collections/edit/auto_close", collection: @collection %> + + <%= render "collections/edit/stalled", collection: @collection %> + <%= form_with model: @collection, class: "txt-align-center", method: :delete do |form| %> <%= form.button class: "btn txt-negative borderless txt-small", data: { turbo_confirm: "Are you sure you want to permanently delete this Collection?" } do %> diff --git a/app/views/collections/edit/_stalled.html.erb b/app/views/collections/edit/_stalled.html.erb new file mode 100644 index 000000000..63447ea95 --- /dev/null +++ b/app/views/collections/edit/_stalled.html.erb @@ -0,0 +1,6 @@ +Stalled + + +<%= form_with model: collection, data: { controller: "form" } do |form| %> + <%= form.select :stalled_period, collection_stalled_options, {}, { class: "input input--select full-width margin-block-end", data: { action: "change->form#submit" } } %> +<% end %> From 4cf02424436c256c5d53eee9be1172b7cfc743bf Mon Sep 17 00:00:00 2001 From: Jason Zimdars Date: Fri, 2 May 2025 18:08:57 +0200 Subject: [PATCH 20/32] Handle the case where you can only see one collection --- app/assets/stylesheets/card-filters.css | 2 + app/helpers/filters_helper.rb | 2 +- .../cards/index/_collections_filter.html.erb | 63 +++++++++++-------- app/views/cards/index/_header.html.erb | 4 +- app/views/events/_filter.html.erb | 9 ++- .../filter/_all_collections_option.html.erb | 19 ++++-- .../filter/_new_collection_option.html.erb | 2 +- 7 files changed, 61 insertions(+), 40 deletions(-) diff --git a/app/assets/stylesheets/card-filters.css b/app/assets/stylesheets/card-filters.css index 5f2e3817e..b142c055a 100644 --- a/app/assets/stylesheets/card-filters.css +++ b/app/assets/stylesheets/card-filters.css @@ -2,6 +2,8 @@ .card-filter--collection { > button { --hover-size: 0; + + inline-size: auto; } } diff --git a/app/helpers/filters_helper.rb b/app/helpers/filters_helper.rb index 6fd5554f8..9c29d545d 100644 --- a/app/helpers/filters_helper.rb +++ b/app/helpers/filters_helper.rb @@ -1,7 +1,7 @@ module FiltersHelper def filter_title(filter) if filter.collections.none? - "All collections" + Current.user.collections.one? ? Current.user.collections.first.name : "All collections" elsif filter.collections.one? filter.collections.first.name else diff --git a/app/views/cards/index/_collections_filter.html.erb b/app/views/cards/index/_collections_filter.html.erb index 8b07eab87..86c4592ee 100644 --- a/app/views/cards/index/_collections_filter.html.erb +++ b/app/views/cards/index/_collections_filter.html.erb @@ -4,40 +4,49 @@ <%= filter_hidden_field_tag key, value %> <% end %> - <%= link_to cards_path(filter.as_params.except(:collection_ids)), class: "popup__group flex align-center", style: "--hover-size: 0" do %> -
    - > - - - See everything in all collections - - <%= icon_tag "check", size: 18, class: "checked" %> -
    - <%= tag.div class: "btn popup__item min-width flex-item-grow" do %> - All collections - GO TO + <% if Current.user.collections.one? %> + <%= link_to cards_path(filter.as_params.except(:collection_ids)), class: "popup__group flex align-center", style: "--hover-size: 0" do %> + <%= tag.div class: "btn popup__item min-width flex-item-grow" do %> + <%= Current.user.collections.first.name %> + GO TO + <% end %> <% end %> - <% end %> - - <% Current.user.collections.order(:name).each do |collection| %> -
  • + <% end %> + + <% Current.user.collections.order(:name).each do |collection| %> + + <% end %> <% end %> <% end %> diff --git a/app/views/cards/index/_header.html.erb b/app/views/cards/index/_header.html.erb index 218554519..7ec915b4d 100644 --- a/app/views/cards/index/_header.html.erb +++ b/app/views/cards/index/_header.html.erb @@ -24,15 +24,13 @@ filter_active_class: "filter--active", filter_selected_class: "selected" } do %>
    - - <%= icon_tag "filter" %> - Collections
    + <%= render "events/filter/new_collection_option" %> <% if Current.user.collections.count > 15 %> <% end %> diff --git a/app/views/events/_filter.html.erb b/app/views/events/_filter.html.erb index d4b0fad0e..9f46f826f 100644 --- a/app/views/events/_filter.html.erb +++ b/app/views/events/_filter.html.erb @@ -26,9 +26,12 @@ <%= form_with url: events_path, method: :get, class: "flex flex-column max-width popup__list full-width", data: { controller: "form" } do |form| %> <%= render "events/filter/all_collections_option", form: form, filter: filter %> - - <%= render partial: "events/filter/collection_option", collection: Current.user.collections.alphabetically, as: :collection, locals: { form: form, filter: filter } %> - + + <% if Current.user.collections.many? %> + + <%= render partial: "events/filter/collection_option", collection: Current.user.collections.alphabetically, as: :collection, locals: { form: form, filter: filter } %> + + <% end %> <% end %>

    diff --git a/app/views/events/filter/_all_collections_option.html.erb b/app/views/events/filter/_all_collections_option.html.erb index 27857fb1f..24ab518df 100644 --- a/app/views/events/filter/_all_collections_option.html.erb +++ b/app/views/events/filter/_all_collections_option.html.erb @@ -1,17 +1,26 @@ -

    +<% end %> \ No newline at end of file diff --git a/app/views/events/filter/_new_collection_option.html.erb b/app/views/events/filter/_new_collection_option.html.erb index 71914e7df..7ead8d946 100644 --- a/app/views/events/filter/_new_collection_option.html.erb +++ b/app/views/events/filter/_new_collection_option.html.erb @@ -2,6 +2,6 @@ <%= link_to new_collection_path, class: "btn popup__new popup__item", style: "view-transition-name: new-collection" do %> <%= icon_tag "add" %> Add a new collection -
    <% end %> +
From ba83625a60af1be1a70534af601ec21fb7f57961 Mon Sep 17 00:00:00 2001 From: Jason Zimdars Date: Fri, 2 May 2025 18:17:03 +0200 Subject: [PATCH 21/32] Don't count the system user --- app/views/cards/_messages.html.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/cards/_messages.html.erb b/app/views/cards/_messages.html.erb index 7fd12e1c2..cbf7a40d0 100644 --- a/app/views/cards/_messages.html.erb +++ b/app/views/cards/_messages.html.erb @@ -6,11 +6,11 @@ Subscribers

- <%= pluralize(@card.watchers.count, "person") %> will be notified when someone comments on this. + <%= pluralize(@card.watchers.without(User.system).count, "person") %> will be notified when someone comments on this.

- <% prepend_current_user_to(@card.watchers.alphabetically).each do |watcher| %> + <% prepend_current_user_to(@card.watchers.without(User.system).alphabetically).each do |watcher| %> <%= avatar_tag watcher %> <% end %>
From bc6709c4eb1f1660608a43f9c633e994b3ab5438 Mon Sep 17 00:00:00 2001 From: Jason Zimdars Date: Fri, 2 May 2025 20:00:51 +0200 Subject: [PATCH 22/32] Display card id --- app/assets/stylesheets/cards.css | 14 +++++++++++++- app/views/cards/_container.html.erb | 7 +++++-- app/views/cards/display/_preview.html.erb | 6 +++++- .../cards/index/engagement/_considering.html.erb | 2 +- 4 files changed, 24 insertions(+), 5 deletions(-) diff --git a/app/assets/stylesheets/cards.css b/app/assets/stylesheets/cards.css index 9c2a261ed..364c7ae03 100644 --- a/app/assets/stylesheets/cards.css +++ b/app/assets/stylesheets/cards.css @@ -68,6 +68,11 @@ } } + .card__id { + display: inline-flex; + margin-inline-start: calc(var(--inline-space) * -1); + } + .card__link { --hover-size: 0; @@ -86,7 +91,14 @@ background-color: var(--card-color); border-radius: var(--border-radius) 0 var(--border-radius) 0; font-weight: 800; - padding: var(--block-space-half) var(--inline-space-double); + padding: var(--block-space-half) var(--inline-space) var(--block-space-half) var(--inline-space-double); + } + + .card__collection-name { + border-inline-start: 1px solid var(--color-ink-inverted); + display: inline-flex; + margin-inline-start: var(--inline-space-half); + padding-inline-start: var(--inline-space-half); } .card__tags { diff --git a/app/views/cards/_container.html.erb b/app/views/cards/_container.html.erb index ce7482d9c..628d3bb4b 100644 --- a/app/views/cards/_container.html.erb +++ b/app/views/cards/_container.html.erb @@ -10,8 +10,11 @@
<%= card_article_tag card, class: "card" do %>
- <%= link_to card.collection.name, cards_path(collection_ids: [ card.collection ]), - class: "card__collection txt-uppercase overflow-ellipsis txt-reversed" %> + + <%= card.id %> + <%= link_to card.collection.name, cards_path(collection_ids: [ card.collection ]), + class: "card__collection-name txt-uppercase overflow-ellipsis txt-reversed" %> + <%= render "cards/display/perma/tags", card: card %>
diff --git a/app/views/cards/display/_preview.html.erb b/app/views/cards/display/_preview.html.erb index aa4e14dcf..32b3d38da 100644 --- a/app/views/cards/display/_preview.html.erb +++ b/app/views/cards/display/_preview.html.erb @@ -1,7 +1,11 @@ <% cache card do %> <%= card_article_tag card, class: "card" do %>
- <%= card.collection.name %> + + <%= card.id %> + <%= link_to card.collection.name, cards_path(collection_ids: [ card.collection ]), + class: "card__collection-name txt-uppercase overflow-ellipsis txt-reversed" %> + <%= render "cards/display/preview/tags", card: card %>
diff --git a/app/views/cards/index/engagement/_considering.html.erb b/app/views/cards/index/engagement/_considering.html.erb index 58285832a..d22315f4a 100644 --- a/app/views/cards/index/engagement/_considering.html.erb +++ b/app/views/cards/index/engagement/_considering.html.erb @@ -3,7 +3,7 @@ Considering - <% if collection = filter.single_collection %> + <% if collection = filter.single_collection || (Current.user.collections.first if Current.user.collections.one?) %> <%= button_to collection_cards_path(collection), method: :post, class: "card card--new-card-button btn", form_class: "full-width" do %>
<%= icon_tag "add" %> From 810b47a7669146bb697d55072e134d3781e16872 Mon Sep 17 00:00:00 2001 From: Jason Zimdars Date: Fri, 2 May 2025 15:04:12 -0500 Subject: [PATCH 23/32] Add `No.` and tighten-up line --- app/assets/stylesheets/cards.css | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/app/assets/stylesheets/cards.css b/app/assets/stylesheets/cards.css index 364c7ae03..2799c02fe 100644 --- a/app/assets/stylesheets/cards.css +++ b/app/assets/stylesheets/cards.css @@ -71,6 +71,11 @@ .card__id { display: inline-flex; margin-inline-start: calc(var(--inline-space) * -1); + + .card-perma &:before { + content: "No."; + opacity: 0.5; + } } .card__link { @@ -95,10 +100,10 @@ } .card__collection-name { - border-inline-start: 1px solid var(--color-ink-inverted); + border-inline-start: 1px solid color-mix(in srgb, var(--color-ink-inverted) 33%, var(--card-color)); display: inline-flex; margin-inline-start: var(--inline-space-half); - padding-inline-start: var(--inline-space-half); + padding-inline-start: calc(var(--inline-space) * 0.75); } .card__tags { From 82c4a53bce5b14612c47ae8ed8f160cf909a11ab Mon Sep 17 00:00:00 2001 From: Jason Zimdars Date: Fri, 2 May 2025 15:14:43 -0500 Subject: [PATCH 24/32] Toggle should more closely resemble columns --- app/assets/stylesheets/buttons.css | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/app/assets/stylesheets/buttons.css b/app/assets/stylesheets/buttons.css index 6ec87c99a..36065f4d0 100644 --- a/app/assets/stylesheets/buttons.css +++ b/app/assets/stylesheets/buttons.css @@ -192,6 +192,8 @@ .btn__group { .btn { --btn-border-radius: 0; + --radius: 0.3em; + inline-size: 100%; justify-content: center; } @@ -201,17 +203,17 @@ } :first-of-type .btn { - border-end-start-radius: 2em; + border-end-start-radius: var(--radius); border-inline-end: 0; - border-start-start-radius: 2em; + border-start-start-radius: var(--radius); flex: 1 0 50%; padding-inline-end: 0.8em; } :last-of-type .btn { - border-end-end-radius: 2em; + border-end-end-radius: var(--radius); border-inline-start: 0; - border-start-end-radius: 2em; + border-start-end-radius: var(--radius); flex: 1 0 50%; padding-inline-start: 0.8em; } From 8e0154addcd3ad024ae3ed681115ff2bd10f8fae Mon Sep 17 00:00:00 2001 From: Jason Zimdars Date: Fri, 2 May 2025 15:51:50 -0500 Subject: [PATCH 25/32] Subtle fading and overlapping grid lines --- app/assets/stylesheets/card-columns.css | 38 ++++++++++++++++++++++--- app/assets/stylesheets/card-filters.css | 2 ++ app/views/filters/_settings.html.erb | 2 +- 3 files changed, 37 insertions(+), 5 deletions(-) diff --git a/app/assets/stylesheets/card-columns.css b/app/assets/stylesheets/card-columns.css index 4311f1007..9664e1abc 100644 --- a/app/assets/stylesheets/card-columns.css +++ b/app/assets/stylesheets/card-columns.css @@ -10,15 +10,35 @@ } .card-columns { - border-block-start: 1px solid var(--color-ink-lighter); display: grid; grid-template-columns: repeat(2, 50%); margin: auto; max-inline-size: 1080px; + position: relative; + + &:before { + background: linear-gradient(to right,var(--color-canvas), var(--color-ink-lighter) 3%, var(--color-ink-lighter) 97%, var(--color-canvas)); + block-size: 1px; + content: ""; + display: block; + inline-size: calc(100% + 1.2em); + inset: 0 -0.6em 100% -0.6em; + position: absolute; + } .cards:first-child { - border-inline-end: var(--border); padding-inline-end: var(--cards-gap); + position: relative; + + &:after { + background: linear-gradient(var(--color-canvas), var(--color-ink-lighter) 1%, var(--color-ink-lighter) 99%, var(--color-canvas)); + block-size: calc(100% + 1.2em); + content: ""; + display: block; + inline-size: 1px; + inset: -0.6em 0 -0.6em 100%; + position: absolute; + } } .cards:last-child { @@ -37,7 +57,7 @@ flex-direction: column; gap: var(--cards-gap); justify-content: start; - padding-block: var(--cards-gap); + padding-block: calc(var(--cards-gap) * 0.75); .card { --block-space: 1em; @@ -121,12 +141,22 @@ /* -------------------------------------------------------------------------- */ .cards--closed { - border-block-start: 1px solid var(--color-ink-lighter); justify-content: center; flex-direction: row; flex-wrap: wrap; inline-size: 100%; margin: 0 auto; + position: relative; + + &:before { + background: linear-gradient(to right,var(--color-canvas), var(--color-ink-lighter) 3%, var(--color-ink-lighter) 97%, var(--color-canvas)); + block-size: 1px; + content: ""; + display: block; + inline-size: calc(100% + 1.2em); + inset: 0 -0.6em 100% -0.6em; + position: absolute; + } .card { inline-size: calc((100% - var(--cards-gap) * 2) / 3); diff --git a/app/assets/stylesheets/card-filters.css b/app/assets/stylesheets/card-filters.css index b142c055a..9f3f0338c 100644 --- a/app/assets/stylesheets/card-filters.css +++ b/app/assets/stylesheets/card-filters.css @@ -2,8 +2,10 @@ .card-filter--collection { > button { --hover-size: 0; + --input-padding: 0.25em 1em 0.25em 0.8em; inline-size: auto; + background-position: center right 0.3em; } } diff --git a/app/views/filters/_settings.html.erb b/app/views/filters/_settings.html.erb index 591c7c47d..76dd3f1f8 100644 --- a/app/views/filters/_settings.html.erb +++ b/app/views/filters/_settings.html.erb @@ -1,4 +1,4 @@ -
+
<%= render "filters/tags", filter: filter %> <%= render "filters/assignees", filter: filter %> From a42e5c647fbd90faf5a8e5f5a98929a37ea0f9d4 Mon Sep 17 00:00:00 2001 From: Andy Smith Date: Mon, 5 May 2025 13:34:35 -0500 Subject: [PATCH 26/32] Use variables for card colors --- app/assets/stylesheets/cards.css | 4 ++-- app/models/card/colored.rb | 14 ++++++++++++-- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/app/assets/stylesheets/cards.css b/app/assets/stylesheets/cards.css index 2799c02fe..9b56f62b6 100644 --- a/app/assets/stylesheets/cards.css +++ b/app/assets/stylesheets/cards.css @@ -190,7 +190,7 @@ box-shadow: 0 0 0 1px color-mix(in srgb, var(--color-link) 20%, var(--color-canvas)); color: var(--btn-color); font-weight: 700; - + } .card__move-button { @@ -267,7 +267,7 @@ .card:has(&), .card-perma:has(&) { - --card-color: #3b3633 !important; + --card-color: var(--card-color-1) !important; } } diff --git a/app/models/card/colored.rb b/app/models/card/colored.rb index 5b5be64c2..1a97b5782 100644 --- a/app/models/card/colored.rb +++ b/app/models/card/colored.rb @@ -1,8 +1,18 @@ module Card::Colored extend ActiveSupport::Concern - COLORS = %w[ #67695e #eb7a32 #bf7c2b #c09c6f #746b1e #2c6da8 #5d618f #663251 #ff63a8 ] - DEFAULT_COLOR = "#2c6da8" + COLORS = %w[ + var(--color-card-1) + var(--color-card-2) + var(--color-card-3) + var(--color-card-4) + var(--color-card-5) + var(--color-card-6) + var(--color-card-7) + var(--color-card-8) + var(--color-card-9) + ] + DEFAULT_COLOR = COLORS[5] def color color_from_stage || DEFAULT_COLOR From 149c43864253e2327146c58fb75392d1765ac200 Mon Sep 17 00:00:00 2001 From: Andy Smith Date: Mon, 5 May 2025 13:36:17 -0500 Subject: [PATCH 27/32] Remove empty line --- app/assets/stylesheets/cards.css | 1 - 1 file changed, 1 deletion(-) diff --git a/app/assets/stylesheets/cards.css b/app/assets/stylesheets/cards.css index 9b56f62b6..4529a3c05 100644 --- a/app/assets/stylesheets/cards.css +++ b/app/assets/stylesheets/cards.css @@ -190,7 +190,6 @@ box-shadow: 0 0 0 1px color-mix(in srgb, var(--color-link) 20%, var(--color-canvas)); color: var(--btn-color); font-weight: 700; - } .card__move-button { From 482459764993d0ca153fd9573e03abcdc2ed3b50 Mon Sep 17 00:00:00 2001 From: Andy Smith Date: Mon, 5 May 2025 14:49:31 -0500 Subject: [PATCH 28/32] Larger click area for the clear notification button --- app/assets/stylesheets/notifications.css | 34 ++++++++++++++++-------- app/helpers/notifications_helper.rb | 4 +-- 2 files changed, 25 insertions(+), 13 deletions(-) diff --git a/app/assets/stylesheets/notifications.css b/app/assets/stylesheets/notifications.css index 43dd95d5e..1cd3a83fc 100644 --- a/app/assets/stylesheets/notifications.css +++ b/app/assets/stylesheets/notifications.css @@ -61,30 +61,42 @@ } .notification__unread_indicator { - --btn-background: var(--color-marker); + --btn-background: var(--color-canvas); --btn-border-color: var(--color-canvas); --btn-icon-size: 0.7em; --btn-padding: 0; - --btn-size: 1.2em; + --btn-size: 1.75em; --hover-size: 0; - inset: var(--block-space) var(--inline-space) auto auto; + inset: 0 0 auto auto; position: absolute; - scale: 0.7; - img { - visibility: hidden; + /* The red dot */ + &:before { + aspect-ratio: 1; + background-color: var(--color-marker); + border-radius: 50%; + content: ""; + inline-size: 0.55em; + inset: 50% auto auto 50%; + position: absolute; + translate: -50% -50%; + } + + .icon { + opacity: 0; } @media (hover: hover) { &:hover { - --btn-background: var(--color-ink-medium); - --btn-border-color: var(--color-ink-medium); + --btn-background: transparent; - scale: 1; + &:before { + opacity: 0; + } - img { - visibility: unset; + .icon { + opacity: 1; } } } diff --git a/app/helpers/notifications_helper.rb b/app/helpers/notifications_helper.rb index 3c36cc51a..13125cdad 100644 --- a/app/helpers/notifications_helper.rb +++ b/app/helpers/notifications_helper.rb @@ -32,10 +32,10 @@ module NotificationsHelper def notification_mark_read_button(notification) button_to read_notification_path(notification), - class: "notification__unread_indicator btn borderless", + class: "notification__unread_indicator btn btn--circle borderless", title: "Mark as read", data: { turbo_frame: "_top" } do - concat(image_tag("remove-med.svg", class: "unread_icon", size: 12, aria: { hidden: true })) + concat(icon_tag("remove-med")) concat(tag.span("Mark as read", class: "for-screen-reader")) end end From ac41e97e34006e366b488b72ee0772fbcec52299 Mon Sep 17 00:00:00 2001 From: Andy Smith Date: Mon, 5 May 2025 15:59:43 -0500 Subject: [PATCH 29/32] Add transition --- app/assets/stylesheets/notifications.css | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/assets/stylesheets/notifications.css b/app/assets/stylesheets/notifications.css index 1cd3a83fc..6ffdcd598 100644 --- a/app/assets/stylesheets/notifications.css +++ b/app/assets/stylesheets/notifications.css @@ -71,6 +71,11 @@ inset: 0 0 auto auto; position: absolute; + &:before, + .icon { + transition: opacity 150ms ease; + } + /* The red dot */ &:before { aspect-ratio: 1; From 9328cc89e8dec7da293385498492df0de8e736b9 Mon Sep 17 00:00:00 2001 From: Andy Smith Date: Tue, 6 May 2025 11:36:12 -0500 Subject: [PATCH 30/32] Brighter card colors --- app/assets/stylesheets/_global.css | 65 +++++++++++++++--------------- 1 file changed, 32 insertions(+), 33 deletions(-) diff --git a/app/assets/stylesheets/_global.css b/app/assets/stylesheets/_global.css index b00fa22ab..c789b4675 100644 --- a/app/assets/stylesheets/_global.css +++ b/app/assets/stylesheets/_global.css @@ -44,31 +44,31 @@ --lch-ink-darkest: 26% 0.05 264; --lch-ink-darker: 40% 0.026 262; --lch-ink-dark: 57% 0.014 260; - --lch-ink-medium: 70% 0.008 258; + --lch-ink-medium: 66% 0.008 258; --lch-ink-light: 84% 0.005 256; --lch-ink-lighter: 92% 0.003 254; --lch-ink-lightest: 96% 0.002 252; --lch-uncolor-darkest: 26% 0.018 40; - --lch-uncolor-darker: 40% 0.03 50; - --lch-uncolor-dark: 57% 0.04 60; - --lch-uncolor-medium: 70% 0.044 70; - --lch-uncolor-light: 84% 0.028 80; + --lch-uncolor-darker: 40.04% 0.0376 50.06; + --lch-uncolor-dark: 57.09% 0.0676 60.5; + --lch-uncolor-medium: 66% 0.0944 71.46; + --lch-uncolor-light: 83.97% 0.0457 80.84; --lch-uncolor-lighter: 92% 0.014 90; --lch-uncolor-lightest: 96% 0.012 100; --lch-red-darkest: 26% 0.105 34; --lch-red-darker: 40% 0.154 36; --lch-red-dark: 59% 0.19 38; - --lch-red-medium: 70.4% 0.19 40; - --lch-red-light: 84% 0.07 42; + --lch-red-medium: 66% 0.204 40; + --lch-red-light: 84.08% 0.0837 41.96; --lch-red-lighter: 92% 0.03 44; --lch-red-lightest: 96% 0.013 46; --lch-yellow-darkest: 26% 0.0729 40; --lch-yellow-darker: 40% 0.12 50; --lch-yellow-dark: 58% 0.156 60; - --lch-yellow-medium: 76% 0.17 70; + --lch-yellow-medium: 74% 0.184 70; --lch-yellow-light: 84% 0.12 80; --lch-yellow-lighter: 92% 0.076 90; --lch-yellow-lightest: 96% 0.034 100; @@ -76,56 +76,56 @@ --lch-lime-darkest: 26% 0.064 109; --lch-lime-darker: 40% 0.101 110; --lch-lime-dark: 56.5% 0.142 111; - --lch-lime-medium: 71% 0.158 112; - --lch-lime-light: 84% 0.08 113; + --lch-lime-medium: 68% 0.176 113.11; + --lch-lime-light: 83.92% 0.0927 113.6; --lch-lime-lighter: 92% 0.046 114; --lch-lime-lightest: 96% 0.034 115; --lch-green-darkest: 26% 0.071 149; --lch-green-darker: 40% 0.12 148; --lch-green-dark: 55% 0.162 147; - --lch-green-medium: 70% 0.19 146; - --lch-green-light: 84% 0.07 145; + --lch-green-medium: 66% 0.208 146; + --lch-green-light: 83.92% 0.0772 145.06; --lch-green-lighter: 92% 0.044 144; --lch-green-lightest: 96% 0.022 143; --lch-aqua-darkest: 26% 0.059 214; --lch-aqua-darker: 40% 0.093 212; --lch-aqua-dark: 55.5% 0.122 210; - --lch-aqua-medium: 70% 0.13 208; - --lch-aqua-light: 84% 0.04 206; + --lch-aqua-medium: 66% 0.152 208; + --lch-aqua-light: 83.88% 0.0555 206.02; --lch-aqua-lighter: 92% 0.02 204; --lch-aqua-lightest: 96% 0.012 202; --lch-blue-darkest: 26% 0.126 264; --lch-blue-darker: 40% 0.166 262; - --lch-blue-dark: 57% 0.19 260; - --lch-blue-medium: 70% 0.169 258; - --lch-blue-light: 84% 0.06 256; + --lch-blue-dark: 57.02% 0.1895 260.46; + --lch-blue-medium: 66% 0.196 257.82; + --lch-blue-light: 84.04% 0.0719 255.29; --lch-blue-lighter: 92% 0.026 254; --lch-blue-lightest: 96% 0.016 252; --lch-violet-darkest: 26% 0.148 292; --lch-violet-darker: 40% 0.2 290; - --lch-violet-dark: 58% 0.216 288; - --lch-violet-medium: 70% 0.178 286; - --lch-violet-light: 84% 0.07 284; + --lch-violet-dark: 58% 0.216 287.6; + --lch-violet-medium: 66% 0.206 285.52; + --lch-violet-light: 84.08% 0.0791 283.47; --lch-violet-lighter: 92% 0.03 282; --lch-violet-lightest: 96% 0.015 280; --lch-purple-darkest: 26% 0.131 314; --lch-purple-darker: 40% 0.178 312; --lch-purple-dark: 58% 0.21 310; - --lch-purple-medium: 70% 0.22 308; - --lch-purple-light: 84% 0.07 306; + --lch-purple-medium: 66% 0.258 308; + --lch-purple-light: 84.09% 0.0778 305.77; --lch-purple-lighter: 92% 0.03 304; --lch-purple-lightest: 96% 0.019 302; --lch-pink-darkest: 26% 0.12 348; --lch-pink-darker: 40% 0.16 346; --lch-pink-dark: 59% 0.188 344; - --lch-pink-medium: 70% 0.198 342; - --lch-pink-light: 84% 0.07 340; + --lch-pink-medium: 71.8% 0.2008 342; + --lch-pink-light: 84.04% 0.0737 340; --lch-pink-lighter: 92% 0.03 338; --lch-pink-lightest: 96% 0.02 336; @@ -158,15 +158,14 @@ --color-terminal-text: oklch(var(--lch-green-medium)); /* Colors: Cards */ - --color-card-1: oklch(var(--lch-ink-dark)); - --color-card-2: oklch(var(--lch-uncolor-dark)); - --color-card-3: oklch(var(--lch-yellow-dark)); - --color-card-4: oklch(var(--lch-lime-dark)); - --color-card-5: oklch(var(--lch-aqua-dark)); - --color-card-6: oklch(var(--lch-blue-dark)); - --color-card-7: oklch(var(--lch-violet-dark)); - --color-card-8: oklch(var(--lch-purple-dark)); - --color-card-9: oklch(var(--lch-pink-dark)); + --color-card-1: oklch(var(--lch-ink-medium)); + --color-card-2: oklch(var(--lch-uncolor-medium)); + --color-card-3: oklch(var(--lch-yellow-medium)); + --color-card-4: oklch(var(--lch-lime-medium)); + --color-card-5: oklch(var(--lch-aqua-medium)); + --color-card-7: oklch(var(--lch-violet-medium)); + --color-card-8: oklch(var(--lch-purple-medium)); + --color-card-9: oklch(var(--lch-pink-medium)); @media (prefers-color-scheme: dark) { --lch-canvas: 20% 0.0195 232.58; From f1daa647feab63297fbda7ffd6718adac1add017 Mon Sep 17 00:00:00 2001 From: Andy Smith Date: Tue, 6 May 2025 11:54:40 -0500 Subject: [PATCH 31/32] Separate default from selectable workflow colors --- app/assets/stylesheets/_global.css | 7 ++++--- app/models/card/colored.rb | 3 +-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/assets/stylesheets/_global.css b/app/assets/stylesheets/_global.css index c789b4675..48ab4782c 100644 --- a/app/assets/stylesheets/_global.css +++ b/app/assets/stylesheets/_global.css @@ -158,14 +158,15 @@ --color-terminal-text: oklch(var(--lch-green-medium)); /* Colors: Cards */ + --color-card-default: oklch(var(--lch-blue-dark)); --color-card-1: oklch(var(--lch-ink-medium)); --color-card-2: oklch(var(--lch-uncolor-medium)); --color-card-3: oklch(var(--lch-yellow-medium)); --color-card-4: oklch(var(--lch-lime-medium)); --color-card-5: oklch(var(--lch-aqua-medium)); - --color-card-7: oklch(var(--lch-violet-medium)); - --color-card-8: oklch(var(--lch-purple-medium)); - --color-card-9: oklch(var(--lch-pink-medium)); + --color-card-6: oklch(var(--lch-violet-medium)); + --color-card-7: oklch(var(--lch-purple-medium)); + --color-card-8: oklch(var(--lch-pink-medium)); @media (prefers-color-scheme: dark) { --lch-canvas: 20% 0.0195 232.58; diff --git a/app/models/card/colored.rb b/app/models/card/colored.rb index 1a97b5782..e6ccc2c80 100644 --- a/app/models/card/colored.rb +++ b/app/models/card/colored.rb @@ -10,9 +10,8 @@ module Card::Colored var(--color-card-6) var(--color-card-7) var(--color-card-8) - var(--color-card-9) ] - DEFAULT_COLOR = COLORS[5] + DEFAULT_COLOR = "var(--color-card-default)" def color color_from_stage || DEFAULT_COLOR From d0c2212734aff5729a813fcc4f8c8d06e351929e Mon Sep 17 00:00:00 2001 From: Andy Smith Date: Tue, 6 May 2025 13:36:40 -0500 Subject: [PATCH 32/32] Use black for completed card color --- app/assets/stylesheets/_global.css | 1 + app/assets/stylesheets/cards.css | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/assets/stylesheets/_global.css b/app/assets/stylesheets/_global.css index 48ab4782c..d6d7712fc 100644 --- a/app/assets/stylesheets/_global.css +++ b/app/assets/stylesheets/_global.css @@ -159,6 +159,7 @@ /* Colors: Cards */ --color-card-default: oklch(var(--lch-blue-dark)); + --color-card-complete: var(--color-ink); --color-card-1: oklch(var(--lch-ink-medium)); --color-card-2: oklch(var(--lch-uncolor-medium)); --color-card-3: oklch(var(--lch-yellow-medium)); diff --git a/app/assets/stylesheets/cards.css b/app/assets/stylesheets/cards.css index 4529a3c05..0e3e4a1ff 100644 --- a/app/assets/stylesheets/cards.css +++ b/app/assets/stylesheets/cards.css @@ -266,7 +266,7 @@ .card:has(&), .card-perma:has(&) { - --card-color: var(--card-color-1) !important; + --card-color: var(--color-card-complete) !important; } }