SDK: Design a new ListItem and layouts
Design a new ListItem component the is performant enough to be used in dynamic lists i.e ListView.
The idea is to split the component into a base item which handles the click, options, and all other building elements requred from a list item, and a set of layouts, which can be used or not together with the ListItem or other components, in case the functionality provided by the ListItem is not needed.
The new API documentation can be found under https:/
=========
UPDATES:
=========
* highlight automatic when action, left/right conditional actions or an active component or MouseArea are declared as content.
* we may need to provide highlight force property
* ListItemLayout and Captions should be the only standard layout helpers, ImageContainer and StandardLayout should be removed. Apps should be creating the layout themselves.
=======
Benchmarks with prototype:
Performance measurements with the ListItem prototype and the Ubuntu.
benchmark_
benchmark_
benchmark_
Present ListItems Standard and Subtitled comparison with StandardLayout.
benchmark_
675 msecs per iteration (total: 675, iterations: 1)
benchmark_
benchmark_
452 msecs per iteration (total: 452, iterations: 1)
benchmark_
956 msecs per iteration (total: 956, iterations: 1)
benchmark_
933 msecs per iteration (total: 933, iterations: 1)
benchmark_
612 msecs per iteration (total: 612, iterations: 1)
benchmark_
436 msecs per iteration (total: 436, iterations: 1)
benchmark_
864 msecs per iteration (total: 864, iterations: 1)
benchmark_
708 msecs per iteration (total: 708, iterations: 1)
Blueprint information
- Status:
- Complete
- Approver:
- Zoltan Balogh
- Priority:
- Undefined
- Drafter:
- Zsombor Egri
- Direction:
- Needs approval
- Assignee:
- Zsombor Egri
- Definition:
- Drafting
- Series goal:
- None
- Implementation:
- Implemented
- Milestone target:
- upcoming-15.04
- Started by
- Zsombor Egri
- Completed by
- Zsombor Egri
Related branches
- lp://staging/~zsombi/ubuntu-ui-toolkit/10-viewitem
- lp://staging/~zsombi/ubuntu-ui-toolkit/20-divider
- lp://staging/~zsombi/ubuntu-ui-toolkit/30-options
- lp://staging/~zsombi/ubuntu-ui-toolkit/35-options-panel-swipe
- lp://staging/~zsombi/ubuntu-ui-toolkit/thindivider-fix
- lp://staging/~zsombi/ubuntu-ui-toolkit/40-visualize-options
- lp://staging/~zsombi/ubuntu-ui-toolkit/45-selected-option-rebinds
- lp://staging/~zsombi/ubuntu-ui-toolkit/50-custom-delegates
- lp://staging/~zsombi/ubuntu-ui-toolkit/55-snap-options
- lp://staging/~zsombi/ubuntu-ui-toolkit/00-remove-unity-actions
- lp://staging/~zsombi/ubuntu-ui-toolkit/60-action-value-type
- lp://staging/~zsombi/ubuntu-ui-toolkit/65-last-divider-invisible
- lp://staging/~zsombi/ubuntu-ui-toolkit/67-fix-disabled-listitem
- lp://staging/~zsombi/ubuntu-ui-toolkit/80-selection-mode
- lp://staging/~zsombi/ubuntu-ui-toolkit/32-listitemactions-attached
- lp://staging/~zsombi/ubuntu-ui-toolkit/33-listitem-attached
- lp://staging/~zsombi/ubuntu-ui-toolkit/34-snap-animator
- lp://staging/~zsombi/ubuntu-ui-toolkit/listitem-master
- lp://staging/~zsombi/ubuntu-ui-toolkit/70-cpos
- lp://staging/~zsombi/ubuntu-ui-toolkit/75-listitem-highlight
- lp://staging/~zsombi/ubuntu-ui-toolkit/77-pressandhold
- lp://staging/~zsombi/ubuntu-ui-toolkit/78-action-property
- lp://staging/~zsombi/ubuntu-ui-toolkit/82-dragging-mode
- lp://staging/~zsombi/ubuntu-ui-toolkit/76-refactoring
- lp://staging/~zsombi/ubuntu-ui-toolkit/79-more-simplification
- lp://staging/~zsombi/ubuntu-ui-toolkit/79b-styling-reshufled
- lp://staging/~zsombi/ubuntu-ui-toolkit/83-rtl-support
- lp://staging/~zsombi/ubuntu-ui-toolkit/100-captions
- lp://staging/~zsombi/ubuntu-ui-toolkit/listitem_expansion
Related bugs
Sprints
Whiteboard
=======
BENCHMARKS
=======
The following benchmarks are updated every time an MR is attached to the BP
(last updated for 130-standardlayout)
These were done on debug build on a i7-Haswell VM.
"list with QtQuick Item":
51 msecs per iteration (total: 51, iterations: 1)
"list with new ListItem":
142 msecs per iteration (total: 142, iterations: 1)
"list with new ListItem with options":
178 msecs per iteration (total: 178, iterations: 1)
"list with new ListItem with inline options":
220 msecs per iteration (total: 220, iterations: 1)
"list of standard layout":
1,790 msecs per iteration (total: 1,790, iterations: 1)
"list of StandardLayout":
1,973 msecs per iteration (total: 1,973, iterations: 1)
"list of StandardLayout with options":
2,065 msecs per iteration (total: 2,065, iterations: 1)
Old list items Empty (equivalent to ListItem) and Standard (equivalent to StandardLayout):
"list with ListItems.Empty (equivalent to the new ListItem":
3,836 msecs per iteration (total: 3,836, iterations: 1)
"list with ListItems.Base (one icon, one label and one chevron)":
25,101 msecs per iteration (total: 25,101, iterations: 1)
Work Items
Work items:
[zsombi] ThinDivider color, margins and thickness fix: DONE
[zsombi] Text colors adjustment: DONE
[zsombi] Last item in a list not to have divider: DONE
[zsombi] ListItem and background: DONE
[zsombi] Add divider: DONE
[zsombi] Add ListItemOptions API: DONE
[zsombi] Implement swiping on ListItem: DONE
[zsombi] Implement configurable rebounding animation: DONE
[zsombi] Implement options visualization: DONE
[zsombi] Rebind list item content when option is selected : DONE
[zsombi] Custom delegates for options visualization: DONE
[zsombi] Snapping options when more than 50% gets visible: DONE
[zsombi] PREREQUISITE: Remove dependency from Unity Actions, move Acions type to C++: DONE
[zsombi] Action triggering to use value parameter to pass ListItem index: DONE
[zsombi] Publish leading, offset and visibleOptions properties in a style component to help custom delegate implementations: DONE
[zsombi] Last ListItem in a ListView has no divider: DONE
[zsombi] Fix disabled ListItem: DONE
[zsombi] Add ViewItems attached properties to parent item: DONE
[zsombi] Implement selection mode: DONE
[zsombi] Add pressAndHold() signal, prerequisite for UbuntuListView integration: DONE
[zsombi] Expose leading and panelColor properties in ListIyemOptions: DONE
[timp] Add samples to toolkit gallery: DONE
[zsombi] Provide helpers to handle global selection mode on a view: DONE
[zsombi] Add action property to ListItem to drive pressed and enabled behaviour: DONE
[zsombi] Implement Autopilot CPOs: DONE
[zsombi] Implement expanding pattern: TODO
Migrate ListItems.
[zsombi] Implement dragging (ListView reordering) feature: DONE
Identify minimal use cases: DONE
[zsombi] Define API for the layouts: DONE
[zsombi] Implement ListItemLayout: DONE
[zsombi] Implement Captions layout: DONE
[zsombi] Create StandardLayout: DONE
[zsombi] RTL support: DONE
[zsombi] Final review of components with design: DONE