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: ノート詳細ページでリプライ一覧と引用一覧を別々に表示するように #13006

Open
wants to merge 23 commits into
base: develop
Choose a base branch
from

Conversation

GrapeApple0
Copy link
Contributor

What

ノート詳細ページでリプライ一覧と引用一覧を別々に表示するようにしました
screenshot 1028

Why

fix: #12116

Additional info (optional)

related: https://misskey.04.si/notes/9oij2d26dn (notes/repliesを使うようにし、paginationを使うようにしたため)

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 Jan 15, 2024
Copy link
Contributor

github-actions bot commented Jan 15, 2024

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

差分はこちら
--- base
+++ head
@@ -56007,6 +56007,174 @@
         }
       }
     },
+    "/notes/quotes": {
+      "post": {
+        "operationId": "notes___quotes",
+        "summary": "notes/quotes",
+        "description": "No description provided.\n\n**Credential required**: *No*",
+        "externalDocs": {
+          "description": "Source code",
+          "url": "https://github.com/misskey-dev/misskey/blob/develop/packages/backend/src/server/api/endpoints/notes/quotes.ts"
+        },
+        "tags": [
+          "notes"
+        ],
+        "requestBody": {
+          "required": true,
+          "content": {
+            "application/json": {
+              "schema": {
+                "type": "object",
+                "properties": {
+                  "noteId": {
+                    "type": "string",
+                    "format": "misskey:id"
+                  },
+                  "sinceId": {
+                    "type": "string",
+                    "format": "misskey:id"
+                  },
+                  "untilId": {
+                    "type": "string",
+                    "format": "misskey:id"
+                  },
+                  "limit": {
+                    "type": "integer",
+                    "minimum": 1,
+                    "maximum": 100,
+                    "default": 10
+                  }
+                },
+                "required": [
+                  "noteId"
+                ]
+              }
+            }
+          }
+        },
+        "responses": {
+          "200": {
+            "description": "OK (with results)",
+            "content": {
+              "application/json": {
+                "schema": {
+                  "type": "array",
+                  "items": {
+                    "type": "object",
+                    "$ref": "#/components/schemas/Note"
+                  }
+                }
+              }
+            }
+          },
+          "400": {
+            "description": "Client error",
+            "content": {
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                },
+                "examples": {
+                  "INVALID_PARAM": {
+                    "value": {
+                      "error": {
+                        "message": "Invalid param.",
+                        "code": "INVALID_PARAM",
+                        "id": "3d81ceae-475f-4600-b2a8-2bc116157532"
+                      }
+                    }
+                  }
+                }
+              }
+            }
+          },
+          "401": {
+            "description": "Authentication error",
+            "content": {
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                },
+                "examples": {
+                  "CREDENTIAL_REQUIRED": {
+                    "value": {
+                      "error": {
+                        "message": "Credential required.",
+                        "code": "CREDENTIAL_REQUIRED",
+                        "id": "1384574d-a912-4b81-8601-c7b1c4085df1"
+                      }
+                    }
+                  }
+                }
+              }
+            }
+          },
+          "403": {
+            "description": "Forbidden error",
+            "content": {
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                },
+                "examples": {
+                  "AUTHENTICATION_FAILED": {
+                    "value": {
+                      "error": {
+                        "message": "Authentication failed. Please ensure your token is correct.",
+                        "code": "AUTHENTICATION_FAILED",
+                        "id": "b0a7f5f8-dc2f-4171-b91f-de88ad238e14"
+                      }
+                    }
+                  }
+                }
+              }
+            }
+          },
+          "418": {
+            "description": "I'm Ai",
+            "content": {
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                },
+                "examples": {
+                  "I_AM_AI": {
+                    "value": {
+                      "error": {
+                        "message": "You sent a request to Ai-chan, Misskey's showgirl, instead of the server.",
+                        "code": "I_AM_AI",
+                        "id": "60c46cd1-f23a-46b1-bebe-5d2b73951a84"
+                      }
+                    }
+                  }
+                }
+              }
+            }
+          },
+          "500": {
+            "description": "Internal server error",
+            "content": {
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                },
+                "examples": {
+                  "INTERNAL_ERROR": {
+                    "value": {
+                      "error": {
+                        "message": "Internal error occurred. Please contact us if the error persists.",
+                        "code": "INTERNAL_ERROR",
+                        "id": "5d37dbcb-891e-41ca-a3d6-e690c97775ac"
+                      }
+                    }
+                  }
+                }
+              }
+            }
+          }
+        }
+      }
+    },
     "/notes/reactions": {
       "get": {
         "operationId": "notes___reactions",

Get diff files from Workflow Page

Copy link

codecov bot commented Jan 15, 2024

Codecov Report

Attention: Patch coverage is 62.10526% with 36 lines in your changes missing coverage. Please review.

Project coverage is 66.24%. Comparing base (8f833d7) to head (ea65162).

Files Patch % Lines
...s/backend/src/server/api/endpoints/notes/quotes.ts 53.84% 36 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #13006      +/-   ##
===========================================
+ Coverage    65.01%   66.24%   +1.22%     
===========================================
  Files          989      993       +4     
  Lines       112995   117640    +4645     
  Branches      5790     5837      +47     
===========================================
+ Hits         73460    77926    +4466     
- Misses       38093    39683    +1590     
+ Partials      1442       31    -1411     

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

Comment on lines 149 to 155
<div v-if="tab === 'replies'" :class="$style.tab_replies">
<MkPagination :pagination="repliesPagination" :disableAutoLoad="true">
<template #default="{ items }">
<MkNoteSub v-for="item in items" :key="item.id" :note="item" :class="$style.reply" :detail="true"/>
</template>
</MkPagination>
</div>
Copy link
Contributor

Choose a reason for hiding this comment

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

返信が勝手にfetchされるのを防ぎたいので「返信を見る」ボタンは残してほしい(引用RNのほうも同様)

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
Member

Choose a reason for hiding this comment

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

利用者的には面倒だろうけど、運営者的には自動ロードされるとちょっと困りそう

Copy link
Contributor

Choose a reason for hiding this comment

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

返信タブのもともとの挙動にあわせるのがよさそう

Copy link
Contributor

Choose a reason for hiding this comment

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

初期ロードのノート数を少なくした上で初回のロードだけは自動にするか

@kakkokari-gtyih
Copy link
Contributor

kakkokari-gtyih commented Jan 22, 2024

@GrapeApple0 レビューしました🙏🙏

@kakkokari-gtyih
Copy link
Contributor

返信が勝手にfetchされるのを防ぎたいので「返信を見る」ボタンは残してほしい(引用RNのほうも同様)

これやったらマージ可能

@kakkokari-gtyih
Copy link
Contributor

返信が勝手にfetchされるのを防ぎたいので「返信を見る」ボタンは残してほしい(引用RNのほうも同様)

これやったらマージ可能

やるか

@tai-cha
Copy link
Member

tai-cha commented Feb 6, 2024

リノートと引用が近いものだと思っているから隣接していて欲しい気持ちがややある(けどこれはもはや好みの問題かも)

@kakkokari-gtyih
Copy link
Contributor

リノートと引用が近いものだと思っているから隣接していて欲しい気持ちがややある(けどこれはもはや好みの問題かも)

そうする

@kakkokari-gtyih
Copy link
Contributor

kakkokari-gtyih commented Feb 6, 2024

デザインと挙動を修正したので概ね大丈夫かも

  • リプライ・引用はデフォルトで3つ読み込まれる
  • 引用はリノートの横に持ってきた
  • 枠線とパディングを修正した
  • 狭小画面でタブが折り返すのを修正した

@kakkokari-gtyih
Copy link
Contributor

image

@syuilo
Copy link
Member

syuilo commented Feb 6, 2024

リプライ・引用はデフォルトで3つ読み込まれる

うーむ

@syuilo
Copy link
Member

syuilo commented Feb 6, 2024

今それらってGET対応してたっけ

@kakkokari-gtyih
Copy link
Contributor

してないはず

@kakkokari-gtyih
Copy link
Contributor

リプライ・引用はデフォルトで3つ読み込まれる

うーむ

MkNoteSubは階層を辿って全部読み込んじゃうのか

@kakkokari-gtyih
Copy link
Contributor

返信が勝手にfetchされるのを防ぎたいので「返信を見る」ボタンは残してほしい(引用RNのほうも同様)

結局これにした

@kakkokari-gtyih
Copy link
Contributor

コンフリクト解消

@kakkokari-gtyih
Copy link
Contributor

コンフリクト解消

@kakkokari-gtyih
Copy link
Contributor

コンフリクト解消

@kakkokari-gtyih
Copy link
Contributor

👀

@kakkokari-gtyih
Copy link
Contributor

コンフリクト解消

@kakkokari-gtyih kakkokari-gtyih requested review from syuilo and removed request for syuilo May 6, 2024 07:26
@GrapeApple0 GrapeApple0 closed this May 6, 2024
@kakkokari-gtyih
Copy link
Contributor

kakkokari-gtyih commented May 6, 2024

@GrapeApple0 どうされました?

@tamaina tamaina reopened this May 6, 2024
@kakkokari-gtyih
Copy link
Contributor

コンフリクト解消:angry_ai::angry_ai::angry_ai:

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.

返信と引用RNを分けて表示(ノート詳細ページ)
5 participants