Comments (6)
Hi @tvdsluijs, looks like this feature is in demand and I guess there is already a PR for it (#52). The only reason that PR is being held upon is I cannot think of a reason to add this feature. Maybe if you could share a use case for it, I can think more. Also, let me know if #52 is resolving this or I'm not understanding your feature request.
from halo.
@manrajgrover Perhaps you could consider using an enumeration controlled placement
argument which defaults to the original placement? I think a spinner/progress indicator with a text prefix is a fairly common pattern. pip
is one example of this.
Consider that these two support this mode as well:
from halo.
Hi @mverteuil, thank you for sharing your thoughts.
Perhaps you could consider using an enumeration controlled placement argument which defaults to the original placement
I didn't quite get this.
I think a spinner/progress indicator with a text prefix is a fairly common pattern. pip is one example of this.
Consider that these two support this mode as well:
https://pypi.python.org/pypi/progress
https://github.com/tqdm/tqdm
This makes sense. But should one expect user to provide a custom progress bar? One reason for this being different from tqdm is tqdm focuses more on iterative tasks while this library focuses on async tasks. I can add support for iterative tasks with this feature but I would keep it at spinners and not progress bars.
Would you check if #52 is serving the feature request?
from halo.
Perhaps you could consider using an enumeration controlled placement argument which defaults to the original placement
This comment is grounded in the implementation that exists in #52. For example, instead of using right=False
, you could use placement=Placement.LEFT
. This allows more flexibility and makes having multiple options be mutually exclusive down the road easier. I may be overreaching a bit with that concern. I think that PR is a good start, but my issue lies in the signature.
I agree with you about keeping it spinners, as there are other projects that support progress bars already. I was more trying to indicate that those projects have some flexibility in labelling the progress.
from halo.
@mverteuil We can work through the signature. Providing Placement
enum is a good idea but I'm not sure if it's an overkill. I don't see any other positions where spinner can be placed (other than left or right). But yeah, we can surely have placement
keyword argument and have default string as 'right'
.
from halo.
This feature has been added in #57. This will be made available in next release. 😄 Thanks to @stephen-bunn 🙌
from halo.
Related Issues (20)
- BUG REPORT Spinner shows up for each function that runs
- Bug: halo's output doesn't persist as expected inside Jupter Lab
- spinner overwritten in Jupyter on Windows
- Can't get Unicode characters to show on Windows using Windows Terminal HOT 1
- Suggestion: allow spinners to be indented HOT 1
- Bug: Colorama init causes all ansi codes to be stripped when not in a tty HOT 2
- Suggestion: Added PEP 484 type hints
- Suggestion: Allow text to change when using decorate pattern. HOT 1
- threading.Thread.setDaemon has been deprecated in favor of setting daemon attribute directly in Python 3.10 HOT 1
- Bug: Crash when using an animation and switching to a new animated message shorter than current position
- How to integrate with logging HOT 2
- Question[Discussion]: More maintainers? HOT 1
- feature request: any appetite for supporting dynamic text? HOT 2
- Spinner does not animate during some external function call. HOT 1
- spinner not showing
- Interview partners for research about communication in GitHub projects wanted
- Suggestion: Close widget box when clearing the spinner on jupyter notebook
- Bug: halo not showing properly in Jenkins CI HOT 1
- Suggestion: show GIF demo of the various spinners
- BUG: Halo.__init__.<locals>.clean_up() takes 0 positional arguments but 1 was given HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from halo.