Commit Graph

1899 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
Andy Smith 6c8d333bc9 Bump card perma z-index when dialog is open 2026-01-21 14:35:30 -06:00
Andy Smith 9b1dd0bcd9 Merge pull request #2401 from nqst/modal-scroll-block
Prevent page scrolling when modal dialog is open
2026-01-21 14:02:20 -06:00
Alexander Zaytsev 73cf1dede4 Use inline spacing variable 2026-01-20 20:51:01 +01:00
Alexander Zaytsev bfea02ebd0 Actually make it affect larger screens too
And remove a magic number
2026-01-20 10:54:39 +01:00
Alexander Zaytsev aea90f4b50 Add viewport padding to dialogs on mobile 2026-01-20 10:40:04 +01:00
Alexander Zaytsev 772b378668 Merge branch 'main' into modal-scroll-block 2026-01-19 22:19:51 +01:00
Alexander Zaytsev fa4e77f35e Prevent page scrolling when modal dialog is open 2026-01-19 20:46:49 +01: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 036768fede Create popup initial alignment classes 2026-01-16 14:30:47 -06:00
Andy Smith ac481d34ff Merge pull request #2366 from nqst/popup-disabled-buttons-no-pointer-events
Popups: remove hover styles from disabled menu items
2026-01-16 14:19:57 -06:00
Andy Smith df8f88f773 Fix class typo 2026-01-16 14:12:19 -06:00
Andy Smith 19ce79965b Align board and tag picker dialogs without using math 2026-01-16 14:00:04 -06:00
Jay Ohms 600ee87d51 Merge branch 'main' into mobile/bridge-components
* main:
  Solve problem when Action Text raises on missing attachables
  Solve problem when Action Text raises on missing attachables
  Completing a step removes stalled status from UI
  Bump Bootsnap to v1.21.1
  Use correct class selectors to target cards with  background images
  Update lexxy to latest
  Hide table button for now
  Table CSS tweaks
  Update to Lexxy 0.7.0beta
  Revert "Wrap tables in div"
  Wrap tables in div
  CSS updates for `<table>` support
  Update to latest Lexxy
  Show only active subscriptions
  Add paid accounts stats to admin dashboard
  Keep URLs in webhook events absolute
  Delete orphaned watches and pins when a card is moved to a private board
