misskey icon indicating copy to clipboard operation
misskey copied to clipboard

enhance: 人気のユーザー一覧の降順にpvを使えるように

Open kakkokari-gtyih opened this issue 1 year ago • 6 comments

What

  • 人気のユーザーの算出にチャートのpvを使えるように
    (Cherry-picked from io)
  • サーバー規模に応じて人気のユーザーの算出方式を選べるように
  • 人気のユーザーの項目自体を出さないという選択肢も追加

Why

Fix #14194

Additional info (optional)

Checklist

  • [x] Read the contribution guide
  • [ ] Test working in a local environment
  • [ ] (If needed) Add story of storybook
  • [ ] (If needed) Update CHANGELOG.md
  • [ ] (If possible) Add tests

kakkokari-gtyih avatar Jul 13 '24 13:07 kakkokari-gtyih

ミスった

kakkokari-gtyih avatar Jul 13 '24 13:07 kakkokari-gtyih

Codecov Report

Attention: Patch coverage is 35.59322% with 76 lines in your changes missing coverage. Please review.

Project coverage is 47.92%. Comparing base (e98252a) to head (8f74212). Report is 481 commits behind head on develop.

Files with missing lines Patch % Lines
...kages/backend/src/core/chart/charts/per-user-pv.ts 10.34% 26 Missing :warning:
packages/backend/src/server/api/endpoints/users.ts 11.11% 24 Missing :warning:
packages/frontend/src/pages/admin/settings.vue 0.00% 15 Missing :warning:
...kend/src/server/api/endpoints/admin/update-meta.ts 50.00% 4 Missing :warning:
packages/frontend/src/pages/explore.users.vue 0.00% 4 Missing :warning:
...ges/backend/src/core/entities/MetaEntityService.ts 0.00% 1 Missing :warning:
...ges/backend/src/server/api/endpoints/admin/meta.ts 83.33% 1 Missing :warning:
...ontend/src/components/MkUserSetupDialog.Follow.vue 0.00% 1 Missing :warning:
Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #14196      +/-   ##
===========================================
+ Coverage    42.56%   47.92%   +5.35%     
===========================================
  Files         1685     1758      +73     
  Lines       170650   186795   +16145     
  Branches      4223     5391    +1168     
===========================================
+ Hits         72643    89525   +16882     
+ Misses       97546    97226     -320     
+ Partials       461       44     -417     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

codecov[bot] avatar Jul 13 '24 13:07 codecov[bot]

このPRによるapi.jsonの差分

差分はこちら
--- base
+++ head
@@ -10057,6 +10057,14 @@
                         ]
                       }
                     },
+                    "preferPopularUserFactor": {
+                      "type": "string",
+                      "enum": [
+                        "follower",
+                        "pv",
+                        "none"
+                      ]
+                    },
                     "singleUserMode": {
                       "type": "boolean"
                     },
@@ -10194,6 +10202,7 @@
                     "federation",
                     "federationHosts",
                     "deliverSuspendedSoftware",
+                    "preferPopularUserFactor",
                     "singleUserMode",
                     "ugcVisibilityForVisitor",
                     "proxyRemoteFiles",
@@ -19102,6 +19111,14 @@
                       ]
                     }
                   },
+                  "preferPopularUserFactor": {
+                    "type": "string",
+                    "enum": [
+                      "follower",
+                      "pv",
+                      "none"
+                    ]
+                  },
                   "singleUserMode": {
                     "type": "boolean"
                   },
@@ -80095,7 +80112,9 @@
                       "+createdAt",
                       "-createdAt",
                       "+updatedAt",
-                      "-updatedAt"
+                      "-updatedAt",
+                      "+pv",
+                      "-pv"
                     ]
                   },
                   "state": {
@@ -91907,6 +91926,14 @@
           "enableUrlPreview": {
             "type": "boolean"
           },
+          "preferPopularUserFactor": {
+            "type": "string",
+            "enum": [
+              "follower",
+              "pv",
+              "none"
+            ]
+          },
           "backgroundImageUrl": {
             "type": [
               "string",
@@ -92016,6 +92043,7 @@
           "sentryForFrontend",
           "mediaProxy",
           "enableUrlPreview",
+          "preferPopularUserFactor",
           "backgroundImageUrl",
           "impressumUrl",
           "logoImageUrl",

Get diff files from Workflow Page

github-actions[bot] avatar Jul 13 '24 13:07 github-actions[bot]

PVが人気度の指標として適当なのか良く分からんわね

syuilo avatar Jul 16 '24 05:07 syuilo

PVが人気度の指標として適当なのか良く分からんわね

サーバーの規模が大きいなら、人気のユーザーセクションに載る人が固定されてしまうのを避けながら注目しているユーザーを表示できると思う

サーバー内の人数が少なかったりするとpvはアテにならない可能性があるのでフォロワー数のほうが人気量を表すのに適しているかもしれないけど、サーバーの規模が大きいとフォロワー数が大きい人が固定されてしまうのでそれはそれでどうなのという話 (なので切り替えられるようにしてある)

kakkokari-gtyih avatar Jul 16 '24 05:07 kakkokari-gtyih

人気ユーザーのページをオフにできるのちょっと嬉しい

fruitriin avatar Jul 16 '24 05:07 fruitriin

コンフリクト解消

kakkokari-gtyih avatar Jul 20 '25 04:07 kakkokari-gtyih