Commit Graph

26 Commits

Author SHA1 Message Date
Jorge Manrubia 5f7feed6c4 Refresh activity-related bits in the card perma dynamically:
- Remove entropy bubble
- Refresh the auto close notice https://app.box-car.com/5986089/cards/2683
2025-11-03 12:48:57 +01:00
Jorge Manrubia 11e872eb69 Format 2025-10-31 14:57:28 +01:00
Jorge Manrubia 8c8dbe888e Fix assorted issues when reloading pages with morphing and the pagination system
This patches 2 problems in Turbo/idiomorph that are causing problems when reloading the pagination frames:

- No remove callback in idiomorph when removing a node that had been mapped.
- Regression introduced by https://github.com/hotwired/turbo/pull/1311, where it won't prevent the removal of frames with refresh=morph

I will upstream both patches, this is temporary.

https://fizzy.37signals.com/5986089/cards/2291
2025-10-16 13:39:16 +02:00
Jorge Manrubia 2f6a639682 Prepare entropy code for the new auto postpone approach 2025-09-24 16:22:42 +02:00
Jorge Manrubia 15d3c0e724 Simplify since the design is identical 2025-06-06 09:19:51 +02:00
Jorge Manrubia f742749b0f Tidy up controller and make sure the different targets are properly separated
If not, it wouldn't show stalled if there were entropy bubbles in the page
2025-06-06 09:15:51 +02:00
Jorge Manrubia 6287acf5ba Tidy up controller
Remove namespace "entropy" since the regions are common now
2025-06-06 09:04:42 +02:00
Jason Zimdars 9d706902e8 Style stalled bubble 2025-06-05 16:25:21 -05:00
Jorge Manrubia 19e27370fa Stimulus can't handle "null" JSON string 2025-06-05 11:10:09 +02:00
Jorge Manrubia fbe12014ab Format 2025-06-05 11:08:37 +02:00
Jorge Manrubia 6e8087ee2e Toggle entropy/stalled container in the bubbles controller 2025-06-05 11:08:20 +02:00
Jorge Manrubia 76119b17bd Entropy, not bubble! 2025-06-05 10:33:02 +02:00
Jorge Manrubia 22ed605884 Namespace bubble-related targets 2025-06-05 10:32:14 +02:00
Jorge Manrubia 2cbd451944 Group entropy options in an object value
We'll add stalling considerations next, this helps keeping things organized.
2025-06-05 10:28:33 +02:00
Jorge Manrubia 5dc33c304c Restore reminder period I replaced by mistake 2025-06-04 17:17:47 +02:00
Jorge Manrubia db86d17880 Refactor to introduce an entropy model
Instead of keeping two tracks of similar logic (auto-reconsider / auto-close).
2025-06-04 14:40:02 +02:00
Jorge Manrubia 08c5abfbdb Extract common method to query when entropy is cleaned
We were always quering auto_close_at
https://37s.fizzy.37signals.com/collections/2/cards/743
2025-06-02 18:04:14 +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 dddb33b483 Use a view helper to remove branching from the bubbles controller 2025-05-16 10:32:28 -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
Andy Smith 15e3802a33 Add basic rules for reconsider bubble 2025-05-14 15:25:17 -05:00
Andy Smith 95298d4fce Stub out considering bubble 2025-05-14 14:53:09 -05:00
Andy Smith d568a7ff13 Create space for bubbles in containers 2025-05-14 14:39:33 -05:00
Andy Smith 5281022ef3 Remove unused var 2025-05-08 15:44:48 -05:00
Andy Smith d6736a8bcf Update bubble text when 0 days 2025-05-08 15:43:56 -05:00
Andy Smith 6c7de54137 Rename 'badge' to 'bubble' 2025-05-01 11:19:58 +02:00