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 26 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
@@ -57740,6 +57740,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 38.56209% with 94 lines in your changes missing coverage. Please review.

Project coverage is 41.50%. Comparing base (5d03efa) to head (bd8ac59).

Files Patch % Lines
...ackages/frontend/src/components/MkNoteDetailed.vue 0.00% 58 Missing ⚠️
...s/backend/src/server/api/endpoints/notes/quotes.ts 53.84% 36 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #13006      +/-   ##
===========================================
+ Coverage    40.12%   41.50%   +1.37%     
===========================================
  Files         1517     1521       +4     
  Lines       187210   192010    +4800     
  Branches      3468     3500      +32     
===========================================
+ Hits         75118    79693    +4575     
- Misses      111523   111747     +224     
- Partials       569      570       +1     

☔ 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

@kakkokari-gtyih kakkokari-gtyih Jan 15, 2024

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つ読み込まれる

うーむ

@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:

@syuilo
Copy link
Member

syuilo commented Jun 16, 2024

/preview

@syuilo
Copy link
Member

syuilo commented Jun 16, 2024

タブがスクロールできることが分からないわね
IMG_7366

@kakkokari-gtyih
Copy link
Contributor

kakkokari-gtyih commented Jun 16, 2024

タブがスクロールできることが分からないわね

それどうにかしようと思っていたけど他コンポーネントでも同じような事態になっているところがあって設計にもう少し検討を要する可能性があったので一旦見送ってる

@kakkokari-gtyih
Copy link
Contributor

これでいけそうだな
https://mkasumi.com/scrolling-hints-by-css.html

@syuilo
Copy link
Member

syuilo commented Jun 16, 2024

影に頼るデザインはダークモードと相性が悪い可能性があるわね

@kakkokari-gtyih
Copy link
Contributor

影に頼るデザインはダークモードと相性が悪い可能性があるわね

そうでもなさそう?(影の幅を大きくしてlinear-gradient的に使用すれば)

image

@syuilo
Copy link
Member

syuilo commented Jun 16, 2024

ヘッダーとかでも同様の問題あるし幅が足りない場合▼とか...で省略するコンポーネント欲しいわね

@kakkokari-gtyih
Copy link
Contributor

ヘッダーとかでも同様の問題あるし幅が足りない場合▼とか...で省略するコンポーネント欲しいわね

これ具体的にどういうUIかしら

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