diff --git a/app/assets/stylesheets/_global.css b/app/assets/stylesheets/_global.css index b00fa22ab..d6d7712fc 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,16 @@ --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-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)); + --color-card-4: oklch(var(--lch-lime-medium)); + --color-card-5: oklch(var(--lch-aqua-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/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; } 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 5f2e3817e..9f3f0338c 100644 --- a/app/assets/stylesheets/card-filters.css +++ b/app/assets/stylesheets/card-filters.css @@ -2,6 +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/assets/stylesheets/cards.css b/app/assets/stylesheets/cards.css index 97d3b86a5..a8068226e 100644 --- a/app/assets/stylesheets/cards.css +++ b/app/assets/stylesheets/cards.css @@ -68,6 +68,16 @@ } } + .card__id { + display: inline-flex; + margin-inline-start: calc(var(--inline-space) * -1); + + .card-perma &:before { + content: "No."; + opacity: 0.5; + } + } + .card__link { --hover-size: 0; @@ -86,8 +96,14 @@ 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); + padding: var(--block-space-half) var(--inline-space) var(--block-space-half) var(--inline-space-double); + } + + .card__collection-name { + 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: calc(var(--inline-space) * 0.75); } .card__tags { @@ -174,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 { @@ -231,7 +246,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); @@ -249,6 +263,11 @@ @media (prefers-color-scheme: dark) { mix-blend-mode: screen; } + + .card:has(&), + .card-perma:has(&) { + --card-color: var(--color-card-complete) !important; + } } .card__closed-by { diff --git a/app/assets/stylesheets/notifications.css b/app/assets/stylesheets/notifications.css index 43dd95d5e..6ffdcd598 100644 --- a/app/assets/stylesheets/notifications.css +++ b/app/assets/stylesheets/notifications.css @@ -61,30 +61,47 @@ } .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; + &:before, + .icon { + transition: opacity 150ms ease; + } + + /* 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/assets/stylesheets/workflows.css b/app/assets/stylesheets/workflows.css index b9eeccc6b..2486b99fa 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 { @@ -30,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; @@ -52,7 +51,8 @@ margin: 0; max-inline-size: 100%; outline: 0; - padding: 1em; + overflow: hidden; + padding: var(--inline-space); text-align: start; } } 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/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/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 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/models/card.rb b/app/models/card.rb index 00a6312a2..4b8f96db7 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, if: :published? + 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 title.blank? + end end diff --git a/app/models/card/colored.rb b/app/models/card/colored.rb index 9a16ee4a4..e6ccc2c80 100644 --- a/app/models/card/colored.rb +++ b/app/models/card/colored.rb @@ -1,8 +1,17 @@ module Card::Colored extend ActiveSupport::Concern - COLORS = %w[ #3b3633 #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) + ] + DEFAULT_COLOR = "var(--color-card-default)" def color color_from_stage || DEFAULT_COLOR 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/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/_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 %>
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) %>. diff --git a/app/views/cards/display/_preview.html.erb b/app/views/cards/display/_preview.html.erb index 316c20a17..d6b35c135 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/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" %> 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 %> 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/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" %> 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/_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 @@
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 %> 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 %> 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| %>
  • 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 %> +
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 %> 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 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