Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proposal: CarouselView control #771

Open
micahl opened this issue May 29, 2019 · 8 comments
Open

Proposal: CarouselView control #771

micahl opened this issue May 29, 2019 · 8 comments
Labels
area-ItemsRepeater area-Lists ListView, GridView, ListBox, etc feature proposal New feature proposal proposal-NewControl This proposal might involve creating a new control team-Controls Issue for the Controls team

Comments

@micahl
Copy link
Contributor

micahl commented May 29, 2019

Proposal: CarouselView control

Carousel control

Summary

A CarouselView control would provide a smooth carousel experience for browsing items in a collection, focusing on one at a time. It would support wrap around behavior and expose a basic set of options to configure the scaling and offset of non-selected items.

Rationale

  • A carousel UX is an existing gap in the control set.
  • The existing FlipView control is close, but it is designed to display only a single item at a time without the ability to have additional items on screen or peeking in from the sides.

Scope

Capability Priority
Ability to resize the secondary items (i.e. all except for the center) separately from the selected item (i.e. the center item) Must
Support for enabling/disabling wrap around Must
Basic configuration options including item scale and offset Must
Support a glyphic indicator (see #602) Should
Support for shadows on the items Should
Advanced configuration options (TBD) Could

Important Notes

Existing carousel controls often provide many variations. It's unclear how many of those are used in practice. Some common variations that seem useful that the control ought to enable are:
image

image

image

Open Questions

  • Are there variations other than the ones above that you’d expect to see supported?
  • If the control were initially restricted to the following set of options for configuring the appearance, what else would be most critical to include? Are there examples you can reference to illustrate how it would be used in context of a larger experience?
    • Horizontal/Vertical orientation
    • Scaling the non-selected (off-center) item
    • Spacing between items
    • Enabling/disabling wrap-around
  • Does it matter to you if this were a new control versus an attempt to update the existing FlipView control?
@micahl
Copy link
Contributor Author

micahl commented May 30, 2019

#764 is related

@jevansaks jevansaks moved this from Needs triage to Backlog in Controls Triage May 30, 2019
@Palatis
Copy link

Palatis commented Jun 1, 2019

use the one in Windows Community Toolkit instead?

https://docs.microsoft.com/zh-tw/windows/communitytoolkit/controls/carousel

@micahl
Copy link
Contributor Author

micahl commented Jun 2, 2019

That might be ok for an app written in C#, but undesirable for apps written in native code. A managed code implementation, such as the one in the community toolkit, introduces additional overhead. Having a high-quality implementation in WinUI should be useable by either.

@harvinders
Copy link

harvinders commented Jun 3, 2019

@micahl

  1. It would be great to have support for the keyboard and controller based navigation built in, especially if there are more than one CarouselViews that are stacked vertically (e.g video streaming apps).

  2. Also, The fourth variation could be page flipping.

  3. Support for shadows in variation 2, 3 and 4

@micahl
Copy link
Contributor Author

micahl commented Jun 3, 2019

@harvinders, yes, it would need to support keyboard and gamepad navigation. IIUC what you mean by page flipping then it would be something like my PowerPoint mockup below, right?
image

That also seems like a common UI pattern used in apps (especially media-focused apps that you might find on an Xbox). I'm torn on whether that should be covered by this control or something else.

They're very similar in visual appearance. There might also be some subtle behavioral differences that arise and impact the API. For example, carousel controls often show the selected item in a visually distinct way from the rest (e.g. zoomed in / centered) whereas that isn't true in a paging UX. The navigation model might also be subtly different. Should a PageUp/Down always move one item at a time when in the "carousel" mode or should it jump by multiple items at a time in a "page" mode. Accessibility might also be different.

@harvinders
Copy link

@micahl What I meant was something like below.

ezgif com-video-to-gif

You may come to the conclusion that it is more like a FlipView (maybe it should be possible to apply different sliding animations to FlipView).

I understand that the difference between FlipView and the proposed CarouselView is that multiple items are displayed and one is always selected. Is this correct? If that is correct we won't be able to use it for developing apps like Netflix where you have multiple rows (say CarouselView) vertically stacked, as per this proposal each CarouselView would have a selected item. Where as in video stream apps only one would be selected.

@micahl
Copy link
Contributor Author

micahl commented Jun 14, 2019

@harvinders thanks, that helps clarify. I see the CarouselView as providing a superset of functionality relative to the FlipView.

I'm not discounting the possibility of a CarouselView being used in a situation like Netflix's UI. I don't have a good feel yet for whether there are subtle differences that would result in an unwieldy API or if it will be straightforward to flip a few bits and get the desired one.

On a related note, I can see someone using a CarouselView in a vertical orientation to present each row in a Netflix-like UI. That assumes each row has the same height. I don't think the control would handle a situation where items vary in size.

@JustinXinLiu
Copy link

Actually, it’s fairly simple to have this Carousel control to support a Netflix-like UI.

All you need to do is to have multiple Carousels stacked vertically with SelectionMode set to None. And then you just monitor the ItemClick event to display your selected item.

@micahl micahl added area-ItemsRepeater area-Lists ListView, GridView, ListBox, etc labels Aug 12, 2019
@micahl micahl removed their assignment Aug 12, 2019
@jevansaks jevansaks added the team-Controls Issue for the Controls team label Nov 7, 2019
@ranjeshj ranjeshj added the proposal-NewControl This proposal might involve creating a new control label Apr 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-ItemsRepeater area-Lists ListView, GridView, ListBox, etc feature proposal New feature proposal proposal-NewControl This proposal might involve creating a new control team-Controls Issue for the Controls team
Projects
Development

No branches or pull requests

6 participants