Commit Graph

55 Commits

Author SHA1 Message Date
Mike Dalessio cb61b36715 Allow boosts on cards (#2411)
* Add reactions association to Card model

Adds `has_many :reactions` to Card, matching the implementation in Comment.
This allows cards to be reacted to directly with emoji reactions.

The association:
- Orders reactions chronologically
- Uses polymorphic `:reactable` interface
- Deletes reactions when card is destroyed

Includes test coverage for the new association.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Add reactions UI to card detail view

- Create Cards::ReactionsController with turbo stream responses
- Add card reactions views (reactions list, new form, menu partial)
- Position reaction button flush-right when no reactions exist
- Show reactions on bottom-left when present, with button inline
- Handle narrow viewports by flowing button below meta section
- Add controller tests for card reactions

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Add boost count to card preview

Display reaction count alongside comment count on card tiles in board
columns. Introduces a .card__counts wrapper to group both counts with
proper positioning on all viewport sizes.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Consolidate reaction views for cards and comments

Extract shared views to app/views/reactions/ using polymorphic routing.
Both card and comment reactions now render the same partials, with a
helper to compute the correct path prefix for nested routes.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Fix emoji picker width in card reactions

Override .card .popup { inline-size: 260px } for the reaction popup
so the emoji grid displays without horizontal scrollbar.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Hide boost count where comment count is hidden

Add .card__boosts alongside .card__comments in:
- Tray view (display: none)
- Cards with background images (opacity toggle on hover)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Fix reactions button overlap with zoom button in card footer

When a card has a background image, the footer contains both a reactions
button and a zoom button. Previously they would overlap because the
reactions button was absolutely positioned to the bottom-right.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Tighten up previews

* Move card reactions from meta partial to container

Fixes two issues:

1. Reactions were duplicated each time a card was assigned because the
   turbo stream replaced the meta div with the full perma/meta partial,
   which included reactions outside the replaced element.

2. Draft cards incorrectly showed the boost button because the meta
   partial was shared between published and draft containers.

Moving reactions to _container.html.erb (published cards only) fixes
both issues and keeps the meta partial focused on meta content.

Fixes https://app.fizzy.do/5986089/cards/3837
Fixes https://app.fizzy.do/5986089/cards/3835

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* WIP adjust perma page

* Position and style the footer

* Render the stamp in the card body instead of the footer

* Fix undefined local variable in public cards view

Changed `card` to `@card` when rendering the stamp partial.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Preload card reactions to avoid N+1 queries

Include reactions and their reacters in the preloaded scope, matching
what we already do for comments.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Add model tests for card and comment reaction cleanup

Test that:
- Creating a card reaction touches the card's last_active_at
- Reactions are deleted when their parent comment is destroyed
- Reactions are deleted when their parent card is destroyed

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Minor improvements to reactions code

- Use size instead of count in boosts partial to avoid extra SQL query
  on already-loaded collection
- Add else clause to reaction_path_prefix_for to raise ArgumentError
  for unknown reactable types instead of silently returning nil

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Bump specificity of reaction popup in the card perma

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: Andy Smith <andy@37signals.com>
2026-01-23 13:25:55 -05:00
Jay Ohms a9b873f151 Merge branch 'main' into mobile/bridge-components
* main:
  Create popup initial alignment classes
  Fix class typo
  Hide the board selector button if card is closed
  Align board and tag picker dialogs without using math
  Add dialog manager to card perma
  Fix "M" hotkey using stale user from fragment cache
  Add Enable all/Disable all buttons to webhook event selection
  Remove whitespace
  Remove hover styles from disabled menu items

# Conflicts:
#	app/views/cards/_container.html.erb
2026-01-19 12:02:42 -05:00
Andy Smith e5eb1080f6 Add dialog manager to card perma 2026-01-16 13:24:23 -06:00
Jay Ohms 43314f7a4c Move the bridge form controller to the outer container so a cancel target button can be included 2026-01-12 09:18:23 -05:00
Jorge Manrubia f58a1aeb31 Use a dedicated resource for showing cards in draft mode
Mobile team needs this. Also, this lets us get rid from some conditionals for handling
both modes with a single template.

https://3.basecamp.com/2914079/buckets/44843469/messages/9437287330
2026-01-08 10:40:21 +01:00
Jorge Manrubia ee80b87c8c Add billing system with Stripe
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Jason Zimdars <jz@37signals.com>
2025-12-16 16:44:20 +01:00
Mike Dalessio b05ecb7809 Update card buttons dynamically
User flows when editing a card look like:
- Click "Edit" → the closure buttons are replaced by "Save changes"
- Submit card form → Saves and restores closure buttons
- Press ESC while editing → Cancels and restores closure buttons

Also, renamed for clarity:
- _title.html.erb → _content.html.erb

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-22 12:14:39 -05:00
Jorge Manrubia 03a345609e Baseline replacing collection with board across code 2025-11-05 13:31:54 +01:00
Jason Zimdars b826eb47fe Remove draft restoration notice
We don't need to announce that there is autosaved content
2025-11-04 21:54:14 -06:00
Jorge Manrubia 9d4dd3b00e Remove "save as draft"
Removes the creating status completely as well as the abandoned cards system. It will
always resume drafts if they exist, for a given collection and user.

https://app.box-car.com/5986089/cards/2489
2025-11-03 09:32:29 +01:00
Jorge Manrubia be6708065e No need to invalidate cache on columns since we load those with turbo frame now 2025-10-31 10:40:44 +01:00
Jorge Manrubia b0e5a5ccb5 Some fixes for HTTP caching not being invalidated properly 2025-10-31 10:40:26 +01:00
Jorge Manrubia 2a79cb413e Remove cacheable concern, inline cache helper 2025-10-31 10:38:52 +01:00
Jason Zimdars 88867e4345 Merge branch 'main' into jz/10-30-25 2025-10-30 14:03:21 -05:00
David Heinemeier Hansson 9bbac44f84 Dont reference ivars in partial 2025-10-30 16:59:57 +01:00
David Heinemeier Hansson 1572147d5b Spacing 2025-10-30 16:43:27 +01:00
Jason Zimdars f82f44e300 We don't want this on the new card form 2025-10-30 10:05:02 -05:00
Jason Zimdars 5c3f664e7e Allow changing columns even when cards are done 2025-10-29 16:32:11 -05:00
Andy Smith 424a7795a9 Hide column list when creating a new card 2025-10-10 16:53:34 -05:00
Andy Smith 42aa213312 Remove aside and toolbar role from perma actions 2025-10-07 10:48:05 -05:00
Jorge Manrubia aa9d7664ef Move cards to different columns from the perma 2025-09-26 11:14:02 +02:00
Jorge Manrubia c96334ca3d Merge main into collapsing-columns branch
Resolves merge conflicts by:
- Integrating new Cards::Columns architecture from main
- Preserving collapsible columns functionality
- Maintaining stage-specific doing columns support
- Using new column-based rendering while keeping expanders

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-24 10:19:04 +02:00
Jason Zimdars bb177b78a5 Move all engagements to the stage picker UI 2025-09-22 13:46:00 -05:00
Jason Zimdars 2ea2e65f04 Always show the stage picker, cards in Considering are unstaged 2025-09-22 10:55:22 -05:00
Jorge Manrubia 690734d8ab Fix several caching issues when viewing card permas 2025-09-18 10:58:09 +02:00
Jorge Manrubia 209e8b61b8 Add caching and http caching for rendering the card perma 2025-09-09 12:07:32 +02:00
Jason Zimdars e6d4c3d13f Display bubbles on card permas 2025-09-08 15:53:20 -05:00
Jason Zimdars 457725d597 Fix rendering and introduce a new style 2025-09-02 20:11:34 -05:00
Andy Smith 9224b76104 Workflow stages look better on mobile 2025-08-11 11:43:03 -05:00
Jason Zimdars 98f9ba5512 Allow cards in Considering to gilded 2025-07-07 15:14:33 -05:00
Jason Zimdars f02215c5b7 Add steps to cards 2025-07-01 20:05:20 -05:00
Jason Zimdars c7cc4fb286 Zoom background on perma 2025-06-09 16:30:12 -05:00
Jason Zimdars c4ca5d34e4 Allow cards to be moved to another collection 2025-05-29 21:41:29 -05:00
Andy Smith 04d01d7d10 Merge notification styles into a card variant 2025-05-20 13:50:53 -05:00
Andy Smith 900fbef686 Add card header to notifications 2025-05-19 15:20:56 -05:00
Andy Smith 8077e85019 Consolidate a few styles for card headers 2025-05-19 14:41:26 -05:00
Jason Zimdars bc6709c4eb Display card id 2025-05-02 20:00:51 +02:00
Jason Zimdars 8c51ca391b Move card delete button to a far less prominent position 2025-04-23 16:39:47 -05:00
Jason Zimdars 435d89cbe1 Just click to edit directly 2025-04-23 16:39:47 -05:00
Jason Zimdars f9cd725c84 Tighten spacing, improve allignment 2025-04-23 16:39:47 -05:00
Jason Zimdars cde8634bfe Adjust the stages column sizing 2025-04-22 12:59:36 -05:00
Jorge Manrubia b0aae3ad9e Reapply "Add a description field for cards"
This reverts commit a4cc143b09.
2025-04-21 16:45:24 +02:00
Jorge Manrubia a4cc143b09 Revert "Add a description field for cards" 2025-04-21 16:41:33 +02:00
Jorge Manrubia 7925cd7bf9 Extract partials 2025-04-21 14:52:21 +02:00
Jason Zimdars 0f3cb03bc4 Restore description field design clobbered in merge 2025-04-17 18:09:03 -05:00
David Heinemeier Hansson b8775d41f5 Inline perma to container partial
Reveals all the container elements and perma wasnt used elsewhere.
2025-04-17 16:06:28 +02:00
David Heinemeier Hansson 461c104ac2 Extract helper method to keep partial at a uniform level of abstraction 2025-04-17 15:42:07 +02:00
David Heinemeier Hansson 63b2abe020 Remove duplicated conditional 2025-04-17 15:38:47 +02:00
David Heinemeier Hansson b508a93aba Style 2025-04-17 15:36:11 +02:00
David Heinemeier Hansson 182d1c934b Note that we dont want to keep reloading these frames 2025-04-17 15:35:56 +02:00