feat: 公開ロールの表示設定を追加#17643
Draft
mattyatea wants to merge 29 commits into
Draft
Conversation
…n-setting # Conflicts: # CHANGELOG.md
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## develop #17643 +/- ##
============================================
+ Coverage 15.01% 25.27% +10.25%
============================================
Files 247 1163 +916
Lines 12395 39995 +27600
Branches 4217 11133 +6916
============================================
+ Hits 1861 10107 +8246
- Misses 8244 23943 +15699
- Partials 2290 5945 +3655 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Contributor
📦 Frontend Bundle ReportChunk size diff (63 updated, 1 added, 0 removed)
Startup chunk size (5 updated, 0 added, 0 removed)
Startup chunks are the Vite entry for Bundle Stats
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Contributor
|
このPRによるapi.jsonの差分 差分はこちら--- base
+++ head
@@ -14114,6 +14114,10 @@
"isPublic": {
"type": "boolean"
},
+ "isPublicDisplayRequired": {
+ "type": "boolean",
+ "default": false
+ },
"isModerator": {
"type": "boolean"
},
@@ -14986,6 +14990,9 @@
"isPublic": {
"type": "boolean"
},
+ "isPublicDisplayRequired": {
+ "type": "boolean"
+ },
"isModerator": {
"type": "boolean"
},
@@ -62596,6 +62603,15 @@
"none"
]
},
+ "hiddenRoleIds": {
+ "type": "array",
+ "maxItems": 256,
+ "uniqueItems": true,
+ "items": {
+ "type": "string",
+ "format": "misskey:id"
+ }
+ },
"pinnedPageId": {
"type": [
"string",
@@ -88539,6 +88555,10 @@
"items": {
"type": "object",
"properties": {
+ "id": {
+ "type": "string",
+ "format": "id"
+ },
"name": {
"type": "string"
},
@@ -88553,6 +88573,7 @@
}
},
"required": [
+ "id",
"name",
"iconUrl",
"displayOrder"
@@ -88929,6 +88950,13 @@
"isDeleted": {
"type": "boolean"
},
+ "hiddenRoleIds": {
+ "type": "array",
+ "items": {
+ "type": "string",
+ "format": "id"
+ }
+ },
"twoFactorBackupCodesStock": {
"type": "string",
"enum": [
@@ -89946,6 +89974,7 @@
"preventAiLearning",
"isExplorable",
"isDeleted",
+ "hiddenRoleIds",
"twoFactorBackupCodesStock",
"hideOnlineStatus",
"hasUnreadSpecifiedNotes",
@@ -93472,6 +93501,14 @@
"type": "boolean",
"example": false
},
+ "asBadge": {
+ "type": "boolean",
+ "example": false
+ },
+ "isPublicDisplayRequired": {
+ "type": "boolean",
+ "example": false
+ },
"displayOrder": {
"type": "integer",
"example": 0
@@ -93485,6 +93522,8 @@
"description",
"isModerator",
"isAdministrator",
+ "asBadge",
+ "isPublicDisplayRequired",
"displayOrder"
]
},
@@ -93519,6 +93558,10 @@
"type": "boolean",
"example": false
},
+ "isPublicDisplayRequired": {
+ "type": "boolean",
+ "example": false
+ },
"isExplorable": {
"type": "boolean",
"example": false
@@ -93573,6 +93616,7 @@
"target",
"condFormula",
"isPublic",
+ "isPublicDisplayRequired",
"isExplorable",
"asBadge",
"preserveAssignmentOnMoveAccount", |
Contributor
⚙️ Backend Memory Usage ReportAfter GC
V8 Heap Snapshot Statistics
Head heap snapshot composition%%{init: {"sankey":{"showValues":false,"linkColor":"target","labelStyle":"outlined","nodeAlignment":"center","nodePadding":10,"nodeColors":{"Head":"#888888","code":"#f28e2c","bytecode":"#f28e2c","Other":"#888888","strings":"#e15759","string":"#e15759","jsArrays":"#76b7b2","typedArrays":"#59a14f","systemObjects":"#edc949","otherJsObjects":"#af7aa1","array":"#af7aa1","otherNonJsObjects":"#ff9da7"}}}}%%
sankey-beta
"Head","Code",24.5
"Code","bytecode",8.09
"Code","Other",16.41
"Head","Strings",42.13
"Strings","string",41.56
"Strings","Other",0.57
"Head","JS arrays",4.06
"Head","Typed arrays",0.52
"Head","System objects",2.17
"Head","Other JS objs",26.57
"Other JS objs","array",9.74
"Other JS objs","Other",16.83
"Head","Other non-JS objs",0.04
Download representative V8 heap snapshot (head) Runtime Loaded JS FootprintClick to show
Largest Newly Loaded Modules
|
Member
|
落ち着いたら見る |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Fixes #17366
この PR では、公開ロールとロールバッジの表示をユーザーが個別に制御できるようにします。
DB/API 変更:
user.hiddenRoleIdsを追加し、ユーザーごとの非表示ロール ID を保存しますrole.isPublicDisplayRequiredを追加し、管理者がユーザー側での非表示を禁止できるようにしますi/updateにhiddenRoleIdsを追加し、保存時に「割り当て済み」「公開」「常時表示ではない」ロールだけへ sanitize しますmisskey-jsautogen を更新しましたWhy
Issue #17366 の要望どおり、ロールバッジが多く付与されていて見た目を整理したい場合などに、ユーザー自身がプロフィールやノート上に表示する公開ロール/ロールバッジを選べるようにするためです。
一方で、運営上必ず表示したいロールもあり得るため、管理者が特定の公開ロール/ロールバッジを常時表示にできる設定も同時に追加しています。
Additional info (optional)
追加・更新した確認観点:
i/updateでhiddenRoleIdsが保存時に sanitize される e2e テストUserEntityServiceで通常閲覧者、本人、モデレーターごとの表示差分を確認する unit testCHANGELOG.mdとlocales/ja-JP.ymlを更新up/downを追加手元確認:
git diff --check origin/develop...HEADは通過しました未実行:
pnpm --filter backend test -- UserEntityServicepnpm --filter frontend test -- home.stories.implpnpm --filter backend check-migrationsこの環境の Node.js が
v24.14.0で、リポジトリの要求^22.22.2 || ^24.17.0 || ^26.4.0を満たさないため、上記 pnpm コマンドは起動前に失敗しました。Checklist