Skip to content

Conversation

@TkymHrt
Copy link
Member

@TkymHrt TkymHrt commented Jan 13, 2026

対応Issue

https://nut-m-e-g.slack.com/archives/C020WQ3GY07/p1768051810911529

概要

  1. Chakra UIの廃止とTailwind CSSへの移行
  • ChakraProvider および @chakra-ui/react への依存を削除
  • 各コンポーネント(Layout, Header, SideNav, Form要素など)のスタイルをTailwind CSSのユーティリティクラスで再実装
  • MainLayout や Card などの主要コンポーネントのデザイン調整
  1. ESLint Warningへの対応
  • useEffect の依存配列(dependency array)の修正によるstale closureの防止
  • 未使用変数の削除
  • 型定義の明示化(anyの排除や適切な型注釈の追加)
  • Next/Image への置き換えによる画像最適化(一部)
  • コンポーネントのProps定義の見直し(RadioGroup, SearchSelect など)

画面スクリーンショット等

  • N/A

テスト項目

  • ビルドが正常に完了すること
  • アプリケーションが起動し、レイアウト崩れがないこと
  • コンソールにエラーや新たなWarningが表示されないこと
  • 各種フォーム(入力、ラジオボタン、セレクトボックス等)が正常に動作すること

備考

変更ファイル数が多いです・・・

- Updated FileUploadField, FormField, and FundInformationForm components to use common form elements from '@/components/common'.
- Replaced Chakra UI components with standard HTML elements where appropriate for consistency.
- Enhanced styling for various components to improve UI consistency and responsiveness.
- Introduced a new Toast context and hook for better toast notification management.
- Updated various pages to utilize the new toast notifications and improved layout structure.
- Refactored radio button implementations in AddModal and EditModal components for better readability and maintainability.
- Consolidated import statements for better readability in AddBudgetManagementModal, BudgetManagement, DeleteBudgetManagementModal, EditBudgetManagementModal, and other components.
- Enhanced error handling to provide clearer messages in case of failures in AddBudgetManagementModal, DeleteBudgetManagementModal, and EditBudgetManagementModal.
- Updated RadioGroup and SearchSelect components to improve type safety and ensure proper prop handling.
- Replaced <img> tags with <Image> from 'next/image' for better performance and optimization in DetailPage2 and other components.
- Added missing dependencies to useEffect hooks to prevent potential stale closures in various components.
- Removed unnecessary variables and improved function signatures for clarity in multiple files.
- Updated API handler in receipts.tsx for better error handling and code organization.
@gemini-code-assist

This comment was marked as resolved.

gemini-code-assist[bot]

This comment was marked as resolved.

@TkymHrt TkymHrt changed the base branch from develop to refactor/yama/upgrade-tailwind-v4 January 13, 2026 09:39
@TkymHrt

This comment was marked as resolved.

gemini-code-assist[bot]

This comment was marked as resolved.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR migrates the application from Chakra UI to Tailwind CSS and addresses ESLint warnings by fixing dependency arrays, removing unused variables, and improving type definitions.

Changes:

  • Removed Chakra UI dependencies and replaced with custom Tailwind CSS components
  • Implemented custom Toast provider to replace Chakra's useToast
  • Fixed ESLint warnings including useEffect dependencies, unused variables, and type definitions
  • Created new common components (FormControl, FormLabel, FormErrorMessage, RadioGroup, Spinner, etc.)
  • Updated layout system with improved responsive design

Reviewed changes

Copilot reviewed 75 out of 76 changed files in this pull request and generated 13 comments.

Show a summary per file
File Description
package.json, pnpm-lock.yaml Removed Chakra UI and related dependencies
.eslintrc.json Removed tailwindcss plugin configuration
src/hooks/useToast.tsx New custom toast implementation replacing Chakra's useToast
src/components/common/* New form components, RadioGroup, Spinner migrated from Chakra
src/pages/_app.tsx Replaced ChakraProvider with ToastProvider
src/components/layout/MainLayout/* Refactored layout with Tailwind CSS
Various component files Updated to use Tailwind CSS utilities instead of Chakra components
Various page files Added eslint-disable comments for intentionally empty dependency arrays
Files not reviewed (1)
  • view/next-project/pnpm-lock.yaml: Language not supported

Comment on lines 47 to 50
useEffect(() => {
setCurrentUser(user);
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []);
Copy link

Copilot AI Jan 13, 2026

Choose a reason for hiding this comment

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

The eslint-disable comment for react-hooks/exhaustive-deps is suppressing a valid warning. The user state should be included in the dependency array. If you want to run this effect only once on mount, consider using a ref to track whether the effect has run, or restructure the code to properly handle the dependency.

Copilot uses AI. Check for mistakes.
Copy link
Member Author

Choose a reason for hiding this comment

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

初回のみでおk

Comment on lines +298 to +310
<Radio
key={designer.value}
name='design'
value={String(designer.value)}
checked={data.design === designer.value}
onChange={(val) => {
setDesign({
target: { value: val },
} as React.ChangeEvent<HTMLInputElement>);
}}
>
{designer.label}
</Radio>
Copy link

Copilot AI Jan 13, 2026

Choose a reason for hiding this comment

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

The Radio component's value prop is typed as string, but the onChange handler in the parent component expects a numeric value. The conversion String(designer.value) and the subsequent parsing back via target.value could lead to type mismatches. Consider ensuring consistent typing between the Radio component and its usage.

Copilot uses AI. Check for mistakes.
Copy link
Member Author

Choose a reason for hiding this comment

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

フロー的には動作するので一旦無視

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Jan 13, 2026

Deploying finansu with  Cloudflare Pages  Cloudflare Pages

Latest commit: 073b032
Status: ✅  Deploy successful!
Preview URL: https://055cc406.finansu.pages.dev
Branch Preview URL: https://refactor-yama-remove-chakra.finansu.pages.dev

View logs

@TkymHrt TkymHrt requested review from Kubosaka and hikahana January 13, 2026 11:46
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.

2 participants