Skip to content

🧪 [Experiment] CompositionCollectionView, a composition-driven collection view with fully customizable look and behavior  #135

Open
@arcadiogarcia

Description

@arcadiogarcia

Approved from Discussion CommunityToolkit/WindowsCommunityToolkit#4565

Problem Statement (copied from Discussion):

While WinUI and the Community Toolkit provide a decent variety of ---View controls that can display their children using a particular layout and interaction model, all of them are relatively rigid and don't give the user full control over how the items are animated and positioned in the screen, nor provide a model for adding gestures and interactions to them (aside from forking the control).

Overview

This experiment adds the following components:

  • CompositionCollectionView, an UI control that hosts a collection of elements as defined in one or several Layouts
  • Layout, an abstract base class that is extended to define how elements should be positioned by the CompositionCollectionView
  • LayoutBehavior, an abstract base class that is extended to define behaviors (animations, gestures, logic...) that can be reused across layouts
  • InteractionTrackerBehavior, ElementInteractionTrackerBehavior.... a set of general-purpose behaviors that implement commonly needed functionality
  • InteractionTrackerGesture, an abstract class that can be extended for defining touch gestures that depend on an interaction tracker and can be attacked to a global interaction tracker (through InteractionTrackerBehavior) or a per-element interaction tracker (through ElementInteractionTrackerBehavior)

Using

You can try it out via the NuGet Package here: Link TBD
CommunityToolkit members can also try it out with Codespaces here: Link TBD

Implementation Requirements

Not all these items are required to submit a PR. This list is here to help track what is remaining to implement before a technical review and discussion of moving into the main repository can occur.

  • Working Prototype
  • Feature Complete
    • CompositionCollectionView / Layout
    • LayoutBehavior
    • General purpose behaviors
      • InteractionTrackerBehavior
      • InteractionTrackerElementBehavior
      • InteractionTrackerGesture
      • Drag/Drop behavior? Could be added later
  • Documentation
    • CompositionCollectionView
    • LayoutBehavior
    • General purpose behaviors
    • InteractionTrackerGesture
  • Samples
    • Basic sample
    • Canvas sample w/ implicit animations
    • Layout transition sample
    • Interaction tracker sample
    • 3d maze sample
  • Unit Tests
  • Community Feedback / Usage Testimonies
  • Partner/Inbox Application Need (can fast-track experiments with less community feedback)

Technical Review

These items can sometimes be done ahead of time, but are usually started and completed after all implementation details are finished.

  • Accessibility Audit
  • API/Naming Review
  • Code Quality/Style
  • Dependency Review
  • Design/Style Review
  • Final Approval

Metadata

Metadata

Assignees

Labels

experiment 🧪Used to track issues that are experiments (or their linked discussions)

Type

No type

Projects

Status

No status

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions