From 0abe021640508abbf5652c57b9551335000e24f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=8B=E3=81=A3=E3=81=93=E3=81=8B=E3=82=8A?= <67428053+kakkokari-gtyih@users.noreply.github.com> Date: Thu, 6 Nov 2025 09:31:55 +0900 Subject: [PATCH] =?UTF-8?q?fix(frontend):=20PageHeader=E3=81=AE=E3=82=BF?= =?UTF-8?q?=E3=82=A4=E3=83=88=E3=83=AB=E3=81=8C=E3=81=AF=E3=81=BF=E5=87=BA?= =?UTF-8?q?=E3=82=8B=E5=95=8F=E9=A1=8C=E3=82=92=E4=BF=AE=E6=AD=A3=20(#1674?= =?UTF-8?q?4)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix(frontend): PageHeaderのタイトルがはみ出る問題を修正 * Update Changelog * fix: remove duplicated scoped class to avoid confusion --- CHANGELOG.md | 1 + .../src/components/global/MkPageHeader.vue | 37 ++++++------------- 2 files changed, 13 insertions(+), 25 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 44692f5a6d..f554db1705 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ ### Client - Fix: 紙吹雪エフェクトがアニメーション設定を考慮せず常に表示される問題を修正 - Fix: ナビゲーションバーのリアルタイムモード切替ボタンの状態をよりわかりやすく表示するように +- Fix: ページのタイトルが長いとき、はみ出る問題を修正 ### Server - diff --git a/packages/frontend/src/components/global/MkPageHeader.vue b/packages/frontend/src/components/global/MkPageHeader.vue index c4adf440cb..2f6dfed221 100644 --- a/packages/frontend/src/components/global/MkPageHeader.vue +++ b/packages/frontend/src/components/global/MkPageHeader.vue @@ -9,7 +9,7 @@ SPDX-License-Identifier: AGPL-3.0-only
-
+
-
+
@@ -155,8 +155,10 @@ onUnmounted(() => { .upper { --height: 50px; + --margin: var(--MI-margin); display: flex; - gap: var(--MI-margin); + gap: var(--margin); + align-items: center; height: var(--height); .tabs:first-child { @@ -169,6 +171,7 @@ onUnmounted(() => { &.thin { --height: 40px; + --margin: 8px; > .buttons { > .button { @@ -179,12 +182,8 @@ onUnmounted(() => { &.slim { text-align: center; - gap: 0; - .tabs:first-child { - margin-left: 0; - } - > .titleContainer { + .titleContainer { margin: 0 auto; max-width: 100%; } @@ -197,7 +196,7 @@ onUnmounted(() => { } .buttons { - --margin: 8px; + flex-shrink: 0; display: flex; align-items: center; min-width: var(--height); @@ -207,16 +206,6 @@ onUnmounted(() => { } } -.buttonsLeft { - composes: buttons; - margin: 0 var(--margin) 0 0; -} - -.buttonsRight { - composes: buttons; - margin: 0 0 0 var(--margin); -} - .avatar { $size: 32px; display: inline-block; @@ -231,7 +220,7 @@ onUnmounted(() => { align-items: center; justify-content: center; height: var(--height); - width: calc(var(--height) - (var(--margin))); + width: calc(var(--height) - 8px); box-sizing: border-box; position: relative; border-radius: 5px; @@ -254,6 +243,7 @@ onUnmounted(() => { .titleContainer { display: flex; align-items: center; + min-width: 0; max-width: min(30vw, 400px); overflow: clip; white-space: nowrap; @@ -287,9 +277,6 @@ onUnmounted(() => { .title { min-width: 0; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; line-height: 1.1; }