Commit Graph

5430 Commits

Author SHA1 Message Date
Jason Zimdars 6a40256969 Prevent back navigation when cancelling comment edits 2025-01-14 16:57:29 -06:00
Jason Zimdars d20288f929 Don't trigger esc to go back when closing dialog 2025-01-14 16:53:38 -06:00
Jason Zimdars 1f911b234b Avoid navigating back when closing the filter dialog 2025-01-14 16:49:21 -06:00
Jason Zimdars a596d7cea7 Cancel and go back for forms with autofocused inputs 2025-01-14 16:45:29 -06:00
Jason Zimdars 39ff31b14b esc to cancel here, too 2025-01-14 16:04:41 -06:00
Jason Zimdars 95f077672b esc to navigate back to buckets index 2025-01-14 15:57:55 -06:00
Jason Zimdars f7f063ae0c Can just use @bucket 2025-01-14 15:49:25 -06:00
Jason Zimdars 32532c53cb Add bucket link/title so you know where you are 2025-01-14 15:48:49 -06:00
Kevin McConnell 55e6efd137 Merge pull request #199 from basecamp/notifs
Notifications
2025-01-14 15:25:47 +00:00
Kevin McConnell 345acb1c0b Add test for readings controller 2025-01-14 14:38:46 +00:00
Kevin McConnell b8ecfa0125 Replace notifications on read, instead of removing
Previously when a notification was read, we'd remove it from the list.
This will often be fine, but if there were more unread notifications
that hadn't been loaded yet (because there were too many for the initial
page) then the list could become empty when really there are still more
items to show.

So instead of removing the items when they're read, we can reload the
list with the new page of items. This should allow the older
notifications to come into view when necessary.
2025-01-14 14:23:46 +00:00
Kevin McConnell 9fc5311ddc Add simple controller test 2025-01-14 14:10:24 +00:00
Kevin McConnell 9ddb7b260b Remove empty test 2025-01-14 14:07:21 +00:00
Kevin McConnell 415e872a2b Combine concerns 2025-01-14 13:57:48 +00:00
Kevin McConnell c11b5af5e0 Make Stimulus controller more generic 2025-01-14 13:37:54 +00:00
Kevin McConnell df260840ab Simplify test 2025-01-14 13:29:39 +00:00
Kevin McConnell 78b7fe0f3d Fix tests 2025-01-14 13:21:20 +00:00
Kevin McConnell ab154f2f35 Generate notification content in a helper 2025-01-14 13:08:12 +00:00
Kevin McConnell 30b58f716b Make title a notifier attribute 2025-01-14 10:21:47 +00:00
Jason Zimdars 5f88cd3900 Design for notifications 2025-01-13 20:46:51 -06:00
Kevin McConnell 64795804ba Style 2025-01-13 14:21:47 +00:00
Kevin McConnell 196575c0a2 Use a job to generate notifications 2025-01-13 14:21:47 +00:00
Kevin McConnell 46989f6ebe Mark notification read when viewing the Bubble 2025-01-13 14:21:47 +00:00
Kevin McConnell 271ac063f9 Adjust a fixture 2025-01-13 14:21:47 +00:00
Kevin McConnell c62e800b08 Notifications are all related to a Bubble 2025-01-13 14:21:47 +00:00
Kevin McConnell df1225e58d Style 2025-01-13 14:21:47 +00:00
Kevin McConnell febcb6c344 A partial is clearer than a helper here 2025-01-13 14:21:47 +00:00
Kevin McConnell 10c7b61af9 Split up a long line for clarity 2025-01-13 14:21:47 +00:00
Kevin McConnell 31ac7950ce Use turbo:click, not click
Otherwise Turbo falls back to a regular Browser navigation.
2025-01-13 14:21:47 +00:00
Kevin McConnell d536358228 Make fixture match expected content 2025-01-13 14:21:47 +00:00
Kevin McConnell 07fcb7ee6b More style shuffling 2025-01-13 14:21:47 +00:00
Kevin McConnell 6f7268f941 Set ID so a notification can't show up twice 2025-01-13 14:21:47 +00:00
Kevin McConnell 66d0f29d45 Notify on pop as well
And DRY up some duplication.
2025-01-13 14:21:47 +00:00
Kevin McConnell e67ac372d3 Fix test 2025-01-13 14:21:47 +00:00
Kevin McConnell fd1789ed58 Mark notifications read when clicked on 2025-01-13 14:21:47 +00:00
Kevin McConnell 58ce85ce36 Link comment notifications to the comment 2025-01-13 14:21:47 +00:00
Kevin McConnell 876083c697 Broadcast new notifications 2025-01-13 14:21:47 +00:00
Kevin McConnell a7d9ec908c Adjust styles 2025-01-13 14:21:47 +00:00
Kevin McConnell 58d5ed07a5 Create notifications when tracking events 2025-01-13 14:21:47 +00:00
Kevin McConnell fcce5b85e0 Show notifications on bucket index 2025-01-13 14:21:47 +00:00
Kevin McConnell dc53a39b93 Update notification body 2025-01-13 14:21:47 +00:00
Kevin McConnell 0c152b5439 Style the tray a little bit 2025-01-13 14:21:47 +00:00
Kevin McConnell 8a51597408 Add direct linking to comments 2025-01-13 14:21:47 +00:00
Kevin McConnell af5ac65116 Make notification target polymorphic 2025-01-13 14:21:47 +00:00
Kevin McConnell 952895ae67 WIP: show notifications in a tray 2025-01-13 14:21:47 +00:00
Kevin McConnell 6b5e098407 Use a better return value 2025-01-13 14:21:47 +00:00
Kevin McConnell a082eb75f5 Track events for new comments too 2025-01-13 14:21:47 +00:00
Kevin McConnell 5a56c16029 Add a factory for creating notifications 2025-01-13 14:21:47 +00:00
Kevin McConnell d0ae5b4bdc Add notification model 2025-01-13 14:21:47 +00:00
Kevin McConnell c84926692e Never show login page to a logged in user 2025-01-13 14:20:42 +00:00