-
Notifications
You must be signed in to change notification settings - Fork 255
feat(tree): support width and indenter styling #446
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
base: v2-exp
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this looks awesome!
i have only a couple of style remarks, but this looks great to me!
about the breaking change, I think its a fair one. We are soon to release v2, so maybe we could pack it there, as it is already a breaking change release. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @dlvhdr,
Thank you for working on it. It looks good overall!
Before merging:
- Can you target the
v2-exp
branch, rebase and ideally squash on a single (or a few) commits? - Ensure the CI is passing for tests and lint.
- I made a couple of comments for small improvements on the examples.
docs: fix WIP chore: tidy chore: cleanup + docs chore: fix lint
a883e66
to
68be6a5
Compare
@andreynering let me know if this requires further changes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thank you!
Some of the stuff I've been implementing on charmbracelet/bubbles#639 should go into lipgloss. This would help simplify the bubble code and is better for separating the rendering logic into lipgloss itself.
This PR adds two things:
I've also wrote a new example to show what this enables.
TODO: check this against my tree bubble
Warning
This does introduce a "breaking change", not in the API but:
Trees that have subtrees with their own renderers, meaning they set a custom item/enumerator style, will need to now also set an indenter style, if they want to keep a consistent indentation styling.
If they don't set one the default empty style is used and it can look weird to suddenly have 2 kinds of indentation stylings.
Previously this was solved by using the enumerator style.