Skip to content

Add spinner when checking for NativeScript components versions #3457

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

Merged
merged 1 commit into from
Mar 19, 2018

Conversation

Fatme
Copy link
Contributor

@Fatme Fatme commented Mar 14, 2018

Currently when doctor command is executed, NativeScript components versions information is displayed as table. With this PR NativeScript components versions will be displayed with terminal spinners.

In case when component is up to date with latest available version, success spinner will be displayed.
In case when for component update is available, warn spinner will be displayed.
In case when component is not installed, fail spinner will be displayed.

This PR changes also the behaviour of tns info command. When tns info command is executed, NativeScript components versions information also will be displayed with terminal spinners.

Should be merged with this PR telerik/mobile-cli-lib#1066

@Fatme Fatme force-pushed the fatme/components-spinner branch from 0268ced to fec6b4d Compare March 14, 2018 06:39
@Fatme Fatme changed the base branch from master to release March 15, 2018 06:25
@Fatme Fatme force-pushed the fatme/components-spinner branch from fec6b4d to b51742e Compare March 15, 2018 07:04
import { createTable } from "../common/helpers";

export enum VersionInformationType {
UpToDate,
Copy link
Contributor

Choose a reason for hiding this comment

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

You could assign values here, should you decide to follow my suggestion in mobile-cli-lib's PR

const spinner = this.$terminalSpinnerService.createSpinner();
spinner.text = componentInformation.message;

if (componentInformation.type === VersionInformationType.UpToDate) {
Copy link
Contributor

Choose a reason for hiding this comment

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

We could use a switch here instead of multiple if statements

@Fatme Fatme force-pushed the fatme/components-spinner branch 3 times, most recently from d398d48 to 7de3e72 Compare March 16, 2018 13:28
Copy link
Contributor

@Mitko-Kerezov Mitko-Kerezov left a comment

Choose a reason for hiding this comment

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

LGTM

@Fatme
Copy link
Contributor Author

Fatme commented Mar 16, 2018

run ci

Currently when doctor command is executed, NativeScript components versions information is displayed as table. With this PR NativeScript components versions will be displayed with terminal spinners.

In case when component is up to date with latest available version, success spinner will be displayed.
In case when for component update is available, warn spinner will be displayed.
In case when component is not installed, fail spinner will be displayed.

This PR changes also the behaviour of `tns info` command. When `tns info` command is executed,  NativeScript components versions information also will be displayed with terminal spinners.
@Fatme Fatme force-pushed the fatme/components-spinner branch from 7de3e72 to c859f5e Compare March 19, 2018 06:27
@Fatme Fatme merged commit 137c3e3 into release Mar 19, 2018
@Fatme Fatme deleted the fatme/components-spinner branch March 19, 2018 07:13
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