Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .changeset/20558-comment-reactions-mentions-description.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
'@objectstack/plugin-audit': patch
---

`sys_comment.reactions` and `sys_comment.mentions` now describe the shape they actually store (#20558)

The two field descriptions are served metadata (field help in the console, and what an AI client reads before it seeds a comment), and both named a shape no producer writes:

| Field | Description was | Description is now | Stored value |
| --- | --- | --- | --- |
| `reactions` | `JSON array of emoji reaction objects` | `JSON object mapping each emoji to the list of user ids who reacted` | `{"👍":["usr_1","usr_2"]}` |
| `mentions` | `JSON array of @mention objects` | `JSON array of the user ids @mentioned in the comment` | `["usr_1","usr_2"]` |

The console's record discussion panel reads and writes `reactions` as that map, and writes `mentions` as that list of ids; the `collab.mention` notification hook reads the ids.

Description text only: no stored value, validation rule or hook changes, and nothing to migrate. The English translation bundle is regenerated from the source description, and the zh-CN, ja-JP and es-ES help texts for both fields are rewritten to match (values only, no key added or dropped).
Original file line number Diff line number Diff line change
Expand Up @@ -118,14 +118,14 @@ export const SysComment = ObjectSchema.create({
mentions: Field.textarea({
label: 'Mentions',
required: false,
description: 'JSON array of @mention objects',
description: 'JSON array of the user ids @mentioned in the comment',
group: 'Body',
}),

reactions: Field.textarea({
label: 'Reactions',
required: false,
description: 'JSON array of emoji reaction objects',
description: 'JSON object mapping each emoji to the list of user ids who reacted',
group: 'Body',
}),

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -215,11 +215,11 @@ export const enObjects: NonNullable<TranslationData['objects']> = {
},
mentions: {
label: "Mentions",
help: "JSON array of @mention objects"
help: "JSON array of the user ids @mentioned in the comment"
},
reactions: {
label: "Reactions",
help: "JSON array of emoji reaction objects"
help: "JSON object mapping each emoji to the list of user ids who reacted"
},
is_edited: {
label: "Edited"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -215,11 +215,11 @@ export const esESObjects: NonNullable<TranslationData['objects']> = {
},
mentions: {
label: "Menciones",
help: "Matriz JSON de objetos @mention."
help: "Matriz JSON de los id de usuario mencionados con @ en el comentario."
},
reactions: {
label: "Reacciones",
help: "Matriz JSON de objetos de reacción emoji."
help: "Objeto JSON que asigna cada emoji a la lista de id de usuario de quienes reaccionaron."
},
is_edited: {
label: "Editado"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -215,11 +215,11 @@ export const jaJPObjects: NonNullable<TranslationData['objects']> = {
},
mentions: {
label: "メンション",
help: "@メンションオブジェクトの JSON 配列"
help: "コメント内で @メンションされたユーザー ID の JSON 配列"
},
reactions: {
label: "リアクション",
help: "絵文字リアクションオブジェクトの JSON 配列"
help: "各絵文字を、リアクションしたユーザー ID のリストに対応付ける JSON オブジェクト"
},
is_edited: {
label: "編集済み"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -215,11 +215,11 @@ export const zhCNObjects: NonNullable<TranslationData['objects']> = {
},
mentions: {
label: "提及",
help: "@mention 对象的 JSON 数组"
help: "评论中被 @ 提及的用户 ID 的 JSON 数组"
},
reactions: {
label: "回应",
help: "表情回应对象的 JSON 数组"
help: "将每个表情映射到对其做出回应的用户 ID 列表的 JSON 对象"
},
is_edited: {
label: "已编辑"
Expand Down
Loading