Skip to content

Commit

Permalink
docs(list): 📝 initial documentation for the ListView and List widgets
Browse files Browse the repository at this point in the history
Related-to: #124652
  • Loading branch information
joaomoreno committed Nov 11, 2021
1 parent cf35554 commit 902c672
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/vs/base/browser/ui/list/listView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,16 @@ class ListViewAccessibilityProvider<T> implements Required<IListViewAccessibilit
}
}

/**
* The {@link ListView} is a virtual scrolling engine.
*
* Given that it only renders elements within its viewport, it can hold large
* collections of elements and stay very performant. The performance bottleneck
* usually lies within the user's rendering code for each element.
*
* @remarks It is a low-level widget, not meant to be used directly. Refer to the
* List widget instead.
*/
export class ListView<T> implements ISpliceable<T>, IDisposable {

private static InstanceCount = 0;
Expand Down
15 changes: 15 additions & 0 deletions src/vs/base/browser/ui/list/listWidget.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1206,6 +1206,21 @@ class ListViewDragAndDrop<T> implements IListViewDragAndDrop<T> {
}
}

/**
* The {@link List} is a virtual scrolling widget, built on top of the {@link ListView}
* widget.
*
* Features:
* - Customizable keyboard and mouse support
* - Element traits: focus, selection, achor
* - Accessibility support
* - Touch support
* - Performant template-based rendering
* - Horizontal scrolling
* - Variable element height support
* - Dynamic element height support
* - Drag-and-drop support
*/
export class List<T> implements ISpliceable<T>, IThemable, IDisposable {

private focus = new Trait<T>('focused');
Expand Down

0 comments on commit 902c672

Please sign in to comment.