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

ProgressView don't finish correctly #1153

Open
piotrooo opened this issue Dec 20, 2024 · 0 comments
Open

ProgressView don't finish correctly #1153

piotrooo opened this issue Dec 20, 2024 · 0 comments
Labels
status/need-triage Team needs to triage and take a first look

Comments

@piotrooo
Copy link

When I try to run ProgressView, it seems to finish incorrectly. For example, in the sample code:

@Bean
public ApplicationListener<ApplicationStartedEvent> applicationStartedListener(ViewComponentBuilder viewComponentBuilder) {
    return event -> {
        ProgressView.ProgressViewItem text = ofText(15, LEFT);
        ProgressView.ProgressViewItem spinner = ofSpinner(10, LEFT);
        ProgressView view = new ProgressView(text, spinner);
        view.setDescription("Waiting...");
        view.setSpinner(Spinner.of(DOTS1, 80));
        view.setRect(0, 0, 20, 1);

        ViewComponent component = viewComponentBuilder.build(view);
        view.start();
        ViewComponent.ViewComponentRun run = component.runAsync();
        try {
            TimeUnit.SECONDS.sleep(3);
        } catch (InterruptedException e) {
            throw new RuntimeException(e);
        }
        view.stop();
        run.cancel();
    };
}

After the progress completes, I always need to press Enter to trigger auto-competition again.

asciicast

@github-actions github-actions bot added the status/need-triage Team needs to triage and take a first look label Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/need-triage Team needs to triage and take a first look
Projects
None yet
Development

No branches or pull requests

1 participant