Commit Graph

142 Commits

Author SHA1 Message Date
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
Jorge Manrubia 515396263e Refresh local time target when morphed
Alternative to https://github.com/basecamp/fizzy/pull/486
2025-05-13 05:44:19 +02:00
Andy Smith 9a38c28858 Merge pull request #463 from basecamp/reaction-emojis
Reaction emojis
2025-05-08 11:00:26 -05:00
Jorge Manrubia 5cd71a7699 Don't dismiss on any key, only with N or ESC
Also, this reworks the system to rely on stimulus event handling. This cover cases like unbinding events automatically when the controller get disconnected and such.

See:
https://3.basecamp.com/2914079/buckets/37331921/todos/8617430347
2025-05-08 11:21:39 +02:00
Jorge Manrubia 05e55adbaa Prefer array 2025-05-08 10:51:33 +02:00
Jorge Manrubia c25ec9ef7b Rename 2025-05-08 10:49:15 +02:00
Jorge Manrubia cb27a13781 Simplify 2025-05-08 10:48:21 +02:00
Jorge Manrubia 86db634f7f Fix: selected item not showing up in Safari
It also handles auto selecting when an element is focus. E.g: if you tabulate to the next control in the navigable list, you want selection to update accordingly.
2025-05-08 10:41:51 +02:00
Jorge Manrubia 59303a4628 Merge branch 'main' into fizzy-do-3
* main: (29 commits)
  Ensure that a "reconsidered" card gets an updated timestamp
  Try a fresh activity design
  Log the authenticated user
  Remove leading space when avatar is hidden on pinned cards
  Display card number in notifications and events
  Ensure that cards with an empty title aren't mysterious in notifs
  bin/dev ensures puma runs solid queue
  Adjust selection color to feel more terminal-y
  Eliminate double-tab behavior
  Clear error state when you start editing
  Color terminal text on error
  Don't indicate spelling errors
  The command is lowercase
  Remind 7 days before, not 30
  Make the icon square
  Subtler bubble styles
  Variable bubble shapes
  Bubble CSS
  Rename 'badge' to 'bubble'
  Address PR feedback
  ...

# Conflicts:
#	app/javascript/controllers/terminal_controller.js
#	app/views/commands/_form.html.erb
2025-05-08 10:29:54 +02:00
Jason Zimdars 28659c1295 Clear error state when you start editing
- It feels wrong to persist the error state while you're fixing the command
2025-05-07 11:52:20 -05:00
Jason Zimdars 8dd5b723a8 The command is lowercase 2025-05-07 11:39:28 -05:00
Jorge Manrubia 8e4912a2b6 Rename method 2025-05-07 17:40:03 +02:00
Jorge Manrubia fe176aec7c Only clear if you haven't touched the prompt 2025-05-07 17:39:00 +02:00
Jorge Manrubia 2503524b7a Implement help menu command to show a help menu with the commands 2025-05-07 17:32:43 +02:00
Jorge Manrubia bfc89124cf Reorder 2025-05-07 13:55:28 +02:00
Jorge Manrubia b9875033bc Remove unused 2025-05-07 13:54:47 +02:00
Jorge Manrubia 87484dbca0 Add basic keyboard navigation support for the Fizzy do menu 2025-05-07 13:46:19 +02:00
Jorge Manrubia 0dcc6959da Extract constant to clarify regexp 2025-05-07 13:31:52 +02:00
Jorge Manrubia 181e35b5b2 Restore command when clicking on it 2025-05-07 12:03:02 +02: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
Jorge Manrubia 8697cabbe2 Show confirmation when submitting certain commands
https://3.basecamp.com/2914079/buckets/37331921/todos/8617430347
2025-05-07 10:20:32 +02:00
Jorge Manrubia 6f382b68e0 Rename command controller => terminal controller and name the error class after terminal 2025-05-07 08:53:25 +02:00
Jorge Manrubia 55ea460d3e Handle form errors with a stimulus class
We need to keep the focus in place when submitting the form. We are using a data-turbo-permanent for that. We were rendering the error form with a turbo stream. The problem was that turbo streams ignore permanent elements as per this https://github.com/hotwired/turbo/pull/688, so the system wasn't updating the input field as expected.

Handling this as the stimulus level will also help with managing additional error states (such as the one we need for confirmations).
2025-05-07 08:46:47 +02:00
Andy Smith 9b49606246 Consistently align and size all elements 2025-05-06 16:37:01 -05:00
Jorge Manrubia 20bf772988 Remove debug 2025-05-06 10:36:00 +02:00
Jorge Manrubia 5c417ada63 Keep focus 2025-05-06 10:20:37 +02:00
Jorge Manrubia a441d144e9 Remove debug code 2025-05-06 09:32:35 +02:00
Jorge Manrubia 456463ffef Reset form automatically 2025-05-06 09:30:37 +02:00
Jorge Manrubia 3e8896ef93 Undo working for assignments 2025-05-06 09:25:52 +02:00
Jorge Manrubia 72ffcfac8b Assignments working 2025-05-06 06:45:37 +02:00
Jorge Manrubia 65d809dd8d Basic models for Fizzy do and searches working with them 2025-05-06 06:42:33 +02:00
Jason Zimdars 3468ccd41d Improve terminal history behavior 2025-04-25 13:58:41 -05:00
Jorge Manrubia 4657663e35 Create local time formatter to match the previous format we were generating server-side 2025-04-25 08:55:36 +02:00
Jason Zimdars b46461d7ed Errant bubbles => cards replacement 2025-04-22 14:21:14 -05:00
David Heinemeier Hansson 48a6c05250 No longer used 2025-04-20 16:23:15 +02:00
David Heinemeier Hansson d3fa62d4c2 Inline touch check thats only used once
Not worth loading an entire file for this.
2025-04-20 16:21:08 +02:00
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
Jorge Manrubia e21bb99167 Reflect picked color automatically with a custom stream action 2025-04-10 13:06:55 +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