diff --git a/app/javascript/controllers/navigable_list_controller.js b/app/javascript/controllers/navigable_list_controller.js index 44f3faef6..9b96c1b08 100644 --- a/app/javascript/controllers/navigable_list_controller.js +++ b/app/javascript/controllers/navigable_list_controller.js @@ -3,7 +3,7 @@ import { nextFrame } from "helpers/timing_helpers" export default class extends Controller { static targets = [ "item" ] - static values = { selectionAttribute: { type: String, default: "aria-selected" } } + static values = { selectionAttribute: { type: String, default: "aria-current" } } connect() { this.selectLast() diff --git a/app/models/card/entropy.rb b/app/models/card/entropy.rb index b0eded7a3..511832513 100644 --- a/app/models/card/entropy.rb +++ b/app/models/card/entropy.rb @@ -26,11 +26,19 @@ module Card::Entropy end def subject_to_entropy? - doing? || (auto_closing? && considering?) + auto_reconsidering? || auto_closing? + end + + def auto_reconsidering? + doing? && last_active_at + end + + def auto_closing? + considering? && collection.auto_closing? && last_active_at end def auto_close_at - last_active_at + auto_close_period if auto_closing? && last_active_at + last_active_at + auto_close_period if auto_closing? end def days_until_close @@ -38,10 +46,14 @@ module Card::Entropy end def auto_reconsider_at - last_active_at + AUTO_RECONSIDER_PERIOD if last_active_at + last_active_at + AUTO_RECONSIDER_PERIOD if auto_reconsidering? end def days_until_reconsider (auto_reconsider_at.to_date - Date.current).to_i if auto_reconsider_at end + + def entropy_cleaned_at + auto_close_at || auto_reconsider_at + end end diff --git a/app/views/cards/display/preview/_bubble.html.erb b/app/views/cards/display/preview/_bubble.html.erb index c05989755..f0e3df352 100644 --- a/app/views/cards/display/preview/_bubble.html.erb +++ b/app/views/cards/display/preview/_bubble.html.erb @@ -1,7 +1,7 @@