-
Notifications
You must be signed in to change notification settings - Fork 235
feat: Add loading spinner to admin home #10534
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
Conversation
|
|
||
| if (adminHomeContainer.state.growiVersion == null) { | ||
| return <LoadingSpinner />; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
adminHomeContainer.state.growiVersion == null という条件の時に AdminHome のコンテンツが全てがローディングされるというよりかは 「システム情報」や「環境変数一覧」のテーブルだけがローディングされるという実装の方が良さそうです。
例えば 「システム情報」の場合はここらへんにローディングスピナーを書くのが良さそう。
growi/apps/app/src/client/components/Admin/AdminHome/SystemInfomationTable.tsx
Lines 19 to 21 in c43c7ce
| if (growiVersion == null || nodeVersion == null || npmVersion == null || pnpmVersion == null) { | |
| return <></>; | |
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ちなみに SystemInfomationTable.tsx というコンポーネントは AdminHome.tsx から辿れる
| <SystemInfomationTable /> |
2025-11-25.12-51-33.mp4 |
| import { LoadingSpinner } from '@growi/ui/dist/components'; | ||
|
|
||
| type EnvVarsTableProps = { | ||
| envVars: Record<string, string | number | boolean>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
親コンポーネントの {adminHomeContainer.state.envVars && という条件を消したなら props から渡ってくる値は nullable なはずなので以下のようにオプショナルにしておきたいです。
| envVars: Record<string, string | number | boolean>, | |
| envVars?: Record<string, string | number | boolean>, |
https://redmine.weseek.co.jp/issues/174504
2025-11-21.16-09-32.mp4