Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enhance(frontend): リアクションの総数を表示するように #13532

Merged
merged 3 commits into from
Mar 6, 2024

Conversation

kakkokari-gtyih
Copy link
Contributor

@kakkokari-gtyih kakkokari-gtyih commented Mar 6, 2024

What

  • リアクションの総数を+-ボタンの横に表示するように
    • リアクションの総数を出力するプロパティ reactionCount が生えました
  • リアクションしたらボタンに色がつくように(マイナス1と読めてしまう問題があるので色で区別)
  • リアクション受け入れが「いいねのみ」の場合は絵文字一覧のUIを表示しないように
  • リアクション受け入れが「いいねのみ」の場合はグルーピング時のリアクション表示を「いいね」に置き換えるように

image

image

image

Why

#13212

Additional info (optional)

Checklist

  • 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

@github-actions github-actions bot added packages/frontend Client side specific issue/PR packages/backend Server side specific issue/PR packages/misskey-js labels Mar 6, 2024
Copy link
Contributor

github-actions bot commented Mar 6, 2024

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

差分はこちら
--- base
+++ head
@@ -75638,6 +75638,9 @@
               ]
             }
           },
+          "reactionCount": {
+            "type": "number"
+          },
           "renoteCount": {
             "type": "number"
           },
@@ -75676,6 +75679,7 @@
           "reactionAcceptance",
           "reactionEmojis",
           "reactions",
+          "reactionCount",
           "renoteCount",
           "repliesCount"
         ]

Get diff files from Workflow Page

Copy link

codecov bot commented Mar 6, 2024

Codecov Report

Attention: Patch coverage is 87.50000% with 3 lines in your changes are missing coverage. Please review.

Project coverage is 66.07%. Comparing base (08d618b) to head (c26534d).
Report is 3 commits behind head on develop.

Files Patch % Lines
packages/frontend/src/scripts/use-note-capture.ts 0.00% 2 Missing ⚠️
...ges/backend/src/core/entities/NoteEntityService.ts 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #13532      +/-   ##
===========================================
+ Coverage    64.69%   66.07%   +1.37%     
===========================================
  Files          986      989       +3     
  Lines       110809   115383    +4574     
  Branches      5692     5723      +31     
===========================================
+ Hits         71691    76234    +4543     
- Misses       37682    37715      +33     
+ Partials      1436     1434       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@syuilo
Copy link
Member

syuilo commented Mar 6, 2024

リアクションの総数ってクライアントからは取れなかったっけ

@kakkokari-gtyih
Copy link
Contributor Author

計算したら出せるとはおもう(APIでは取れなかったはず)

Comment on lines 120 to 121
<i v-if="appearNote.reactionAcceptance === 'likeOnly' && appearNote.myReaction != null" class="ti ti-heart-filled" style="color: var(--eventReactionHeart);"></i>
<i v-else-if="appearNote.myReaction != null" class="ti ti-minus" style="color: var(--eventReaction);"></i>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

色はaccentで統一する方が良さそう

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ハートが緑になるのはおかしいのでそっちはそのままでいい気がする

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ハートはそのまま、リアクション選択時の色はaccentにした

@tai-cha
Copy link
Contributor

tai-cha commented Mar 6, 2024

#13212 はrelatedだけど解決できるものではなさそう(閲覧するユーザー側でリアクション数だけを表示したいという要望なはず)
Fixをつけてしまうとcloseしてしまう

@syuilo syuilo merged commit 7ead98c into misskey-dev:develop Mar 6, 2024
24 of 26 checks passed
@syuilo
Copy link
Member

syuilo commented Mar 6, 2024

👍🏻

@kakkokari-gtyih kakkokari-gtyih deleted the enh-13212 branch March 6, 2024 12:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
packages/backend Server side specific issue/PR packages/frontend Client side specific issue/PR packages/misskey-js
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants