Skip to content

Conversation

@riona-k
Copy link
Contributor

@riona-k riona-k commented Nov 21, 2025

@riona-k riona-k requested a review from yuki-takei November 21, 2025 06:54

if (adminHomeContainer.state.growiVersion == null) {
return <LoadingSpinner />;
}
Copy link
Member

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 のコンテンツが全てがローディングされるというよりかは 「システム情報」や「環境変数一覧」のテーブルだけがローディングされるという実装の方が良さそうです。

例えば 「システム情報」の場合はここらへんにローディングスピナーを書くのが良さそう。

if (growiVersion == null || nodeVersion == null || npmVersion == null || pnpmVersion == null) {
return <></>;
}

Copy link
Member

@miya miya Nov 21, 2025

Choose a reason for hiding this comment

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

ちなみに SystemInfomationTable.tsx というコンポーネントは AdminHome.tsx から辿れる

@riona-k riona-k changed the title #174504 add loading spinner to admin home feat: #174504 Add loading spinner to admin home Nov 25, 2025
@riona-k
Copy link
Contributor Author

riona-k commented Nov 25, 2025

2025-11-25.12-51-33.mp4

import { LoadingSpinner } from '@growi/ui/dist/components';

type EnvVarsTableProps = {
envVars: Record<string, string | number | boolean>,
Copy link
Member

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 なはずなので以下のようにオプショナルにしておきたいです。

Suggested change
envVars: Record<string, string | number | boolean>,
envVars?: Record<string, string | number | boolean>,

@yuki-takei yuki-takei changed the title feat: #174504 Add loading spinner to admin home feat: Add loading spinner to admin home Nov 25, 2025
@yuki-takei yuki-takei merged commit 02ef08c into master Nov 25, 2025
35 of 38 checks passed
@yuki-takei yuki-takei deleted the feature/add-loading-admin-home branch November 25, 2025 08:56
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.

4 participants