feat(gif): admin disabled-teaser for GIF button when Giphy unconfigured (LC-511) #483
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/LC-511-gif-admin-teaser"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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_KEYis 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 inget_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)..lc-action-disabledstyling, plus a.lc-composer-btn.lc-action-disabled:hoverno-hover override.gif-needs-setupin en + es.Tests
just check,just test, andjust test-saasall 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_KEYis only surfaced, not changed).🤖 Generated with Claude Code