-
Notifications
You must be signed in to change notification settings - Fork 6
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
add a prefix to spinner #63
Conversation
Very nice! Thank you for your contribution. I'll test drive the code later today. |
Hey @KScott99, I took a look at your PR, I really like the idea.. though i found it tricky to work out how you intended it to be used. As a first step, could you add an example program to Thanks again for your contribution. |
@chelnak I added two different examples, |
Nice thank you 🙏 |
@chelnak do the examples make sense? Let me know if there's anything else you need me to do |
Hey @KScott99, sorry for the delayed response. I've been stacked with work and some personal things! I will re-review the changes later this evening and get back to you. IIRC I had a few suggestions but need to remind myself what they were. |
OK So I'm refreshed! What do you think about having the prefix as an option for For example, if we decide that we want a spinner group with a prefix, we could do something like: sm := ysmrr.NewSpinnerManager(
ysmrr.WithAnimation(animations.Pipe),
ysmrr.WithSpinnerColor(colors.FgHiBlue),
ysmrr.WithPrefix("Download"), // <- this is your option
) Then I think the other functions you added, Finally, shall we change the use of "Prefix" to something like "Title"? |
@chelnak no worries, I understand. I don't think adding the prefix to the entire spinner group would make sense as then you wouldn't be able to set different values for individual spinners. In my example As for renaming to "Title" I think that could possibly be misleading from a users perspective, when I think of "Title" I think of text that comes above versus "Prefix" where I think of text that comes before something |
Ah ok, great clarification. I think I may have completely misunderstood an implementation detail here. In this case what you have suggested makes perfect sense. Can you some test cases for your change? Once this is done, I'm more than happy to merge and cut a release! Thanks 🙏 |
@chelnak awesome, I can work on writing some test cases just may be a bit before I can get around to it |
No worries at all. Ping if you need help or anything. Thanks! |
@chelnak added test cases |
Thank you! Let's merge it. |
Add the ability to set the text before a spinner
For my use I wanted to be able to indent certain spinners
This seemed like it would be useful to have in general