Skip to content

[iOS] Fixed the RemainingItemsThresholdReachedCommand not firing issue in CollectionView #26067

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

Merged
merged 6 commits into from
Jan 9, 2025

Conversation

Vignesh-SF3580
Copy link
Contributor

Issue Detail

The RemainingItemsThresholdReachedCommand is not triggered as expected on macOS and iOS platforms.

Root Cause

On macOS and iOS, the index of the items was only being updated based on the currently visible items. During scrolling, the index was not recalculated correctly, which caused the command to fail when the remaining items threshold was reached.

Description of Change

Updated the logic to ensure the index of items is recalculated accurately during scrolling. This change ensures that the RemainingItemsThresholdReachedCommand is triggered correctly when the threshold condition is met on macOS and iOS.

Tested the behaviour in the following platforms

  • Android
  • Windows
  • iOS
  • Mac

Issues Fixed

Fixes #25889

Screenshots

Before Issue Fix After Issue Fix
Before.Fix.mov
After.Fix.mov

@dotnet-policy-service dotnet-policy-service bot added the community ✨ Community Contribution label Nov 22, 2024
Copy link
Contributor

Hey there @Vignesh-SF3580! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed.

@Vignesh-SF3580 Vignesh-SF3580 marked this pull request as ready for review November 22, 2024 15:33
@Vignesh-SF3580 Vignesh-SF3580 requested a review from a team as a code owner November 22, 2024 15:33
@jsuarezruiz jsuarezruiz added platform/iOS 🍎 area-controls-collectionview CollectionView, CarouselView, IndicatorView labels Nov 22, 2024
@jsuarezruiz
Copy link
Contributor

/azp run

Copy link

Azure Pipelines successfully started running 3 pipeline(s).


[Test]
[Category(UITestCategories.CollectionView)]
public void RemainingItemsThresholdReachedCommandFired()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test is failing on iOS:

Assert.That(label.GetText(), Is.EqualTo("Command Fired!"))
Expected string length 14 but was 9. Strings differ at index 0.
Expected: "Command Fired!"
But was:  "Not fired"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've updated the code based on your feedback. Could you please review it and let me know if there are any further concerns

@jsuarezruiz
Copy link
Contributor

jsuarezruiz commented Nov 26, 2024

/azp run

This comment was marked as outdated.

1 similar comment

This comment was marked as outdated.

@sheiksyedm sheiksyedm added the partner/syncfusion Issues / PR's with Syncfusion collaboration label Dec 6, 2024
@jfversluis

This comment was marked as outdated.

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@rmarinho rmarinho merged commit 7a6b1af into dotnet:main Jan 9, 2025
104 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Feb 9, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-controls-collectionview CollectionView, CarouselView, IndicatorView community ✨ Community Contribution partner/syncfusion Issues / PR's with Syncfusion collaboration platform/iOS 🍎
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CollectionView with IsGrouped="True" - RemainingItemsThresholdReachedCommand not Firing
5 participants