fix(editor): limit at members list length (#12529)

Closes: BS-3009

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit

- **New Features**
  - The mention members menu now displays up to three members, with a localized hint indicating the number of additional hidden members.
- **Localization**
  - Added a new translation key for the overflow members hint in the English language pack.
- **Chores**
  - Updated translation completeness statistics for the "es-CL" locale.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
Saul-Mirone
2025-05-26 08:37:32 +00:00
parent 0e8f19b92c
commit 051dc4296d
4 changed files with 16 additions and 1 deletions

View File

@@ -594,6 +594,14 @@ export class AtMenuConfigService extends Service {
items,
loading: this.memberSearchService.isLoading$.signal,
hidden,
maxDisplay: 3,
overflowText: computed(() => {
const totalCount = this.memberSearchService.result$.signal.value.length;
const remainingCount = totalCount - 3;
return I18n.t('com.affine.editor.at-menu.more-members-hint', {
count: remainingCount,
});
}),
};
}

View File

@@ -6,7 +6,7 @@
"el-GR": 94,
"en": 100,
"es-AR": 94,
"es-CL": 96,
"es-CL": 95,
"es": 94,
"fa": 94,
"fr": 94,

View File

@@ -7418,6 +7418,12 @@ export function useAFFiNEI18N(): {
["com.affine.editor.at-menu.more-docs-hint"](options: {
readonly count: string;
}): string;
/**
* `{{count}} more members`
*/
["com.affine.editor.at-menu.more-members-hint"](options: {
readonly count: string;
}): string;
/**
* `Journal`
*/

View File

@@ -1844,6 +1844,7 @@
"com.affine.editor.at-menu.create-edgeless": "New \"{{name}}\" edgeless",
"com.affine.editor.at-menu.import": "Import",
"com.affine.editor.at-menu.more-docs-hint": "{{count}} more docs",
"com.affine.editor.at-menu.more-members-hint": "{{count}} more members",
"com.affine.editor.at-menu.journal": "Journal",
"com.affine.editor.at-menu.date-picker": "Select a specific date",
"com.affine.editor.at-menu.mention-members": "Mention Members",