-
-
Notifications
You must be signed in to change notification settings - Fork 2
breaking: bubbletea/lipgloss v2 #10
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
Draft
lrstanley
wants to merge
19
commits into
master
Choose a base branch
from
v2-exp
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: Liam Stanley <liam@liam.sh>
Welcome to Codecov 🎉Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests. Thanks for integrating Codecov - We've got you covered ☂️ |
4 tasks
Signed-off-by: Liam Stanley <liam@liam.sh>
Signed-off-by: Liam Stanley <liam@liam.sh>
Signed-off-by: Liam Stanley <liam@liam.sh>
Signed-off-by: Liam Stanley <liam@liam.sh>
…rendering Signed-off-by: Liam Stanley <liam@liam.sh>
Signed-off-by: Liam Stanley <liam@liam.sh>
Signed-off-by: Liam Stanley <liam@liam.sh>
Signed-off-by: Liam Stanley <liam@liam.sh>
Signed-off-by: Liam Stanley <liam@liam.sh>
Signed-off-by: Liam Stanley <liam@liam.sh>
Signed-off-by: Liam Stanley <liam@liam.sh>
Signed-off-by: Liam Stanley <liam@liam.sh>
Signed-off-by: Liam Stanley <liam@liam.sh>
Signed-off-by: Liam Stanley <liam@liam.sh>
Signed-off-by: Liam Stanley <liam@liam.sh>
Signed-off-by: Liam Stanley <liam@liam.sh>
Signed-off-by: Liam Stanley <liam@liam.sh>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Warning
THIS SHOULD NOT BE MERGED UNTIL the Charm team has fully released all of the associated charm libraries.
This PR is currently tagged as
github.com/lrstanley/bubbletint/v2@v2.0.0-alpha.8. Use with:You can find the API for v2 here: https://pkg.go.dev/github.com/lrstanley/bubbletint/v2@v2.0.0-alpha.8
🚀 Changes proposed by this PR
Caution
At a high-level, there are more breaking changes with v2 of bubbletint, than not. You will want to review the new API.
Remove Reliance on Lipgloss for
color.ColorRefactored the library as a whole to support the
color.Colorinterface directly, without relying on lipgloss, for more agnostic usage. It should now be possible to use it with many other libraries without pulling in lipgloss (and other associated dependencies), though you may still need down-sampling if you're not using bubbletea/lipgloss, to support non-true-color (or 256bit) terminals.No More Bloated Interfaces
Removed the tint interface with a huge list of both global functions, as well as methods for querying colors, and have instead opted for a more straightforward struct for storing color values.
This has lowered the overall amount of code generated.
Callers of the library can still implement their own interfaces.
The global registry still works the same as before, so you don't have to manage passing the theme state across many different components.
Rather than
Registry.Blue(), you'd do one of:JSON Serializable
Tints are now fully JSON serializable.
{"r": 255, "g": 0, "b": 0, "a": 255}), in addition to hex strings ("#ff0000"), which makes it easier for end users to add their own tints.Gradients Galore
Caution
This functionality will be removed once charmbracelet/lipgloss#550 is merged.
Darken? Lighten?
Caution
This functionality will be removed once charmbracelet/lipgloss#550 is merged.
panic()'s OH MY!The code now has more resilient fallbacks, reducing the potential chance that developer-error results in a panic.
Updated Examples
Examples have been updated to support bubbletea/lipgloss v2 as well. There are also more examples, like
examples/load-from-file, showing how to load tints from a file, which would be useful in end-user applications.TODO
fangand other similar libraries🔗 Related bug reports/feature requests
🧰 Type of change
🤝 Requirements