Commit Graph

102 Commits

Author SHA1 Message Date
David Heinemeier Hansson 3eeb121ea1 Cards are no longer resized on the basis of activity scores 2025-04-18 17:00:13 +02:00
David Heinemeier Hansson c65639a3ce No longer used
Seemed to have been used for an old combobox design
2025-04-18 16:52:55 +02:00
David Heinemeier Hansson 9aef965db8 No longer used
I assume it was from the old bubble design
2025-04-18 16:49:36 +02:00
Jorge Manrubia ba6eab509c Refresh timers when morphing happens 2025-04-11 13:26:01 +02:00
Andy Smith 5cb7643274 Merge branch 'main' into btn-dropdown
* main: (21 commits)
  Migration to migrate URLs after renaming bubbles => cards
  Remove migration
  Restore bubbles.css since some styles are used
  Fix issues with styling card__ components
  Remove bubbles.css
  Fix renames that the scripts missed
  Reorganize templates to remove cards/cards redundancy
  Rename bubbles => cards
  Safari sure loves outlines
  Use a number field, and improve focus styles
  Fix boosting via number input
  Embed additional video formats
  Fix that notifications weren't marked as read
  Fix tray item position
  Update House to bring patch for history restoration error
  Tighten up
  Restore additional missing routes removed in c0f3ff46d7
  Retore route removed in c0f3ff46d7
  Fix visual regression in popup menus
  Perma cards should not always be 100% width
  ...
2025-04-09 14:17:39 -05:00
Andy Smith 7b8ed815cd Address PR feedback 2025-04-09 14:09:08 -05: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
Andy Smith 9975ed96f4 WIP: Partially working 2025-04-08 16:01:45 -05:00
Jorge Manrubia a0579f7b6f Inject a span with a class with the value so that we can style it
https://37s.fizzy.37signals.com/buckets/693169850/bubbles/999008854
2025-04-07 10:46:24 +02:00
Jorge Manrubia 8e01a277ad Add daysago formatter and extract common helper to reuse with indays formatter 2025-04-07 10:46:22 +02:00
Mike Dalessio 2e917b90a2 Fix the DaysAgoFormatter output to say "days ago"
and not "in N days" 😅
2025-04-06 22:08:51 -04:00
Jorge Manrubia 488e96b20b Handle times on the client to make this cache-friendly 2025-04-04 14:35:24 +02:00
Jorge Manrubia 5a740a4251 Enable page refreshes with morphing
Update Trix to a compatible version https://github.com/basecamp/house/tree/morphing-2
2025-04-03 11:16:07 +02:00
Jason Zimdars 46cd84f306 Remove divider 2025-03-25 15:06:25 -05:00
Bruno Prieto 10cdb8c1a8 Improve accessibility of comments and reactions 2025-03-14 02:29:44 +01:00
Kevin McConnell 16a80ff3a6 More dynamic activity scores
This introduces a more dynamic system of activity scoring, to improve
the way bubbles "bubble up" due to their activity. There are a few
different parts we can tune here, and it's likely we'll need to make
adjustments once we get a feel for how this works in practice.

The basic idea here is:

- We assign points for certain types of event that happen on a bubble. A
  boost gets 1 point, a comment gets 10 points, and so on.
- These points decay over time, at a rate of 50% per day. So old
  activity is worth much less than new activity. Bubbles should rise up
  quickly when acted upon, bit will float back down if left idle.
- Some comments can score higher than others: the first comment from
  each person on a bubble is worth more (20) because it signals that
  more people are getting involved; and comments that follow a comment
  by a different author are also worth more (15) because that signals
  there's ongoing conversation between people, not just a series of
  notes being left by one individual.

In terms of implementation, we persist the score on the bubble
whenever it changes, but we handle the decay on the client side. That
allows us to cache the bubble representation without having to
continually change it while its activity decays.

