jewel
jewel copied to clipboard
LazyTable support
LazyTable features:
- [x] Basic table view
- [x] Lazy cell size
- [x] Pinned rows and columns
- [x] ScrollbarAdapter for tables
- [x] Scrolling with animation
- [x] Single-selection for cell and row
- [ ] Multi-selection for cells, rows and columns
- [x] Draggable rows and columns
- [ ] Mergeable cells
- [x] Styling
- [ ] Code/Performance review
LazyLayout features:
- [x] Layout logic, available in LazyTable.kt and LazyTableMeasure.kt
- [x] Scrollable, clipping and overscroll effect, available in LazyTableState.kt#L112 and LazyTableState.kt#L168, clipping supported in LazyTable.kt#L94, overscroll effect supported in LazyTable.kt#L67 but not test yet because it not available in Desktop.
- [ ] Semantics data, not support yet. Because Modifier.lazyLayoutSemantics is internal function.
- [ ] Beyond-bounds, not support yet. LazyLayoutBeyondBoundsModifierLocal is internal, but we should need impl our one, we need support both of the Vertical and Horizontal orientation
- [x] PinnableContainer, we support pin rows and columns but just impl it in layout logic. We don't use the PinnableContainer because it will case chaos in table layout.
- [ ] Prefetching, not support yet.
- [x] Animated scroll, we support it fully in LazyTableAnimateScroll.kt#L49, but I copied much code from LazyLayoutAnimateScroll.
- [x] Scroll position maintenance, we support it fully.
- [ ] Animated place, not support yet and we have no plan to support it. These animations do not fit well with the table layout and may cause confusion.
Needed internal API
- [ ] LazyLineContentAdapter, we copied it as LazyTableScrollbarAdapter
- [ ] LazyTableAnimateScrollScope, we copied it as LazyTableAnimateScrollScope
- [ ] AwaitFirstLayoutModifier, we copied it in AwaitFirstLayoutModifier
- [ ] Modifier.lazyLayoutSemantics, need a both orientation supported impl
- [ ] LazyLayoutBeyondBoundsModifierLocal, need make it public
- [ ] PrefetchHandle, need make it not sealed to support prefetch
- [ ] Prefetcher, need make it public to support prefetch
Screenshots
https://github.com/JetBrains/jewel/assets/9367842/fd414014-39cc-47ae-987a-135351681954
https://github.com/JetBrains/jewel/assets/9367842/91f6fcd5-29d7-4370-97a6-dcf5a7d81f74
https://github.com/user-attachments/assets/f2f2214b-674b-4ebc-8134-ad0a286c866c
https://github.com/user-attachments/assets/befccf1f-f143-44ca-9160-98ccbe046402
Closes #61