You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The layout of items in a DetailedList currently allocates space for an icon, regardless of whether icons are provided. If you have a data source that contains no icons, this leads to a lot of wasted space in the layout.
Describe the solution you'd like
A flag on the constructor for DetailedList which specifies whether the list should attempt to render icons.
Describe alternatives you've considered
The API for this could take a number of forms:
A specific render_icons=True/False flag
Specifying an icon accessor name of None
Specifying an accessor list that only has 2 items, rather than 3.
A flag that is more than a simple True/False, but indicates a rendering "pattern" (i.e., "TitleSubtitleAndIcon", "TitleAndSubtitle"). This would allow adding other rendering patterns in future that might be of use (e.g., rendering the icon at a different size, or in a different place).
A full API for describing the layout of DetailedList items. This is essentially an extension of (4); we'd ship 2 default layouts (for with-icon and iconless title+subtitle layouts), but we'd allow the user to define their own layouts.
2 or 3 would be the easiest to implement solution; 5 would be the most comprehensive (but also the most complex).
Of course, the other option is the obligatory "do nothing", and require that icons are part of the rendering of DetailedList.
Additional context
As part of this, we should also consider how we could introduce multiline text content, especially for the subtitle element. The single-line content constraint (see #2343) is born of the need for every row in the list to have the same height. However, most DetailedList implementations will allow variable height content (e.g., a social media timeline where comments can be multiple lines).
Any API proposal for options 4 and 5 should also include the option of interactive elements on the list - e.g. buttons to "like" a social media post in the body of the post.
The text was updated successfully, but these errors were encountered:
What is the problem or limitation you are having?
The layout of items in a DetailedList currently allocates space for an icon, regardless of whether icons are provided. If you have a data source that contains no icons, this leads to a lot of wasted space in the layout.
Describe the solution you'd like
A flag on the constructor for DetailedList which specifies whether the list should attempt to render icons.
Describe alternatives you've considered
The API for this could take a number of forms:
render_icons=True/False
flagNone
2 or 3 would be the easiest to implement solution; 5 would be the most comprehensive (but also the most complex).
Of course, the other option is the obligatory "do nothing", and require that icons are part of the rendering of DetailedList.
Additional context
As part of this, we should also consider how we could introduce multiline text content, especially for the subtitle element. The single-line content constraint (see #2343) is born of the need for every row in the list to have the same height. However, most DetailedList implementations will allow variable height content (e.g., a social media timeline where comments can be multiple lines).
Any API proposal for options 4 and 5 should also include the option of interactive elements on the list - e.g. buttons to "like" a social media post in the body of the post.
The text was updated successfully, but these errors were encountered: