charmbracelet / bubbles

TUI components for Bubble Tea 🫧
MIT License
5.49k stars 264 forks source link

feat: add support for list items with multi-line titles #323

Open bashbunni opened 1 year ago

bashbunni commented 1 year ago

This gets asked about quite a bit. It's not very reliable when using DefaultDelegate as a workaround due to the underlying expectations for list item heights under the hood. Would be great to support this out of the box.

AYehia0 commented 1 year ago

Thank you @bashbunni :D, would you please have a look at this issue too : https://github.com/charmbracelet/lipgloss/issues/167

meowgorithm commented 1 year ago

One thing to note about this one is that in order to calculate the total number of pages one all the items must still be of a fixed height. Otherwise we'd only be able to determine the total number of pages by rendering and measuring every single list item. That's doesn't rule out the possibility of simply having an indeterminately paged list, however.