Skip to content

RefreshContainer is not intuitive to use as a user (not developer) #15529

@gentledepp

Description

@gentledepp

Describe the bug

If the RefreshContainer is configured to refresh with PullDirection.TopToBottom and contains a list,

  • you have to drag the first list item down to initiate the "refresh"
    truncation

This is counterintuitive to most users.

Also: You have to klick into the list first (i.e. select an item of the list in the ControlGallery/RefreshContainer sample).
Then, with the second click, you can finally start the "pull2refresh" action:
truncation

To Reproduce

Run the ControlGallery app on iOS/Android and go to the RefreshContainer sample.
Try to refresh.

It took me very long (including looking up the code on github) to finally figure out that the first list item has to be dragged.

Expected behavior

On Android/iOS the behavior is typically as such:

Instead of having to drag down the first item of a list,
you can drag down on any part of the RefreshContainer.
If the list is not scrolled to the top, the this gesture is interpreted as a scroll gesture => the list scrolls up
If we are scrolled to the top of the list alreaedy (when using PullDirection.TopToBottom), the "refresh" logic kicks in.

truncation

This can be easily implemented by allowing to override the "canpull" in PullGestureRecognizer
image

And then overriding this in the ScrollViewerIRefreshInfoProviderAdapter:
image

Also, a list item should only be selected on "pointerUP", not on "pointerPRESSED". Because then, you do not have to

  • first select a list element
  • then drag it to start the "refresh" logic.

Avalonia version

11.1

OS

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugenhancementhelp-wantedA contribution from the community would be most welcome.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions