Skip to content

Conversation

@ChausseBenjamin
Copy link

A progress cell currently only has two states: complete, incomplete.

This PR let's progress bars be much more granular by having 9 possible states for the bar which drastically increases resolution.

Animations render at 60fps by default. It's a shame to have smoothness limited by progress bar resolution ;)

@ChausseBenjamin
Copy link
Author

Don't mind the broken UI... This is just an example to show you guys how a better resolution can make animations smoother and make sliders much more precise/representative ;)

example

@meowgorithm meowgorithm added the enhancement New feature or request label Dec 3, 2024
@meowgorithm
Copy link
Member

meowgorithm commented Dec 3, 2024

This is SO good. We'll need to review this properly but I think it's safe to say we should get this one in.

@bashbunni bashbunni modified the milestones: new bubbles, progress Jan 23, 2025
@meowgorithm
Copy link
Member

Hi there! Just a note that we haven't forgotten about this one and we still plan to get it in. Thanks for your patience with it!

@ChausseBenjamin
Copy link
Author

@meowgorithm I recently thought of a few tweaks that could make progress more extensible and smooth. Currently, filled blocks use the ASCII full block meaning only one color can be used per gradient block. Using the ANSI half block instead means you can use one color in the foreground (left-side) and one in the background (right-side) hence doubling the color resolution.

Also, the gradient implementation limits folks to 2 colors but a more generalized gradientFunc could allow people to do more funky stuff. Here's an example where I created a hue gradientFunc as well as a stretched gradient (where a and b from the gradient span from 0% to current % instead of the entire 100%) where the right-most completed color always remains the same.
demo

Would you be interested in those changes as well?

I totally understand if you don't :)

I just want to show them to you now so the library spec doesn't change twice if you decide to roll with it ;)

@lrstanley
Copy link
Contributor

Also, the gradient implementation limits folks to 2 colors but a more generalized gradientFunc could allow people to do more funky stuff. Here's an example where I created a hue gradientFunc as well as a stretched gradient (where a and b from the gradient span from 0% to current % instead of the entire 100%) where the right-most completed color always remains the same.

Mentioned this in Discord, but referencing here for others as well: #838 -- that PR should work for what you're looking for, and should still be forward-compatible with some of the additional ideas you have. Though of course, the new implementation would be v2 only.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants