Skip to content

【フロントエンド】モバイルUIレスポンシブ対応#66

Draft
kuu13580 wants to merge 10 commits intodevelopfrom
feature/issue64-mobile-ui
Draft

【フロントエンド】モバイルUIレスポンシブ対応#66
kuu13580 wants to merge 10 commits intodevelopfrom
feature/issue64-mobile-ui

Conversation

@kuu13580
Copy link
Contributor

概要

レスポンシブ対応を行った。

詳細

UIのフォントサイズやデザインを修正。

動作確認

フロントに変更がある場合、画像を添付すること

確認項目

  • 動作確認を実施している
  • issueはPRページ右下のDevelopmentからissueが紐づいている

@kuu13580 kuu13580 self-assigned this Feb 14, 2026
@gemini-code-assist
Copy link

Summary of Changes

Hello @kuu13580, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

このプルリクエストは、アプリケーションのフロントエンドをモバイルデバイスにレスポンシブに対応させることを目的としています。UI要素のサイズ調整、ヘッダーコンポーネントの柔軟性向上、FullCalendarの操作性改善、そしてユーザーが最近閲覧した旅程を簡単に確認・作成できる新しいホームページの導入など、全体的なユーザーエクスペリエンスの向上に焦点を当てています。

Highlights

  • モバイルUIレスポンシブ対応: UIのフォントサイズやデザインをモバイル向けに調整し、レスポンシブな表示を実現しました。これには、新しいフロントエンド開発ガイドラインの導入も含まれます。
  • Headerコンポーネントの改善: Headerコンポーネントをリファクタリングし、fulllogoOnlyの2つの表示バリアントをサポートするようにしました。これにより、ホームページなどでのロゴのみの表示が可能になります。
  • FullCalendarのドラッグ操作改善: FullCalendarでのドラッグ操作中に自動スクロールを制御するuseDragAutoScrollフックを導入しました。これにより、モバイルでのイベントの追加や移動がよりスムーズになります。
  • ホームページの機能強化: ホームページを刷新し、最近閲覧した旅程のリスト表示と、新しい旅程を作成するためのダイアログを追加しました。
  • APIスキーマの整理: Tripの作成・更新に関するAPIスキーマをTripMutationとして整理し、より明確なデータ構造とバリデーションを導入しました。

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • .claude/rules/frontend.md
    • レスポンシブデザインに関する新しいフロントエンド開発ガイドラインを追加しました。
  • frontend/src/components/Header.stories.tsx
    • Headerコンポーネントにvariantプロパティを追加し、LogoOnlyストーリーを新規作成しました。
    • 既存のストーリーにvariant: 'full'を明示的に設定しました。
  • frontend/src/components/Header.tsx
    • HeaderコンポーネントをHeaderLogoOnlyHeaderFullの2つの関数コンポーネントに分割し、variantプロパティで切り替えるようにリファクタリングしました。
    • スクロールイベントハンドリングにisDraggingRefを追加し、ドラッグ中のスクロール更新をスキップするように変更しました。
    • ヘッダー領域クリックでスクロール状態をリセットするhandleHeaderClickを追加しました。
    • パディング、フォントサイズ、アイコンサイズなど、レスポンシブ対応のためのスタイル調整を行いました。
  • frontend/src/components/HeaderSkeleton.tsx
    • レスポンシブ対応のため、パディング、ロゴの配置、スケルトンのサイズと配置を調整しました。
  • frontend/src/components/Logo.tsx
    • ロゴコンポーネントにw-fitクラスを追加し、幅の挙動を調整しました。
  • frontend/src/components/blocks/TransportationIcon.tsx
    • アイコンのデフォルトサイズを小さくし、smブレイクポイントで大きくするレスポンシブなサイズ設定を適用しました。
  • frontend/src/components/blocks/edit/BlockScheduleEdit.css
    • コンテナの高さが小さい場合のスケジュール時間のフォントサイズを12pxから10pxに縮小しました。
  • frontend/src/components/blocks/edit/BlockScheduleEdit.tsx
    • レスポンシブ対応のため、パディング、フォントサイズ、アイコンサイズを調整しました。
  • frontend/src/components/blocks/view/BlockScheduleView.tsx
    • レスポンシブ対応のため、タイトルと詳細のフォントサイズを調整しました。
  • frontend/src/components/blocks/view/BlockTransportationView.tsx
    • レスポンシブ対応のため、タイトルと詳細のフォントサイズを調整しました。
  • frontend/src/components/timeline/Timeline.tsx
    • 編集モードのプレースホルダーを削除し、ViewTimelineのみをレンダリングするように簡素化しました。
  • frontend/src/components/timeline/ViewTimeline.tsx
    • レスポンシブ対応のため、時間表示のフォントサイズ、タイムラインの丸と線のサイズを調整しました。
  • frontend/src/components/ui/button.tsx
    • ボタンのデフォルト、sm、lgサイズとテキストサイズをレスポンシブ対応のために調整しました。
  • frontend/src/components/ui/dialog.tsx
    • ダイアログが開いたときにフォーカスが自動的に当たるのを防ぐため、onOpenAutoFocusプロパティを追加しました。
    • フッターのレイアウトをモバイルフレンドリーにするため、flex-col-reverseflex-colに変更しました。
  • frontend/src/dialogs/AddBlockDialog.tsx
    • DialogContentからmax-w-mdクラスを削除しました。
  • frontend/src/dialogs/AddPageDialog.tsx
    • DialogContentからmax-w-mdクラスを削除しました。
  • frontend/src/dialogs/AddTripDialog.tsx
    • 新しい旅程を作成するためのAddTripDialogコンポーネントを新規追加しました。
  • frontend/src/dialogs/EditBlockDialog.tsx
    • DialogContentからmax-w-mdクラスを削除しました。
    • 削除ボタンのマージンをレスポンシブ対応のために調整しました。
    • フッターのボタンを直接DialogFooterの子要素として配置するように変更しました。
  • frontend/src/dialogs/EditPageDialog.tsx
    • DialogContentからmax-w-mdクラスを削除しました。
    • 削除ボタンのマージンをレスポンシブ対応のために調整しました。
    • フッターのボタンを直接DialogFooterの子要素として配置するように変更しました。
  • frontend/src/hooks/useDragAutoScroll.ts
    • ドラッグ操作中の自動スクロールを管理するためのuseDragAutoScrollカスタムフックを新規追加しました。
  • frontend/src/hooks/useTrips.ts
    • Tripの作成・更新引数をTripMutation型に統一し、関連するスキーマ定義を更新しました。
    • APIリクエストのバリデーションと変換にAppRequestTripMutationSchemaを使用するように変更しました。
  • frontend/src/hooks/useVisitedTrips.ts
    • 最近閲覧した旅程をlocalStorageで管理し、SWRで取得するためのuseVisitedTripsカスタムフックを新規追加しました。
  • frontend/src/index.css
    • .fc-event-draggingクラスにtouch-action: noneを追加し、ドラッグ中のタッチイベントの挙動を改善しました。
  • frontend/src/lib/utils.ts
    • tailwind-mergeを拡張し、カスタムフォントサイズ(例: text-10px)を正しくマージできるようにしました。
  • frontend/src/pages/HomePage.tsx
    • ホームページを全面的に再設計し、HeaderコンポーネントをlogoOnlyバリアントで使用するように変更しました。
    • 最近閲覧した旅程をuseVisitedTripsフックで取得し表示するようにしました。
    • 新しい旅程を作成するためのボタンと、それを示すカーブした矢印を追加しました。
    • AddTripDialogを統合し、新しい旅程作成フローを実装しました。
    • 全体の高さをh-dvhに変更しました。
  • frontend/src/pages/NotFoundPage.tsx
    • コンテナの高さをmin-h-screenからmin-h-dvhに変更しました。
  • frontend/src/pages/TripPage.tsx
    • useDragAutoScrollフックとuseVisitedTripsフックを統合しました。
    • Headerコンポーネントにvariant='full'isDraggingRefプロパティを渡すように変更しました。
    • EditTripLayoutにonDragStartonDragEndプロパティを渡すように変更しました。
    • メインコンテナの高さをh-screenからh-dvhに変更し、overscroll-y-noneを追加しました。
    • Tripが読み込まれた際にaddVisitedTripを呼び出すuseEffectを追加しました。
  • frontend/src/pages/TripPage/EditTripLayout.tsx
    • onDragStartonDragEndプロパティを受け取るように変更し、FullCalendarのドラッグイベントと連携させました。
    • FullCalendarのlongPressDelayを300msに調整し、eventDragStart/eventDragStop/eventResizeStart/eventResizeStopハンドラを追加しました。
    • タイムグリッド上の長押しを検出してスクロールをロックするためのuseEffectを追加しました。
    • FullCalendarのviewClassNamesslotLabelClassNamesをレスポンシブ対応のために調整しました。
  • frontend/src/pages/TripPage/ViewTripLayout.tsx
    • タイムラインコンテナに水平方向のパディングpx-2を追加しました。
  • frontend/src/types/block.ts
    • AppRequestBlockSchemaの変換ロジックにdetailプロパティを追加しました。
  • frontend/src/types/trip.ts
    • Tripの作成/更新用のTripMutationSchemaAppRequestTripMutationSchemaを新規定義しました。
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@github-actions
Copy link

Visit the preview URL for this PR (updated for commit cc7d00e):

https://tabi-share-8ef6b--pr66-feature-issue64-mobi-jws08c3h.web.app

(expires Sat, 21 Feb 2026 03:10:52 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 9f2a87ede127df7673322845e34cf22c1372d720

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

このプルリクエストは、アプリケーション全体にわたるモバイルUIのレスポンシブ対応を実装するものです。広範な変更ですが、非常によく構成されています。新しいレスポンシブデザインのルールが文書化され、ヘッダー、ボタン、ダイアログなどのコンポーネントがレスポンシブに更新されています。ホームページも再設計され、カレンダーでのドラッグ時の自動スクロールや最近閲覧した旅程の表示といった新機能も追加されています。コードの品質は高く、特にフックにおける型安全性のためのリファクタリングは素晴らしいです。localStorageからのデータハンドリングをより堅牢にするための改善点を1点提案しました。

Comment on lines +11 to +19
const getVisitedTripUrlIds = (): string[] => {
try {
const stored = localStorage.getItem(VISITED_TRIPS_KEY);
if (!stored) return [];
return JSON.parse(stored);
} catch {
return [];
}
};

Choose a reason for hiding this comment

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

medium

localStorageから取得したデータの型検証が不十分です。JSON.parseany型を返すため、保存されているデータが期待するstring[]でない場合にランタイムエラーを引き起こす可能性があります。例えば、開発中に手動で不正な値をlocalStorageに設定した場合や、将来の仕様変更でデータ形式が変わった場合に問題となります。

zodを使用して、アプリケーションの他の部分と同様に厳密な型検証を行うことを推奨します。これにより、コードの堅牢性が向上します。

ファイルの先頭に以下を追加してください:

import { z } from 'zod';

const VisitedTripUrlIdsSchema = z.array(z.string());
const getVisitedTripUrlIds = (): string[] => {
  try {
    const stored = localStorage.getItem(VISITED_TRIPS_KEY);
    if (!stored) return [];

    const parsed = VisitedTripUrlIdsSchema.safeParse(JSON.parse(stored));
    return parsed.success ? parsed.data : [];
  } catch {
    return [];
  }
};

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments