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

WIP (maint) disable spinners in debug mode #650

Closed
wants to merge 1 commit into from
Closed

Conversation

tphoney
Copy link
Contributor

@tphoney tphoney commented Nov 8, 2024

this is just a POC ? what do you think

pterm has no concept of a non tty mode. from what i saw / read

@tphoney tphoney changed the title (maint) disable spinners in debug mode WIP (maint) disable spinners in debug mode Nov 8, 2024
Copy link
Member

@dylanratcliffe dylanratcliffe left a comment

Choose a reason for hiding this comment

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

I think if we're going to disable spinners in a non-tty mode, we should be doing it in a wrapper rather than directly within the command. For example we would create a wrapper library that exposes a couple of spinner options that we know we use, which the commands then call. It would be that library's job to detect if we're running in a TTY and have a fallback printing method if we aren't. I don't like the idea of conflating presentation logic with business logic everywhere

Copy link
Contributor

@DavidS-ovm DavidS-ovm left a comment

Choose a reason for hiding this comment

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

does setting pterm.DisableStyling() in PTermSetup() work, instead of this? (See pterm.RawOutput for details)

@tphoney
Copy link
Contributor Author

tphoney commented Nov 13, 2024

@DavidS-ovm i had tried disabling styling had no affect, it continued to spam the terminal. 👎

agreed separation of the business and presentation logic would be good ™️

@tphoney
Copy link
Contributor Author

tphoney commented Nov 13, 2024

long story short, this is annoying when running in vscode, i have a separate pr to force the cli tool into the terminal, rather than a debug console.

@tphoney tphoney closed this Nov 13, 2024
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