feat(gif): admin disabled-teaser for GIF button when Giphy unconfigured (LC-511) #483

Merged
longjacksonle merged 3 commits from feat/LC-511-gif-admin-teaser into main 2026-06-28 18:22:23 +02:00

LC-511 - Show GIF picker to admins as a disabled teaser when Giphy unconfigured

Applies the LC-506 pattern (admin teaser for unconfigured AI actions) to the GIF feature.

Problem

The composer GIF button is hidden entirely when LETS_CHAT_GIPHY_API_KEY is unset (crate::gif::available() == false). An operator never learns the feature exists or how to enable it.

Change

When the GIF picker is unconfigured AND the viewer is a site admin, the GIF button renders as a disabled teaser with a tooltip naming the env var to set. Regular members still see nothing.

  • gif_teaser = !gif_available && role == admin, threaded through the three composer-feeding views (RoomPage, ComposerFragment, DmPage) and set in get_room + the DM page handler. So the teaser appears in both room and DM composers.
  • room/composer.html: an {% else if gif_teaser %} disabled-button branch (aria-disabled, data-lc-tip = gif-needs-setup).
  • Reuses the LC-506 .lc-action-disabled styling, plus a .lc-composer-btn.lc-action-disabled:hover no-hover override.
  • New i18n key gif-needs-setup in en + es.

Tests

just check, just test, and just test-saas all pass (the i18n catalog parity test covers the new en/es key). No test constructs these view structs by hand, so no contract drift. Tailwind rebuilt.

Not operator-visible in the LC-209 sense: no new env var, config, or contract change (the existing LETS_CHAT_GIPHY_API_KEY is only surfaced, not changed).

🤖 Generated with Claude Code

## LC-511 - Show GIF picker to admins as a disabled teaser when Giphy unconfigured Applies the LC-506 pattern (admin teaser for unconfigured AI actions) to the GIF feature. ### Problem The composer GIF button is hidden entirely when `LETS_CHAT_GIPHY_API_KEY` is unset (`crate::gif::available() == false`). An operator never learns the feature exists or how to enable it. ### Change When the GIF picker is unconfigured AND the viewer is a site admin, the GIF button renders as a disabled teaser with a tooltip naming the env var to set. Regular members still see nothing. - `gif_teaser = !gif_available && role == admin`, threaded through the three composer-feeding views (`RoomPage`, `ComposerFragment`, `DmPage`) and set in `get_room` + the DM page handler. So the teaser appears in both room and DM composers. - `room/composer.html`: an `{% else if gif_teaser %}` disabled-button branch (`aria-disabled`, `data-lc-tip` = `gif-needs-setup`). - Reuses the LC-506 `.lc-action-disabled` styling, plus a `.lc-composer-btn.lc-action-disabled:hover` no-hover override. - New i18n key `gif-needs-setup` in en + es. ### Tests `just check`, `just test`, and `just test-saas` all pass (the i18n catalog parity test covers the new en/es key). No test constructs these view structs by hand, so no contract drift. Tailwind rebuilt. Not operator-visible in the LC-209 sense: no new env var, config, or contract change (the existing `LETS_CHAT_GIPHY_API_KEY` is only surfaced, not changed). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Mirrors the LC-506 AI teaser: gif_teaser = !gif_available && role == admin, threaded through the composer-feeding views (RoomPage, ComposerFragment, DmPage) and set in get_room + the DM page handler.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
feat(gif): show disabled GIF teaser to admins when Giphy unset (LC-511)
All checks were successful
check-secrets / Nosey parker (push) Successful in 3s
check-secrets / Kingfisher (push) Successful in 4s
check-secrets / TruffleHog (push) Successful in 5s
check-secrets / Nosey parker (pull_request) Successful in 3s
check-secrets / Kingfisher (pull_request) Successful in 4s
check-secrets / TruffleHog (pull_request) Successful in 5s
Check / clippy + fmt + tests (pull_request) Successful in 3m3s
Create release / Create release from merged PR (pull_request) Has been skipped
44d478e7be
Composer GIF button now renders disabled with a "set LETS_CHAT_GIPHY_API_KEY" tooltip for site admins when the picker is unconfigured; regular members still see nothing. Reuses the LC-506 .lc-action-disabled styling with a composer-btn no-hover override.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
longjacksonle deleted branch feat/LC-511-gif-admin-teaser 2026-06-28 18:22:24 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
psa-systems/lets-chat!483
No description provided.