Phase 6 updates

Phase 6 · Slice 36 ·

ListView editing

  • View controllers: CollectionViewController (source, ids, items by index and id, making and binding through the view, events), BaseListViewController (AddItems with the source's default values, Move, RemoveItem, RemoveItems, ClearItems, NeedsDragHandle, itemsAdded, itemsRemoved, itemsSourceSizeChanged) and ListViewController; viewController, CreateViewController and SetViewController on collection views. ClearItems tells one index fewer than it removed, and selections keep indices past the end, as Unity's do.
  • The add/remove footer (+ adds an item and selects it, - removes the selection and clears it, else the last; allowAdd and allowRemove disable the buttons; onAdd, onRemove, overridingAddButtonBehavior), the foldout header (a Foldout titled headerTitle holding the scroll view and footer) with the size field (a TextField: its text resizes the source), their classes on the list and scroll view.
  • Reorderable items: animated ones wrapped with a drag handle (two bars) and a container for the made item, simple ones as they are; changing reorderable or reorderMode rebuilds them. Dragging an item (by its handle when animated) and releasing over another moves it there (not compared: scripts can't drag in Unity).
  • Fixes on the way: NavigationEventBase.GetPooled called itself (a stack overflow for scripts making navigation events); collection views' scroll views have no name and scrollers' trackers show (transparent in Tassix's theme), as Unity's; arraySizeFieldUssClassName is Unity's unity-list-view__size-field.
  • Checked by ui_toolkit_list_editing (6000.3): defaults, class names, item structures in each reorder mode, the footer and its buttons, the header and size field, the controller's operations, ids and events.
  • Not yet: drag-reordering's animation and drop marker; TreeView's view controller.
  • Next: MultiColumnListView and MultiColumnTreeView.