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

Feat: 未読通知数を表示できるように #11982

Merged
merged 31 commits into from
Nov 1, 2023

Conversation

kakkokari-gtyih
Copy link
Contributor

@kakkokari-gtyih kakkokari-gtyih commented Oct 7, 2023

What

  • オプトインで未読通知の数を表示できるようにした
    • /api/iunreadNotificationCount を追加
    • 100件以上の通知がある場合は「99+」という表記になります(API上では正確な数を取得可能)
  • テスト通知(サーバーサイド)の動作を改善した
    • テスト通知は自動で既読がつかないように
    • テスト通知のみ、未読イベントを即時発行するように
    • テスト通知のプッシュ通知が入るように修正
  • 通知画面の動作を改善した
    • 通知ページを閉じたあとは、通知ページから既読をつける動作が発火しないように

Why

Fix #11981

Additional info (optional)

デザインは改良の余地あり(文字が小さすぎる)

image

image

image

image

image

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 Oct 7, 2023
@codecov
Copy link

codecov bot commented Oct 7, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (e85b821) 79.18% compared to head (c9c5b23) 79.01%.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #11982      +/-   ##
===========================================
- Coverage    79.18%   79.01%   -0.17%     
===========================================
  Files          944      177     -767     
  Lines       101181    23093   -78088     
  Branches      8222      493    -7729     
===========================================
- Hits         80117    18248   -61869     
+ Misses       21064     4845   -16219     

see 767 files with indirect coverage changes

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

@github-actions github-actions bot added the packages/sw and PWA ServiceWorker and PWA related issue/PR label Oct 7, 2023
@syuilo
Copy link
Member

syuilo commented Oct 23, 2023

オプトインにする必要あんまり感じないかも(常にオンで良さそう)

@syuilo
Copy link
Member

syuilo commented Oct 23, 2023

文字自体の大きさはそれで良さそうで、paddingをもうちょっと追加すればいい感じになりそう

@syuilo
Copy link
Member

syuilo commented Oct 23, 2023

同じような(もしくは全く同じ?)スタイルが5か所くらいに追加されてるからコンポーネントにするかstyle.scssにクラスとしてまとめるのがよさそう

@github-actions
Copy link
Contributor

github-actions bot commented Oct 24, 2023

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

差分はこちら
--- base
+++ head
@@ -58159,6 +58159,11 @@
             "nullable": false,
             "optional": false
           },
+          "unreadNotificationsCount": {
+            "type": "number",
+            "nullable": false,
+            "optional": false
+          },
           "mutedWords": {
             "type": "array",
             "nullable": false,
@@ -58241,6 +58246,7 @@
           "hasUnreadAntenna",
           "hasUnreadNotification",
           "hasPendingReceivedFollowRequest",
+          "unreadNotificationsCount",
           "mutedWords",
           "mutedInstances",
           "notificationRecieveConfig",

Get diff files from Workflow Page

@kakkokari-gtyih
Copy link
Contributor Author

オプトインにする必要あんまり感じないかも(常にオンで良さそう)

デフォルトONでオフにできるようにしておきます

@kakkokari-gtyih
Copy link
Contributor Author

image

@syuilo
Copy link
Member

syuilo commented Nov 1, 2023

navbar-for-mobileとかで _indicateCounter を使っていないのは理由ある?

@syuilo
Copy link
Member

syuilo commented Nov 1, 2023

_indicateCounter にしても問題なさそうだったから _indicateCounter にした

@syuilo syuilo merged commit 5fb6847 into misskey-dev:develop Nov 1, 2023
18 checks passed
@syuilo
Copy link
Member

syuilo commented Nov 1, 2023

👍🏻

kanarikanaru pushed a commit to kanarikanaru/misskey that referenced this pull request Nov 9, 2023
* 未読通知数を表示できるように

* Update Changelog

* オプトインにする

* Fix lint

* (add) テスト通知のプッシュ通知を追加

* add test

* フロントエンドの表示上限を99に変更

* Make it default on

* 共通スタイルをくくりだす

* Update Changelog

* tweak

* Update UserEntityService.ts

* rename

* Update navbar-for-mobile.vue

---------

Co-authored-by: syuilo <[email protected]>
# Conflicts:
#	CHANGELOG.md
#	packages/misskey-js/etc/misskey-js.api.md
@kakkokari-gtyih kakkokari-gtyih deleted the unread-notif-count branch December 8, 2023 06:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
packages/backend:test packages/backend Server side specific issue/PR packages/frontend Client side specific issue/PR packages/misskey-js packages/sw and PWA ServiceWorker and PWA related issue/PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

未読の通知の数を表示できるようにする
2 participants