We also keep a separate `activity_score_order` attribute on the model.
This can be used to sort the bubbles in order of "most active", without
having to think about the decay.
2025-03-05 17:16:31 +00:00
Kevin McConnell 5d1206e067 remote-auto-save -> outlet-auto-save 2025-02-28 15:15:09 +00:00
Kevin McConnell 4d13db0f8b Rename to local-save-controller 2025-02-28 15:13:23 +00:00
Kevin McConnell 06dcb11e4b Refactor the controller a little bit 2025-02-28 15:12:10 +00:00
Jason Zimdars a0ffbc807f Auto save comments to local storage to prevent losing work 2025-02-26 17:37:49 -06:00
Jason Zimdars 000bd158eb Reactions on comments 2025-02-18 17:08:56 -06:00
Jason Zimdars 3e5b531d12 Extract into a single-purpose controller 2025-02-13 17:40:18 -06:00
Jason Zimdars ddfaf8bf33 Paste files in the new editor 2025-02-13 17:04:43 -06:00
Kevin McConnell cd9fce9b89 Add auto-save to the draft comment field 2025-02-13 15:16:42 +00:00
Kevin McConnell dac2611c57 Auto-pop bubbles 2025-02-12 13:20:05 +00:00
Kevin McConnell 4121f68f7d Auto-save edits to bubble title 2025-02-11 14:34:39 +00:00
Kevin McConnell 7189e7a39e Periodically refresh relative times
Otherwise the text will get out of date. For example, a new notification
will say "Less than a minute ago", which is not true for very long if
the page isn't refreshed.
2025-02-05 15:18:40 +00:00
Jason Zimdars 6f351b956c Allow pasting files in comments 2025-01-31 18:07:12 -06:00
Kevin McConnell b320b72bc6 Use local time helper for comment dates
Also has the advantage you can hover to see the time.
2025-01-30 17:10:58 +00:00
Kevin McConnell d248bd6323 Clear Activity highlights on back navigation
Also small refactor of the controller.
2025-01-29 18:00:21 +00:00
Jason Zimdars 4827cb3a30 Refactor using more Stimulus-y conventions 2025-01-28 20:07:45 -06:00
Jason Zimdars 367a618064 When you hover a chip, highlight all the other chips about that bubble for that day 2025-01-28 18:02:32 -06:00
Kevin McConnell bfaac4bd44 Render activity directly into requested timezone 2025-01-27 15:41:01 +00:00
Kevin McConnell 94b2c256b9 Set request timezone to match browser 2025-01-27 14:16:15 +00:00
Jason Zimdars 881e1d07fc Merge branch 'main' into latest-activity
* main: (27 commits)
  Leave some space for the tray
  Let's not assume it's a due date
  Avoid overlap
  Let's try without the big drag button, extend beyond the column a touch
  Tighten labels
  Match notification dot
  Spacing
  Add more context
  Avoid leaving the tray open
  This shouldn't be here
  Paginate the read notifications
  Add a test case
  Split up a big view
  Allow filtering by stage
  Send beacon request on disconnect as well
  Wire up notifications "Mark all as read" button
  Add unread dot
  Set state for when there are no new notifications
  Move to right side, smooth transition
  Open tray on click, stub mark-as-read button
  ...
2025-01-24 15:07:17 -06:00
Kevin McConnell 1f3bc1134f Paginate the read notifications 2025-01-24 17:42:36 +00:00
Kevin McConnell 2cd2d5e2a1 We're not using the future class now 2025-01-23 12:45:22 +00:00
Kevin McConnell 6bc88466a3 Only highlight current hour on today's entry 2025-01-23 12:45:12 +00:00
Jason Zimdars 1c20872b83 Highlight the current hour
FIXME: only do this on the current day
2025-01-22 21:57:38 -06:00
Kevin McConnell 86cb627120 Include neighbouring events in paginated query
Since we're rendering according to the local timezone, we'll need to
include events that fall before or after the specific date on the
server, as they might get be inside the current day in the client's
timezone. So let's just grab a window of events either side of today,
and then hide anything that falls outside the client's day.
2025-01-22 16:44:30 +00:00
Kevin McConnell 4807d3cf7d Don't try to render fetched response
Because it's a turbo stream response, it will be rendered automatically.
2025-01-22 16:41:53 +00:00
Kevin McConnell b2f72ff668 Use Stimulus to position events by timezone 2025-01-22 14:38:38 +00:00
Jason Zimdars 49866a121d Merge branch 'main' into latest-activity
* main:
  Don't round up in time distance expression
  Tidy Gemfile
  Banner for draft state
  Drafts should always use the dashed outline wherever they're displayed
  Unnecessary parens
  Use distance to nearest edge
  Simplify overlap logic
  Fix divider drag jankiness
  Use cache-friendly "time ago"
  positionedClass -> installedClass
  Pull out moveDividerTo
  Before comes before After
  DividerElement -> Divider
  Clean up divider-controller
  Drag bubble divider
2025-01-21 13:50:28 -06:00
Kevin McConnell 42fa37d347 Send beacon request on disconnect as well
This is so we can dismiss any notifications that arrived for a bubble
while we were viewing that bubble. Otherwise, they'll stick around until
we leave the page and come back.
2025-01-21 14:47:56 +00:00
Jason Zimdars 02573b6dc8 Set state for when there are no new notifications 2025-01-20 17:58:56 -06:00
Kevin McConnell 11454a1952 Lazy-load activity pages 2025-01-17 17:28:07 +00:00
Kevin McConnell 181b7f3b64 Don't round up in time distance expression
e.g. 1.5 days ago is still "1 day ago", not "2 days ago".
2025-01-17 13:33:26 +00:00
Jose Farias d65d8a899b Merge pull request #209 from basecamp/drag-jankiness
Fix divider drag jankiness
2025-01-16 15:13:05 -06:00
Jose Farias fb27cee9b0 Unnecessary parens 2025-01-16 15:11:44 -06:00