27 Commits

Author SHA1 Message Date
Dylan a005391724 Fix: allow destroying "not now" state when closing cards
- Update `Card::Closeable` to destroy associated "not now" state during close.
- Add new tests to verify closure behavior for different column types, including "not now".
2025-12-23 13:43:03 +08:00
Ítalo Matos fbc586646f Refactor: improve query scope composition with merge syntax (#2131)
* Refactor: improve query scope composition with merge syntax

Replace manual WHERE clause concatenation with Rails' merge method
for more elegant and maintainable scope composition across Card,
Comment, and Filter models. This approach better follows Rails
conventions and improves code readability.

* Extend scope composition improvements to Card::Closeable

Apply the same nested hash syntax pattern to closures table references
in order and where clauses.

* Remove unnecessary outer braces from where clause

---------

Co-authored-by: Jeremy Daer <jeremy@37signals.com>
2025-12-13 10:10:13 -08:00
Jason Zimdars da413e7540 Remove closure reasons 2025-10-15 16:15:56 -05:00
Jorge Manrubia cd9955d938 Add "close by" filter 2025-07-03 14:32:03 +02:00
Jorge Manrubia 3fbfa1404c Add support for filtering by creation or completion windows of times 2025-06-27 13:38:22 +02:00
Jorge Manrubia 84fdeb4a5e Track events when reopening cards 2025-06-04 17:18:01 +02:00
Mike Dalessio 28ed744d0c refactor: Extract a Card::Entropy concern
to encompass behavior related to auto-closing and auto-reconsidering.

Note that putting this code in a single place reveals an asymmetry
between the actions:

- Auto-closing period is an optional attribute of a collection
- Auto-reconsidering period is hard-coded to 30 days for all collections
2025-06-01 16:50:12 -04:00
Mike Dalessio 388fe2de73 Introduce a stimulus controller for bubbles
The "closing soon" bubbles were introduced in #406, and the "falling
back" bubbles in #500. However, these bubbles are part of the cached
card and so as time passes, the relative time doesn't change unless
the card is touched.

This PR introduces a stimulus controller for bubbles, which takes care
of:

- making the bubble visible during the reminder period
- calculating the relative number of days until entropy kicks in
- rendering appropriate text around the day count

ref: https://37s.fizzy.37signals.com/collections/693169850/cards/999009091
2025-05-16 10:27:00 -04:00
Mike Dalessio 5d26feaa75 Handle collections that do not auto close 2025-05-12 17:19:46 -04:00
Andy Smith 289ca452d8 Remind 7 days before, not 30 2025-05-07 11:15:40 -05:00
Andy Smith 03473d8842 Merge pull request #406 from basecamp/closing-soon-badge
Closing soon badge
2025-05-07 11:13:35 -05:00
Jorge Manrubia dc28f4c9c5 Add command to close cards
https://3.basecamp.com/2914079/buckets/37331921/todos/8620236700
2025-05-07 11:00:22 +02:00
Andy Smith 6c7de54137 Rename 'badge' to 'bubble' 2025-05-01 11:19:58 +02:00
Andy Smith 0d086cd39e Merge branch 'main' into closing-soon-badge 2025-05-01 09:59:42 +02:00
Andy Smith 78941e5068 Address PR feedback 2025-05-01 09:58:23 +02:00
Jorge Manrubia e90b062440 Configure the autoclose period at the collection level 2025-04-25 13:29:16 +02:00
Jason Zimdars dca5e3b942 New layout for collections settings, stub entropy setting 2025-04-24 12:56:14 -05:00
David Heinemeier Hansson 7a46fd0948 Stick with open/close as a consistent pair instead of active/close 2025-04-22 12:08:56 +02:00
Andy Smith 5ccff34e6b Add Closes Today styles 2025-04-16 10:20:16 -05:00
Andy Smith 6fb69294a3 Smaller badge size 2025-04-16 10:14:24 -05:00
Andy Smith adad6dd657 Remind 7 days before auto close 2025-04-15 13:24:40 -05:00
Andy Smith eeadc1c494 Make it look like a stamp 2025-04-15 13:22:12 -05:00
Andy Smith ad80aee38e Stub out working auto close reminder 2025-04-15 13:15:29 -05:00
David Heinemeier Hansson 6bbf68a4f9 The tenanted db is the account scope 2025-04-12 20:06:34 +02:00
Jorge Manrubia 473fa1dafd Rename constant 2025-04-09 21:28:29 +02:00
Jorge Manrubia 221bbb3247 Fix renames that the scripts missed 2025-04-09 14:56:59 +02:00
Jorge Manrubia 723e6d94f5 Rename bubbles => cards 2025-04-09 14:50:58 +02:00