Commit Graph

93 Commits

Author SHA1 Message Date
Adrien Maston 4f9cfa94b7 Allow comment author block to wrap on 2 lines 2026-02-06 12:30:28 +01:00
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
Andy Smith fe57d9d013 Prevent comment content from overlapping with reaction button 2026-01-13 11:55:01 -06:00
Andy Smith ca5bca9796 Bump boost size up a tick on mobile 2026-01-12 13:18:39 -06:00
Andy Smith 03ce900c2e Tweak comment history button on mobile 2026-01-09 10:47:39 -06:00
Andy Smith 1802b45c8d Account for new button sizes on mobile 2026-01-08 13:30:10 -06:00
Andy Smith 35619857aa Target comment elements more precisely 2025-12-23 11:27:16 -06:00
Jason Zimdars 5716303c22 Rename
It feels odd to have a `.system` class in the `.comment` namespace.
Might as well make it really obvious if we're going to rename it
2025-12-22 11:12:46 -06:00
Alexander Zaytsev e52eba9c4e Rename .comment--system to .system-comment 2025-12-19 09:34:23 +01:00
Jason Zimdars f9b7d05f2c Fix that comments and system comments weren't the same width on mobile 2025-12-17 20:35:34 -06:00
Jason Zimdars 7c92d48d8a Style 2025-12-17 20:10:36 -06:00
Jason Zimdars ae5cb096f9 Let's just use the class we already have 2025-12-17 20:06:38 -06:00
Jason Zimdars fe89debf94 No longer used 2025-12-17 19:57:19 -06:00
Jason Zimdars b0a1b370a8 Move transition to wrapper element 2025-12-17 19:55:50 -06:00
Alexander Zaytsev 56bf5289c3 Use display: contents instead of flex 2025-12-17 10:20:16 +01:00
Alexander Zaytsev 035c5f97a1 Use simpler selectors to target system comments 2025-12-17 10:09:35 +01:00
Jason Zimdars 5949b421e9 Hide the 'Show history' button if there are no other entries to expand 2025-12-16 16:09:09 -06:00
Jason Zimdars 8659e19671 Collapse and expand system comments 2025-12-16 14:21:48 -06:00
Jorge Manrubia 0278fe6ae4 Revert "Mobile app / Scoped stylesheets" (#1698)
This reverts commit 39c1906e67.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-16 17:20:18 +01:00
Adrien Maston 041ac0c28e Add conditional stylesheets for mobile apps 2025-11-24 11:52:56 +01:00
Jason Zimdars 16c914c7c5 Center system comments 2025-10-30 09:32:19 -05:00
Andy Smith b2a83f1625 Add Basecamp-style boosts 2025-10-27 16:59:57 -05:00
Andy Smith 6b0fc35627 Revert "Reactions" 2025-10-27 16:16:57 -05:00
Andy Smith ce4899d089 Better trigger alignment without reactions 2025-10-27 15:05:40 -05:00
Andy Smith a742ed65ff Use new icons 2025-10-27 14:10:47 -05:00
Andy Smith 7b432a40f6 Consolidate quick-reactions and reactions 2025-10-27 11:34:35 -05:00
Andy Smith 2aea2a61f3 Lexxy content tweaks 2025-10-23 15:17:15 -07:00
Andy Smith 22f9c9d168 WIP 2025-09-10 12:15:31 -05:00
Andy Smith a213ac666e Revert sentence structure, but keep bold text 2025-07-28 12:24:49 -05:00
Andy Smith 8e795f183d Update system message to highlight verbs 2025-07-24 13:42:19 -05:00
Andy Smith f9c7862fc1 Add hover effect for comment edit button 2025-07-07 10:12:32 -05:00
Andy Smith 95dac275fd Add hover effect to overflow button 2025-07-07 10:07:56 -05:00
Jason Zimdars 8f42086703 Truncation for comment author line 2025-07-03 15:06:15 -05:00
Jason Zimdars 91aa8be4fc Screen reader: Use heading for comments navigation 2025-07-02 14:22:16 -05:00
Jason Zimdars 88a54a246d Need to convert to srgb color space when using oklch colors in Safari
No idea why
2025-05-29 16:24:17 -05:00
Jason Zimdars 81eb1e6fa3 Tighten spacing, try a subtle texture 2025-05-29 15:17:51 -05:00
Jason Zimdars 613a877f7f Merge branch 'main' into jz-5-28-25
* main: (58 commits)
  Safari doesn't support CSS `field-sizing: content` so we can shim it for now
  Hide bubbles in trays
  update lexical
  update lexical
  Update script to deal with duplicated records
  Revert "Revert "Replace House with Lexical""
  Revert "Replace House with Lexical"
  Update actiontext lexical
  Remove trace
  Update lexical
  Use existing method
  Update lexical
  Fix merge issues
  Format
  Cleanup
  Format
  Make tests pass with action text
  Don't choke when rendering commands where the card was deleted
  Update lexical
  Simple format excerpts in activity
  ...
2025-05-29 14:21:17 -05:00
Jorge Manrubia fa04016cbe Revert "Revert "Replace House with Lexical"" 2025-05-29 14:25:16 +02:00
Jorge Manrubia 08d8b2e5ff Revert "Replace House with Lexical" 2025-05-29 14:22:27 +02:00
Jorge Manrubia 62bef018ea Merge branch 'main' into lexical
* main:
  Don't choke when rendering commands where the card was deleted
  Update tests
  Rework system events
  test: add missing assertions
  dep: bump active_record-tenanted to fix URI support
  Remove hyphen from "Un-do"
  Prevent default when handling keyboard shortcuts
  dep: update AR::Tenanted to support database URIs
  Detect platform and label the correct hotkey shortcut
  Things got too tight
  Don't require TLS for Beamer at the moment
  dep: update dependencies

# Conflicts:
#	Gemfile
#	Gemfile.lock
#	app/assets/stylesheets/comments.css
2025-05-29 12:44:14 +02:00
Jason Zimdars f04cbf44de Fix event comment horizontal alignment
- No need to expose reactions here, either
2025-05-28 16:13:42 -05:00
Jason Zimdars c6c9e0d5fc Rework system events
- Restyle system events so they don't look like comments and aren't attributed to the system user
- Ensure the event creator is included in the description so it's clear who did it.
- Walk back system comment replacement. Yes, it potentially avoids embarassing people when they change their mind, it's also losing data. If two intentional assigments happen in proximity, we've been only showing the latest one,.
2025-05-28 15:26:41 -05:00
Jason Zimdars 62c01627ec First stab at styles 2025-05-26 14:56:36 -05:00
Andy Smith 2d73f243d2 Move media size to markdown-content 2025-05-19 13:52:45 -05:00
Andy Smith f982a729e9 Max height for media in comments 2025-05-14 13:38:17 -05:00
Andy Smith beda688d10 Show buttons depending on reaction presence 2025-05-07 15:06:40 -05:00
Andy Smith 3710aa43e4 Stub out overflow reactions 2025-05-07 14:29:29 -05:00
Jason Zimdars a3b81af1da Merge branch 'main' into colors
* main: (284 commits)
  Polish closed stamp
  Add new card button to considering column
  Let's leave inside the menu for now
  Improve terminal history behavior
  More space between
  Add a navigation hint, make "All collections" link navigate like the others
  Reorder methods
  Fix: dismiss notifications from comments
  Fix card icons
  Filter collections menus, add keyboard shortcuts
  Style
  Space between
  Remove debug
  Consistent sizing
  Configure deployment for load balancing
  Configure the autoclose period at the collection level
  Rename to avoid using the same name
  Add brakeman rule
  Collections can be private now too
  Not used outside the class anymore
  ...
2025-04-25 15:59:09 -05:00
Jason Zimdars a4ce130c1c Adjust perma layout for larger cards 2025-04-24 11:51:27 -05:00
Jorge Manrubia b0aae3ad9e Reapply "Add a description field for cards"
This reverts commit a4cc143b09.
2025-04-21 16:45:24 +02:00