diff --git a/Gemfile.lock b/Gemfile.lock
index a88385fa5..3dc033356 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -264,10 +264,10 @@ GEM
nio4r (~> 2.0)
raabro (1.4.0)
racc (1.8.1)
- rack (3.1.13)
+ rack (3.1.14)
rack-contrib (2.5.0)
rack (< 4)
- rack-session (2.1.0)
+ rack-session (2.1.1)
base64 (>= 0.1.0)
rack (>= 3.0.0)
rack-test (2.2.0)
diff --git a/app/assets/stylesheets/terminals.css b/app/assets/stylesheets/terminals.css
index 6c8f4bfb6..3a20664a0 100644
--- a/app/assets/stylesheets/terminals.css
+++ b/app/assets/stylesheets/terminals.css
@@ -78,7 +78,8 @@
.terminal__help {
display: none;
- .terminal--showing-help & {
+ .terminal--showing-help &,
+ .terminal--open .terminal__menu:empty ~ & {
border-block-end: 1px dashed;
display: block;
margin-block-end: 0.5lh;
@@ -119,7 +120,7 @@
}
.terminal__item {
- &:where(:not(:active)):focus-visible, &:where(:not(:active))[aria-current] {
+ &[aria-current] {
--btn-color: var(--color-terminal-bg);
background: var(--color-terminal-text);
diff --git a/app/controllers/concerns/day_timelines_scoped.rb b/app/controllers/concerns/day_timelines_scoped.rb
index 597e35f7d..ecbfe1511 100644
--- a/app/controllers/concerns/day_timelines_scoped.rb
+++ b/app/controllers/concerns/day_timelines_scoped.rb
@@ -4,12 +4,19 @@ module DayTimelinesScoped
included do
include FilterScoped
+ before_action :normalize_collection_params
before_action :restore_collections_filter_from_cookie
before_action :set_day_timeline
after_action :save_collections_filter_to_cookie
end
private
+ def normalize_collection_params
+ if params[:collection_ids].blank? && !params[:clear_filter]
+ params[:clear_filter] = true
+ end
+ end
+
def restore_collections_filter_from_cookie
if params[:clear_filter]
delete_collections_filter_cookie
diff --git a/app/helpers/time_helper.rb b/app/helpers/time_helper.rb
index c3fd4f066..50295789b 100644
--- a/app/helpers/time_helper.rb
+++ b/app/helpers/time_helper.rb
@@ -1,5 +1,5 @@
module TimeHelper
def local_datetime_tag(datetime, style: :time, **attributes)
- tag.time **attributes, datetime: datetime.iso8601, data: { local_time_target: style }
+ tag.time **attributes, datetime: datetime.iso8601, data: { local_time_target: style, action: "turbo:morph-element->local-time#refreshTarget" }
end
end
diff --git a/app/javascript/controllers/local_time_controller.js b/app/javascript/controllers/local_time_controller.js
index e539d9eb5..7e38772c9 100644
--- a/app/javascript/controllers/local_time_controller.js
+++ b/app/javascript/controllers/local_time_controller.js
@@ -37,6 +37,12 @@ export default class extends Controller {
})
}
+ refreshTarget(event) {
+ const target = event.target;
+ const targetName = target.dataset.localTimeTarget
+ this.#formatTime(this[`${targetName}Formatter`], target)
+ }
+
timeTargetConnected(target) {
this.#formatTime(this.timeFormatter, target)
}
diff --git a/app/models/card/closeable.rb b/app/models/card/closeable.rb
index 0f7b88dd6..121a0e2d4 100644
--- a/app/models/card/closeable.rb
+++ b/app/models/card/closeable.rb
@@ -34,7 +34,7 @@ module Card::Closeable
end
def closing_soon?
- considering? && Time.current >= auto_close_at - AUTO_CLOSE_REMINDER_BEFORE
+ considering? && auto_closing? && Time.current >= auto_close_at - AUTO_CLOSE_REMINDER_BEFORE
end
def closed?
diff --git a/app/views/cards/display/_preview.html.erb b/app/views/cards/display/_preview.html.erb
index d6b35c135..07ec072e2 100644
--- a/app/views/cards/display/_preview.html.erb
+++ b/app/views/cards/display/_preview.html.erb
@@ -15,7 +15,7 @@
<%= card.title %>
- <%= link_to collection_card_path(card.collection, card), class: "card__link", title: card_title_tag(card), data: { turbo_frame: "_top" } do %>
+ <%= link_to collection_card_path(card.collection, card), class: "card__link", title: card_title_tag(card), data: { action: "dialog#close", turbo_frame: "_top" } do %>
<%= card.title %>
<% end %>
@@ -30,7 +30,7 @@
<%= render "cards/display/common/background", card: card %>
<% if card.closing_soon? %>
- <%= render "cards/display/preview/bubble", label: "Closes in", days: card.days_until_close %>
+ <%= render "cards/display/preview/bubble", days: card.days_until_close %>
<% end %>
<% end %>
<% end %>
diff --git a/app/views/cards/display/common/_meta.html.erb b/app/views/cards/display/common/_meta.html.erb
index acec071b1..298e266f9 100644
--- a/app/views/cards/display/common/_meta.html.erb
+++ b/app/views/cards/display/common/_meta.html.erb
@@ -13,7 +13,7 @@
<% else %>
Updated
- <%= local_datetime_tag(card.updated_at, style: :daysago) %>
+ <%= local_datetime_tag(card.last_active_at, style: :daysago) %>
<% end %>
diff --git a/app/views/cards/display/preview/_bubble.html.erb b/app/views/cards/display/preview/_bubble.html.erb
index 1b90ae83c..e9401ffec 100644
--- a/app/views/cards/display/preview/_bubble.html.erb
+++ b/app/views/cards/display/preview/_bubble.html.erb
@@ -3,20 +3,20 @@
- <%= label %>
+ <%= days < 1 ? "Closes" : "Closes in" %>
- <%= days %>
+ <%= days < 1 ? "!" : days %>
- <%= "Day".pluralize(days) %>
+ <%= days < 1 ? "today" : "Day".pluralize(days) %>
diff --git a/app/views/cards/index/_collections_filter.html.erb b/app/views/cards/index/_collections_filter.html.erb
index 86c4592ee..b735a29c8 100644
--- a/app/views/cards/index/_collections_filter.html.erb
+++ b/app/views/cards/index/_collections_filter.html.erb
@@ -5,7 +5,7 @@
<% end %>
<% 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 %>
+ <%= link_to cards_path(filter.as_params.except(:collection_ids)), class: "popup__group flex align-center" do %>
<%= tag.div class: "btn popup__item min-width flex-item-grow" do %>
<%= Current.user.collections.first.name %>
GO TO ›
@@ -13,14 +13,14 @@
<% end %>
<% elsif Current.user.collections.many? %>
<%= 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 ›
@@ -29,7 +29,7 @@
<% Current.user.collections.order(:name).each do |collection| %>