2026-01-16 12:44:55 -05:00
Andy Smith ff050505d5 Use correct class selectors to target cards with background images 2026-01-15 12:27:29 -06:00
Jorge Manrubia f9d85570e6 Hide table button for now 2026-01-15 16:37:27 +01:00
Zoltan Hosszu b28a88c185 Table CSS tweaks 2026-01-15 16:34:56 +01:00
Zoltan Hosszu a5a24d0085 CSS updates for <table> support 2026-01-15 16:34:56 +01:00
Alexander Zaytsev 44d9df0e8a Merge branch 'main' into popup-disabled-buttons-no-pointer-events 2026-01-14 17:25:24 +01:00
Adrien Maston 3b97b2e5c8 Merge branch 'main' into mobile/bridge-components
* main: (22 commits)
  Disable card column buttons when active
  Prevent comment content from overlapping with reaction button
  Delete pins belonging to cards in a board with revoked access
  Update development dependencies in SAAS lockfile
  Update runtime dependencies
  Update development dependencies
  Balance magic link instructions
  Add `.txt-balance` utility
  Move handleDesktop inside restoreColumnsDisablingTransitions
  Adjust border radius
  Clean up blank slates
  Add dialog manager to events page
  More sturated mini bubbles in light mode
  Brighten mini bubbles in dark mode
  Use separate cache namespaces for each beta instance
  Bump boost size up a tick on mobile
  Move Undo form inside closure message element
  Phrasing tweak for exceeding storage limit
  Keep strong tags words on same line
  Allow ActionText embed reuse and safe purge (#2346)
  ...
2026-01-14 10:34:13 +01:00
Andy Smith c8059dea90 Disable card column buttons when active 2026-01-13 16:15:33 -06:00
Andy Smith fe57d9d013 Prevent comment content from overlapping with reaction button 2026-01-13 11:55:01 -06:00
Alexander Zaytsev 671ce573c8 Remove whitespace 2026-01-13 11:48:04 +01:00
Alexander Zaytsev e658e71977 Remove hover styles from disabled menu items 2026-01-13 11:47:44 +01:00
Adrien Maston 8894382d11 Save a bit of space in "watch" card 2026-01-13 11:43:21 +01:00
Adrien Maston 9dc51514e6 Set footer height 2026-01-13 11:42:55 +01:00
Adrien Maston e5c7965ba4 Fix bottom notch in new card form 2026-01-13 11:19:57 +01:00
Alexander Zaytsev 603e4d10b3 Add .txt-balance utility 2026-01-13 09:50:37 +01:00
Andy Smith f428bfaa7c Adjust border radius 2026-01-12 15:43:59 -06:00
Andy Smith 64fdbf6b8f Clean up blank slates 2026-01-12 15:37:06 -06:00
Andy Smith 8288e85df6 More sturated mini bubbles in light mode 2026-01-12 13:34:30 -06:00
Andy Smith df7df74752 Brighten mini bubbles in dark mode 2026-01-12 13:31:36 -06:00
Andy Smith ca5bca9796 Bump boost size up a tick on mobile 2026-01-12 13:18:39 -06:00
Andy Smith 8bb043bef8 Move Undo form inside closure message element 2026-01-12 13:14:37 -06:00
Adrien Maston 450f57ee5b Fix missing underline on card closure message button 2026-01-12 17:39:18 +01:00
Adrien Maston 82d4fa5214 Tweak card footer on perma
... to fix in the native apps
2026-01-12 16:18:25 +01:00
Jay Ohms bd8feea5c7 Fix the form submit css scope 2026-01-12 10:11:09 -05:00
Adrien Maston 05c0cbb839 Prevent autofocusing the filter input in drop downs 2026-01-12 12:52:42 +01:00
Jay Ohms d5fef48e42 Merge branch 'main' into mobile/bridge-components
* main:
  Consolidate footer text into a shared partial
  Tweak comment history button on mobile
  Transparent lexxy toolbar when inside a golden card
  Add rel noopener to external links
2026-01-09 14:42:22 -05:00
Andy Smith 509f0ca305 Consolidate footer text into a shared partial 2026-01-09 11:57:45 -06:00
Andy Smith 03ce900c2e Tweak comment history button on mobile 2026-01-09 10:47:39 -06:00
Andy Smith 0aca39a133 Transparent lexxy toolbar when inside a golden card 2026-01-09 10:11:33 -06:00
Jay Ohms ac45da2b99 Merge branch 'main' into mobile/bridge-components
* main:
  Fix that caching should be disabled in dev by default. References 3cf841d463.
  Revert "Add CJK (Chinese, Japanese, Korean) search support"
  Account for new button sizes on mobile
  Bump filter z-index when filters are open
  Use a dedicated resource for showing cards in draft mode
  Refactor popup.css styles for focus state
  Add Segoe UI Variable Fizzy font face configuration comments
  Update @layer name to `base` in font-face definition for "Segoe UI Variable Fizzy"
  Fix font-face `src` reference for "Segoe UI Variable Fizzy" to correct local font lookup
  Adjust font-weight range for "Segoe UI Variable Fizzy" to include 800-900
  Update --font-sans and related font-face references to "Segoe UI Variable Fizzy" for consistency
  Add "Segoe UI fizzy" to --font-sans and define custom font faces
  Update --font-sans to include "Segoe UI Variable" for improved text rendering
  Add margin to details inside popup styles
2026-01-08 15:46:29 -05:00
Andy Smith cf83f347c4 Merge pull request #2260 from liberaldev/add-segoe-ui-variable
Integrate Segoe UI Variable
2026-01-08 14:40:35 -06:00
Andy Smith c30b7982e5 Merge pull request #2240 from vixen24/main
Add margin to details inside popup styles
2026-01-08 14:38:26 -06:00
Andy Smith 4442451625 Merge pull request #2320 from basecamp/boost-fix-mobile
Account for new button sizes on mobile
2026-01-08 14:20:59 -06:00
Andy Smith 1802b45c8d Account for new button sizes on mobile 2026-01-08 13:30:10 -06:00
Jay Ohms ff7162c0c0 Fix overflow-menu css scope 2026-01-08 13:44:11 -05:00
Andy Smith 625940e414 Bump filter z-index when filters are open 2026-01-08 12:41:57 -06:00
Adrien Maston 24e4335ef8 Remove the <summary> distinction 2026-01-08 17:17:01 +01:00