Skip to content
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

[menu-bar] Fix command check loading status #110

Merged
merged 2 commits into from
Nov 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
### 🐛 Bug fixes

- Fix installing EAS builds from cold start. ([#108](https://github.com/expo/orbit/pull/108) by [@gabrieldonadel](https://github.com/gabrieldonadel))
- Fix onboarding command check loading status. ([#110](https://github.com/expo/orbit/pull/110) by [@gabrieldonadel](https://github.com/gabrieldonadel))

### 💡 Others

Expand Down
5 changes: 3 additions & 2 deletions apps/menu-bar/src/components/CommandCheckItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,10 @@ type Props = {
title: string;
description: string;
icon: ImageSourcePropType;
loading: boolean;
} & CliCommands.CheckTools.PlatformToolsCheck[keyof CliCommands.CheckTools.PlatformToolsCheck];

const CommandCheckItem = ({ description, icon, title, reason, success }: Props) => {
const CommandCheckItem = ({ description, icon, title, reason, success, loading }: Props) => {
const showWarningAlert = () => {
const buttons: AlertButton[] = [{ text: 'OK', style: 'default' }];
const command = reason?.command;
Expand Down Expand Up @@ -62,7 +63,7 @@ const CommandCheckItem = ({ description, icon, title, reason, success }: Props)
</TouchableOpacity>
) : null}
</View>
{success === undefined ? (
{loading ? (
<ActivityIndicator />
) : success ? (
<CheckIcon />
Expand Down
3 changes: 2 additions & 1 deletion apps/menu-bar/src/windows/Onboarding.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,15 @@ const Onboarding = () => {
icon={AndroidStudio}
success={platformToolsCheck?.android?.success ?? false}
reason={platformToolsCheck?.android?.reason}
loading={platformToolsCheck?.android?.success === undefined}
/>
<CommandCheckItem
title="Xcode"
description="Install Xcode to manage devices and install apps on iOS"
icon={Xcode}
success={platformToolsCheck?.ios?.success ?? false}
reason={platformToolsCheck?.ios?.reason}
{...platformToolsCheck?.ios}
loading={platformToolsCheck?.ios?.success === undefined}
/>
</View>
</View>
Expand Down