From 8d50fe95f6cf6fc701ea019176887d0995907eef Mon Sep 17 00:00:00 2001 From: Kato Hiroki Date: Sun, 2 Nov 2025 12:24:29 +0000 Subject: [PATCH 1/4] chore(ui): Make button group responsive in task table (#2781) --- .../make-button-group-responsive/plan.md | 61 +++++++++++++++++++ .../components/TaskTables/TaskTable.svelte | 30 +++++---- 2 files changed, 78 insertions(+), 13 deletions(-) create mode 100644 docs/dev-notes/2025-11-02/make-button-group-responsive/plan.md diff --git a/docs/dev-notes/2025-11-02/make-button-group-responsive/plan.md b/docs/dev-notes/2025-11-02/make-button-group-responsive/plan.md new file mode 100644 index 000000000..5f0aaf9fb --- /dev/null +++ b/docs/dev-notes/2025-11-02/make-button-group-responsive/plan.md @@ -0,0 +1,61 @@ +# Button Group のレスポンシブ化 + +## 問題 + +640px未満の画面でボタングループの文字が縦に潰れてしまう + +## 解決方法 + +Tailwind CSSのレスポンシブクラスを使用してボタンの折り返しと配置を実装 + +## コード変更 + +### 修正前 + +```svelte + +``` + +### 修正後 + +```svelte +
+ + {#each Object.entries(contestTableProviderGroups) as [type, config]} + + {/each} + +
+``` + +## 使用クラス一覧 + +| クラス | 役割 | +| ---------------- | ------------------------------------------- | +| `flex` | Flexboxコンテナを有効化 | +| `flex-wrap` | 画面幅に応じてボタンを折り返す | +| `justify-center` | ボタングループ全体を水平中央揃え(外側div) | +| `justify-start` | ボタン自体を左寄せ(ButtonGroup内) | +| `gap-1` | ボタン間のスペーシング(0.25rem) | +| `rounded` | ボタンの角に丸みを付与 | + +## 参考資料 + +- [Tailwind CSS - Flex Wrap](https://tailwindcss.com/docs/flex-wrap) +- [Tailwind CSS - Justify Content](https://tailwindcss.com/docs/justify-content) +- [Tailwind CSS - Gap](https://tailwindcss.com/docs/gap) +- [Tailwind CSS - Border Radius](https://tailwindcss.com/docs/border-radius) + +## 使用ライブラリ + +- Tailwind CSS +- Flowbite +- svelte-5-ui-lib diff --git a/src/lib/components/TaskTables/TaskTable.svelte b/src/lib/components/TaskTables/TaskTable.svelte index 0bd75c523..a85c771cc 100644 --- a/src/lib/components/TaskTables/TaskTable.svelte +++ b/src/lib/components/TaskTables/TaskTable.svelte @@ -171,19 +171,23 @@ - - {#each Object.entries(contestTableProviderGroups) as [type, config]} - - {/each} - +
+ + {#each Object.entries(contestTableProviderGroups) as [type, config]} + + {/each} + +
From 98f275685cbf5bce13e6900f14fa6ee2197ae68e Mon Sep 17 00:00:00 2001 From: Kato Hiroki Date: Sun, 2 Nov 2025 12:34:17 +0000 Subject: [PATCH 2/4] chore(ui): Hide shadow in button group (#2781) --- .../2025-11-02/make-button-group-responsive/plan.md | 11 +++++++++-- src/lib/components/TaskTables/TaskTable.svelte | 2 +- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/docs/dev-notes/2025-11-02/make-button-group-responsive/plan.md b/docs/dev-notes/2025-11-02/make-button-group-responsive/plan.md index 5f0aaf9fb..0e937d1e9 100644 --- a/docs/dev-notes/2025-11-02/make-button-group-responsive/plan.md +++ b/docs/dev-notes/2025-11-02/make-button-group-responsive/plan.md @@ -20,7 +20,7 @@ Tailwind CSSのレスポンシブクラスを使用してボタンの折り返 ```svelte
- + {#each Object.entries(contestTableProviderGroups) as [type, config]}