v4: a comment and a chat message are edited in the same field as every text edited in place — each had an editor of its own: a comment's was its reply form, which showed a refused edit as a card and left the focus nowhere once closed, and a chat message's a box of its own with its own buttons and rules. InlineEdit gives its field, InlineEditField, to the components that open it with an action of their own, as these two do with their Edit and ✎: they keep those, a click on someone's message being no request to edit it. The field opens on the text with the caret at its end and as tall as the text, saves on Ctrl+Enter (and on Enter in the chat, where Shift+Enter breaks a line, as in its composer), leaves on Escape, sends nothing for a text left as it was, refuses an empty one, says why a save was refused in one line, and gives the focus back to the button that opened it, unless the caller has put it elsewhere, as the chat does to its composer. CommentForm only posts a comment or a reply now; ChatEditBox keeps only what is the chat's, scrolling itself into the list's view.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -13,7 +13,7 @@ msgstr ""
|
||||
"Language-Team: \n"
|
||||
"Plural-Forms: \n"
|
||||
|
||||
#: src/components/comment/CommentNode.tsx:140
|
||||
#: src/components/comment/CommentNode.tsx:137
|
||||
msgid "[deleted]"
|
||||
msgstr "[deleted]"
|
||||
|
||||
@@ -471,11 +471,10 @@ msgstr "Can't sign in there"
|
||||
|
||||
#: src/components/category/CategoryManager.tsx:241
|
||||
#: src/components/category/CategoryManager.tsx:242
|
||||
#: src/components/chat/ChatEditBox.tsx:92
|
||||
#: src/components/comment/CommentForm.tsx:127
|
||||
#: src/components/comment/CommentForm.tsx:125
|
||||
#: src/components/dump/create/DumpCreateModal.tsx:746
|
||||
#: src/components/form/FormActions.tsx:42
|
||||
#: src/components/form/InlineEdit.tsx:277
|
||||
#: src/components/form/InlineEdit.tsx:318
|
||||
#: src/components/playlist/PlaylistEditForm.tsx:222
|
||||
#: src/components/shared/ConfirmModal.tsx:63
|
||||
#: src/pages/Authorize.tsx:158
|
||||
@@ -694,9 +693,9 @@ msgstr "Default tab"
|
||||
#: src/components/category/CategoryManager.tsx:253
|
||||
#: src/components/chat/ChatMessageItem.tsx:118
|
||||
#: src/components/chat/ChatMessageItem.tsx:119
|
||||
#: src/components/chat/ChatMessageItem.tsx:220
|
||||
#: src/components/chat/ChatMessageItem.tsx:217
|
||||
#: src/components/comment/CommentNode.tsx:259
|
||||
#: src/components/comment/CommentNode.tsx:265
|
||||
#: src/components/comment/CommentNode.tsx:271
|
||||
#: src/components/form/DeleteButton.tsx:36
|
||||
#: src/components/shared/ConfirmModal.tsx:34
|
||||
msgid "Delete"
|
||||
@@ -728,7 +727,7 @@ msgstr "Delete failed ({0})"
|
||||
msgid "Delete playlist"
|
||||
msgstr "Delete playlist"
|
||||
|
||||
#: src/components/comment/CommentNode.tsx:270
|
||||
#: src/components/comment/CommentNode.tsx:264
|
||||
msgid "Delete this comment?"
|
||||
msgstr "Delete this comment?"
|
||||
|
||||
@@ -736,7 +735,7 @@ msgstr "Delete this comment?"
|
||||
msgid "Delete this dump? This cannot be undone."
|
||||
msgstr "Delete this dump? This cannot be undone."
|
||||
|
||||
#: src/components/chat/ChatMessageItem.tsx:219
|
||||
#: src/components/chat/ChatMessageItem.tsx:216
|
||||
msgid "Delete this message?"
|
||||
msgstr "Delete this message?"
|
||||
|
||||
@@ -829,7 +828,7 @@ msgstr "Earlier"
|
||||
#: src/components/chat/ChatMessageItem.tsx:107
|
||||
#: src/components/chat/ChatMessageItem.tsx:108
|
||||
#: src/components/chat/PendingItem.tsx:93
|
||||
#: src/components/comment/CommentNode.tsx:256
|
||||
#: src/components/comment/CommentNode.tsx:250
|
||||
#: src/components/playlist/PlaylistHeader.tsx:104
|
||||
#: src/pages/Dump.tsx:556
|
||||
msgid "Edit"
|
||||
@@ -867,7 +866,7 @@ msgstr "edited"
|
||||
#. placeholder {0}: relativeTime(dump.updatedAt)
|
||||
#. placeholder {0}: relativeTime(message.updatedAt)
|
||||
#: src/components/chat/ChatMessageItem.tsx:132
|
||||
#: src/components/comment/CommentNode.tsx:205
|
||||
#: src/components/comment/CommentNode.tsx:202
|
||||
#: src/components/playlist/PlaylistHeader.tsx:158
|
||||
#: src/pages/Dump.tsx:492
|
||||
msgid "edited {0}"
|
||||
@@ -877,7 +876,7 @@ msgstr "edited {0}"
|
||||
#. placeholder {0}: dump.updatedAt.toLocaleString()
|
||||
#. placeholder {0}: message.updatedAt.toLocaleString()
|
||||
#: src/components/chat/ChatMessageItem.tsx:128
|
||||
#: src/components/comment/CommentNode.tsx:203
|
||||
#: src/components/comment/CommentNode.tsx:200
|
||||
#: src/components/playlist/PlaylistHeader.tsx:156
|
||||
#: src/pages/Dump.tsx:490
|
||||
msgid "Edited {0}"
|
||||
@@ -938,7 +937,7 @@ msgstr "Failed to post"
|
||||
msgid "Failed to post comment"
|
||||
msgstr "Failed to post comment"
|
||||
|
||||
#: src/components/comment/CommentNode.tsx:291
|
||||
#: src/components/comment/CommentNode.tsx:285
|
||||
msgid "Failed to post reply"
|
||||
msgstr "Failed to post reply"
|
||||
|
||||
@@ -952,10 +951,6 @@ msgstr "Failed to save"
|
||||
msgid "Failed to save category"
|
||||
msgstr "Failed to save category"
|
||||
|
||||
#: src/components/comment/CommentNode.tsx:218
|
||||
msgid "Failed to save edit"
|
||||
msgstr "Failed to save edit"
|
||||
|
||||
#: src/components/profile/ProfileHeader.tsx:174
|
||||
msgid "Failed to update avatar"
|
||||
msgstr "Failed to update avatar"
|
||||
@@ -1538,11 +1533,11 @@ msgstr "Playlists"
|
||||
msgid "Post comment"
|
||||
msgstr "Post comment"
|
||||
|
||||
#: src/components/comment/CommentNode.tsx:289
|
||||
#: src/components/comment/CommentNode.tsx:283
|
||||
msgid "Post reply"
|
||||
msgstr "Post reply"
|
||||
|
||||
#: src/components/comment/CommentNode.tsx:290
|
||||
#: src/components/comment/CommentNode.tsx:284
|
||||
#: src/components/comment/CommentThread.tsx:100
|
||||
#: src/components/dump/create/DumpCreateModal.tsx:752
|
||||
msgid "Posting…"
|
||||
@@ -1640,7 +1635,7 @@ msgstr "Replace file"
|
||||
|
||||
#: src/components/chat/ChatMessageItem.tsx:97
|
||||
#: src/components/chat/ChatMessageItem.tsx:98
|
||||
#: src/components/comment/CommentNode.tsx:244
|
||||
#: src/components/comment/CommentNode.tsx:240
|
||||
msgid "Reply"
|
||||
msgstr "Reply"
|
||||
|
||||
@@ -1697,16 +1692,13 @@ msgid "Role"
|
||||
msgstr "Role"
|
||||
|
||||
#: src/components/category/CategoryManager.tsx:232
|
||||
#: src/components/chat/ChatEditBox.tsx:85
|
||||
#: src/components/comment/CommentNode.tsx:216
|
||||
#: src/components/form/InlineEdit.tsx:269
|
||||
#: src/components/form/InlineEdit.tsx:310
|
||||
#: src/components/playlist/PlaylistEditForm.tsx:229
|
||||
#: src/pages/DumpEdit.tsx:564
|
||||
msgid "Save"
|
||||
msgstr "Save"
|
||||
|
||||
#: src/components/comment/CommentNode.tsx:217
|
||||
#: src/components/form/InlineEdit.tsx:266
|
||||
#: src/components/form/InlineEdit.tsx:307
|
||||
#: src/components/playlist/PlaylistEditForm.tsx:226
|
||||
#: src/components/profile/ChangePasswordModal.tsx:119
|
||||
#: src/pages/ResetPassword.tsx:191
|
||||
@@ -1878,7 +1870,7 @@ msgstr "The month on {site}, {range}"
|
||||
msgid "The new order couldn't be saved. Try again."
|
||||
msgstr "The new order couldn't be saved. Try again."
|
||||
|
||||
#: src/components/comment/CommentNode.tsx:282
|
||||
#: src/components/comment/CommentNode.tsx:276
|
||||
msgid "This comment couldn't be deleted. Try again."
|
||||
msgstr "This comment couldn't be deleted. Try again."
|
||||
|
||||
@@ -2163,7 +2155,7 @@ msgstr "Why & where"
|
||||
msgid "Why?"
|
||||
msgstr "Why?"
|
||||
|
||||
#: src/components/comment/CommentNode.tsx:293
|
||||
#: src/components/comment/CommentNode.tsx:287
|
||||
msgid "Write a reply…"
|
||||
msgstr "Write a reply…"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user