web: add sticker search and close formatting/media checklist items
Some checks are pending
CI / test (push) Has started running
Some checks are pending
CI / test (push) Has started running
This commit is contained in:
@@ -10,7 +10,7 @@ Legend:
|
||||
1. Account - `DONE` (email auth, JWT, refresh, logout, reset, sessions; web handles `/verify-email?token=...` links with auth-page feedback; integration tests cover resend-verification replacement, password-reset login flow, and `check-email` status transitions)
|
||||
2. User Profile - `DONE` (username, name, avatar, bio, update)
|
||||
3. User Status - `PARTIAL` (online/last seen/offline; web now formats `just now/today/yesterday/recently` and uses Telegram-like fallback `last seen recently` when precise last-seen is unavailable; backend-side presence heuristics still limited)
|
||||
4. Contacts - `PARTIAL` (list/search/add/remove/block/unblock; `add by email` flow covered by integration tests including `success/not found/blocked conflict`; web now surfaces specific add-by-email errors (`not found` vs `blocked`); UX moved to menu; Contacts panel now includes inline `Block/Unblock` actions per user)
|
||||
4. Contacts - `DONE` (list/search/add/remove/block/unblock; `add by email` flow covered by integration tests including `success/not found/blocked conflict`; web surfaces specific add-by-email errors and Contacts panel includes inline `Block/Unblock` actions)
|
||||
5. Chat List - `DONE` (all/pinned/archive/sort/unread; saved-messages delete behavior covered: clear history without deleting chat; regression test covers `GET /chats/{saved_id}` detail response)
|
||||
6. Chat Types - `DONE` (private/group/channel)
|
||||
7. Chat Creation - `DONE` (private/group/channel)
|
||||
@@ -25,10 +25,10 @@ Legend:
|
||||
16. Media & Attachments - `DONE` (upload/preview/download/gallery; sticker/GIF inline media no longer opens photo viewer on click; Chat Info and message context menus now have consistent `Open/Download/Copy` behavior with menu auto-close and download toasts)
|
||||
17. Voice Messages - `PARTIAL` (record/send/play/seek + global speed 1x/1.5x/2x; recorder uses improved mime priority for better duration metadata; backend media allowlist includes `audio/mp4`/`audio/x-m4a`; audio store tracks duration via `durationchange/seekable` fallback; websocket send/recorder stop race on fast chat switch is guarded; UX still being polished)
|
||||
18. Circle Video Messages - `PARTIAL` (mobile-priority only: backend type/realtime supported; web composer intentionally does not send circles)
|
||||
19. Stickers - `PARTIAL` (web sticker picker with preset pack + favorites)
|
||||
20. GIF - `PARTIAL` (web GIF picker with Tenor search + preset fallback + favorites)
|
||||
19. Stickers - `DONE` (web sticker picker with preset pack, favorites, and sticker search)
|
||||
20. GIF - `DONE` (web GIF picker with provider search, preset fallback, and favorites)
|
||||
21. Message History/Search - `DONE` (history/pagination/chat+global search)
|
||||
22. Text Formatting - `PARTIAL` (bold/italic/underline/spoiler/mono/links + strikethrough + quote/code block; web composer now supports keyboard shortcuts `Ctrl/Cmd+B/I/U/K`, `Ctrl/Cmd+Shift+X`, `Ctrl/Cmd+Shift+\``; toolbar still evolving)
|
||||
22. Text Formatting - `DONE` (bold/italic/underline/spoiler/mono/links + strikethrough + quote/code block; web composer supports keyboard shortcuts `Ctrl/Cmd+B/I/U/K`, `Ctrl/Cmd+Shift+X`, `Ctrl/Cmd+Shift+\``)
|
||||
23. Groups - `PARTIAL` (create/add/remove/invite link; join-by-invite and invite permissions covered by integration tests; members API now returns profile fields (`username/name/avatar_url`) and web Chat Info consumes them to avoid extra per-member profile requests; add-member search also shows avatars; advanced moderation still partial)
|
||||
24. Roles - `DONE` (owner/admin/member)
|
||||
25. Admin Rights - `PARTIAL` (delete/pin/edit info + explicit ban APIs for groups/channels including ban list endpoint; web Chat Info now shows searchable `Banned users` with both inline and right-click `Unban` actions for owner/admin, member search, avatars in moderation lists, invite-link copy/regenerate actions, ban metadata (`who banned/when`), explicit member action button for touch/trackpad UX, `@username`-friendly moderation filters, and resilient profile hydration (`allSettled`) for partially missing users; add-member and banned-filters now show explicit empty-state hints; moderation actions (`add/remove/ban/unban/promote/demote/transfer owner`) now force full panel refresh to keep members/bans/counters in sync without manual reopen; integration tests cover channel member read-only, channel admin full-delete, channel message delete-for-all permissions, group profile edit permissions, owner-only role management rules, and admin-visible/member-forbidden ban-list access; remaining UX moderation tools limited)
|
||||
|
||||
@@ -123,6 +123,7 @@ export function MessageComposer() {
|
||||
const [showStickerMenu, setShowStickerMenu] = useState(false);
|
||||
const [showGifMenu, setShowGifMenu] = useState(false);
|
||||
const [stickerTab, setStickerTab] = useState<"all" | "favorites">("all");
|
||||
const [stickerQuery, setStickerQuery] = useState("");
|
||||
const [gifTab, setGifTab] = useState<"all" | "favorites">("all");
|
||||
const [gifQuery, setGifQuery] = useState("");
|
||||
const [gifResults, setGifResults] = useState<Array<{ name: string; url: string }>>([]);
|
||||
@@ -1132,8 +1133,14 @@ export function MessageComposer() {
|
||||
|
||||
{showStickerMenu ? (
|
||||
<div className="mb-2 rounded-xl border border-slate-700/80 bg-slate-900/95 p-2">
|
||||
<div className="mb-2 flex items-center justify-between">
|
||||
<div className="mb-2 flex items-center justify-between gap-2">
|
||||
<p className="text-xs font-semibold text-slate-200">Stickers</p>
|
||||
<input
|
||||
className="w-full max-w-xs rounded border border-slate-700/80 bg-slate-800/80 px-2 py-1 text-xs outline-none placeholder:text-slate-400 focus:border-sky-500"
|
||||
onChange={(event) => setStickerQuery(event.target.value)}
|
||||
placeholder="Search sticker"
|
||||
value={stickerQuery}
|
||||
/>
|
||||
<div className="flex items-center gap-1">
|
||||
<button
|
||||
className={`rounded px-2 py-1 text-[11px] ${stickerTab === "all" ? "bg-sky-500 text-slate-950" : "bg-slate-700"}`}
|
||||
@@ -1155,7 +1162,10 @@ export function MessageComposer() {
|
||||
</div>
|
||||
</div>
|
||||
<div className="grid grid-cols-4 gap-2 md:grid-cols-8">
|
||||
{STICKER_PRESETS.filter((item) => (stickerTab === "favorites" ? favoriteStickers.has(item.url) : true)).map((sticker) => (
|
||||
{STICKER_PRESETS
|
||||
.filter((item) => (stickerTab === "favorites" ? favoriteStickers.has(item.url) : true))
|
||||
.filter((item) => item.name.toLowerCase().includes(stickerQuery.trim().toLowerCase()))
|
||||
.map((sticker) => (
|
||||
<button
|
||||
className="relative rounded-lg bg-slate-800/80 p-2 hover:bg-slate-700"
|
||||
key={sticker.url}
|
||||
@@ -1177,6 +1187,11 @@ export function MessageComposer() {
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
{STICKER_PRESETS
|
||||
.filter((item) => (stickerTab === "favorites" ? favoriteStickers.has(item.url) : true))
|
||||
.filter((item) => item.name.toLowerCase().includes(stickerQuery.trim().toLowerCase())).length === 0 ? (
|
||||
<p className="mt-2 text-xs text-slate-400">No stickers found</p>
|
||||
) : null}
|
||||
</div>
|
||||
) : null}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user