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

doctor: show required versions #763

Merged
merged 8 commits into from
Oct 14, 2019

Conversation

lucasbento
Copy link
Member

@lucasbento lucasbento commented Oct 1, 2019

Summary:

This PR is related to #694 and it:

  1. Shows the required current and required version for a failed health check;
  2. Changes the wording from to fix all issues to `to try to fix all issues;
  3. Fixes a problem where if you type a character not recognised on the usage it just doesn't listen to the correct characters anymore;
  4. Puts the description content below the health check name rather than on the right side.

Preview

Preview

Test Plan:

Run doctor.

@lucasbento lucasbento requested a review from thymikee October 1, 2019 14:39
@lucasbento lucasbento mentioned this pull request Oct 1, 2019
@thymikee
Copy link
Member

thymikee commented Oct 5, 2019

Shows the required current and required version for a failed health check

I can see how that looks nice with colors, but please notice that this command will be ran in case of issues, likely by inexperienced RN users. We need to be more descriptive than showing an arrow. I'd rather like to give it a human-readable text like "We found vX, however we need vY".

Puts the description content below the health check name rather than on the right side.

I'm not a fan of this change. Initially when I read the "Watchman" and its description below, I was confused where it belongs. Let's either keep it in the same line (why moving it? it fits nicely even with version), or indent it one level or do something else.

How about this UI:

Android
  v ANDROID_HOME
  x Android SDK - Required for building and installing your app on Android devices.
    - found at: <dim>/Users/user/Android/SDK
    - version:  <red>v23.0.1
    - to fix: 	<bold>upgrade to v26.0.0. Here's how: <dim link>
  x Android NDX - description
    - version: 	<red>not available
    - to fix: 	<bold>install v19.0.0. Here's how: <dim link>

) => Promise<{version?: string; needsToBeFixed: boolean | string}>;
) => Promise<{
version?: string;
versionRange?: string;
Copy link
Member

Choose a reason for hiding this comment

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

shouldn't we require versions and ranges from all health checks?

Copy link
Member Author

Choose a reason for hiding this comment

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

Some of them are not based on comparing versions, just checking if they are there or not (e.g. ios-deploy and cocoapods).

Copy link
Member

@thymikee thymikee left a comment

Choose a reason for hiding this comment

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

Thank you, code LGTM! Doctor starts to shape up :D. Let's iterate on the UI, to be a bit more approachable for beginners, maybe by structuring the output in a easy-to-follow important stuff way and being descriptive in messaging

@lucasbento
Copy link
Member Author

@thymikee: cool, thanks for the review.

The approach you suggested looks good, I'll see what I can do!

@lucasbento
Copy link
Member Author

image

@thymikee: what do you think about this?

A few points related to your proposal:

  • I'm not sure if the path to the software/lib is useful, perhaps it's just more info clogging the UI;
  • We currently don't have a way to show a to fix part on this step as it's shown only after the user tries to fix it all.

@thymikee
Copy link
Member

Looks good!

@lucasbento
Copy link
Member Author

@thymikee: pushed :)

@lucasbento lucasbento requested a review from thymikee October 14, 2019 08:32
@thymikee thymikee merged commit 8f977d9 into master Oct 14, 2019
@thymikee thymikee deleted the feat/doctor-specify-required-versions branch October 14, 2019 09:58
@@ -47,11 +47,15 @@ export default {
} catch {}
}

const version = sdks === 'Not Found' ? sdks : sdks['Build Tools'][0];
Copy link

Choose a reason for hiding this comment

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

What if I forgot to install build-tools when using sdkmanager manually? Here will throw an Cannot read property '0' of undefined error, instead of telling me to install build-tools through sdymanager "build-tools;29.0.0".

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.

3 participants