Skip to content

[iOS] PullToRefresh activity indicator improvements - fix - #20824

Merged
jfversluis merged 2 commits into
dotnet:inflight/currentfrom
kubaflo:ios-hidden-activity-indicator-fix
Aug 11, 2025
Merged

jfversluis merged 2 commits into
dotnet:inflight/currentfrom
kubaflo:ios-hidden-activity-indicator-fix

Conversation

@kubaflo

@kubaflo kubaflo commented Feb 24, 2024 •

Copy link
Copy Markdown
Contributor

Issues Fixed

Fixes #20723
Fixes #24960

Before After
bug.mp4
fixed.mp4
Simulator.Screen.Recording.-.iPhone.15.Pro.Max.-.2024-10-15.at.11.33.09.mp4
Simulator.Screen.Recording.-.iPhone.15.Pro.Max.-.2024-10-15.at.11.28.24.mp4

The same issue happens with CV2
#20824 (comment)

<Grid RowDefinitions="*">
    <RefreshView IsRefreshing="False">
        <CollectionView>
            <CollectionView.Header>
                <ContentView HeightRequest="200"
                                BackgroundColor="Green"/>
            </CollectionView.Header>
            <CollectionView.ItemsSource>
                <x:Array Type="{x:Type x:String}">
                    <x:String>Item 1</x:String>
                    <x:String>Item 2</x:String>
                    <x:String>Item 3</x:String>
                </x:Array>
            </CollectionView.ItemsSource>
        </CollectionView>
    </RefreshView>
</Grid>

@kubaflo
kubaflo requested a review from a team as a code owner February 24, 2024 15:41
@ghost ghost added the community ✨ Community Contribution label Feb 24, 2024
@ghost

ghost commented Feb 24, 2024

Copy link
Copy Markdown

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

@ghost ghost added the legacy-area-controls Label, Button, CheckBox, Slider, Stepper, Switch, Picker, Entry, Editor label Feb 26, 2024
await Task.Delay(500);

//The test passes if the activity indicator is above the header
VerifyScreenshot();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

ValidateScreenshot will compare the screenshots pixel by pixel. Taking into account the animation of the position of the loading indicator as well as the rotation of the indicator itself, I would say that it would be better to create a device test to validate that it is within a range as well as the size.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

You're right this test will probably fail in most of the cases. However, I'm not sure if the device test will be useful in this case. Maybe we should just not write a test for this issue?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Yeah, i think in this case have sense a tests checking Frames etc. Take a look to the GetRect extension method used in UITests. Let me know if need help with something.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

image
The snapshot, with the loading indicator is not a valid option.

Also, can bind the status to a Label, and check in the test the text value Example: "Loading", "Not Loading".

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I'm not sure how to get frames of this indicator in any other way than using XPath
Screenshot 2024-04-16 at 19 32 26

@jsuarezruiz

Copy link
Copy Markdown
Contributor

/azp run MAUI-UITests-public

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@jsuarezruiz

Copy link
Copy Markdown
Contributor

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 3 pipeline(s).

@Eilon Eilon removed the legacy-area-controls Label, Button, CheckBox, Slider, Stepper, Switch, Picker, Entry, Editor label May 10, 2024
@dotnet dotnet deleted a comment from azure-pipelines Bot Jun 13, 2024
@jsuarezruiz

jsuarezruiz commented Jun 13, 2024 •

Copy link
Copy Markdown
Contributor

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 3 pipeline(s).

@kubaflo
kubaflo force-pushed the ios-hidden-activity-indicator-fix branch from 5ebde61 to d17ded2 Compare July 20, 2024 00:30
@taenito

taenito commented Sep 19, 2024

Copy link
Copy Markdown

Any news on this bug? This is one of the latest bugs preventing us from publishing our application.

@metalium84

Copy link
Copy Markdown

Same for me... is there a timeline to finally fix this bug?

@kubaflo
kubaflo force-pushed the ios-hidden-activity-indicator-fix branch from d17ded2 to 70d4639 Compare September 20, 2024 12:20
@kubaflo

kubaflo commented Sep 20, 2024

Copy link
Copy Markdown
Contributor Author

Here we go again lol. Hi, @metalium84 @taenito The MAUI team's priorities are not up to me, but you can have this fix in your app by following this @jfversluis's video if it is a major blocker for your migration https://www.youtube.com/watch?v=B2FOBjZKm9k&t=301s&pp=ygUWZ2VyYWxkIG1hdWkgcHIgdGVzdGluZw%3D%3D

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 3 pipeline(s).

@jfversluis

Copy link
Copy Markdown
Member

Here we go again lol. Hi, @metalium84 @taenito The MAUI team's priorities are not up to me, but you can have this fix in your app by following this @jfversluis's video if it is a major blocker for your migration https://www.youtube.com/watch?v=B2FOBjZKm9k&t=301s&pp=ygUWZ2VyYWxkIG1hdWkgcHIgdGVzdGluZw%3D%3D

If you do test this out and let us know if this works for you that will give us more confidence that this is a right fix and we can merge it sooner. So please let us know, thanks!

@taenito

taenito commented Sep 26, 2024

Copy link
Copy Markdown

I tested the branch and the loader is no longer hidden behind the header.

We still have a lot of bugs with the RefreshView on iOS (I will open news issues) but for me, this MR works well for the given issue.

@kubaflo

kubaflo commented Sep 27, 2024

Copy link
Copy Markdown
Contributor Author

@taenito cool! Thanks for confirming it!

@kubaflo kubaflo changed the title [iOS] PullToRefresh activity indicator hidden behind header in CollectionView - fix [iOS] PullToRefresh activity indicator improvements - fix Oct 15, 2024
@kubaflo
kubaflo force-pushed the ios-hidden-activity-indicator-fix branch from 70d4639 to fa05236 Compare October 15, 2024 09:45
@kubaflo

kubaflo commented Oct 15, 2024

Copy link
Copy Markdown
Contributor Author

Hi, @taenito I've also added a commit that fixes your second issue #24960

@jsuarezruiz

Copy link
Copy Markdown
Contributor

/rebase

@dotnet dotnet deleted a comment from azure-pipelines Bot Nov 15, 2024
@github-actions
github-actions Bot force-pushed the ios-hidden-activity-indicator-fix branch from fa05236 to 7909d39 Compare November 15, 2024 09:18
@jsuarezruiz

Copy link
Copy Markdown
Contributor

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 3 pipeline(s).

@kubaflo
kubaflo force-pushed the ios-hidden-activity-indicator-fix branch from 7909d39 to 2ef173c Compare March 8, 2025 01:53
@kubaflo kubaflo added area-controls-collectionview CollectionView, CarouselView, IndicatorView collectionview-cv2 labels Mar 8, 2025
@kubaflo

kubaflo commented Mar 8, 2025

Copy link
Copy Markdown
Contributor Author

This PR solves the same issue with CV2:

Screen.Recording.2025-03-08.at.02.56.37.mov

@kubaflo kubaflo self-assigned this Mar 8, 2025
@mattyjjpearce

Copy link
Copy Markdown

Hi - any update on this fix. Still not been reviewed by the looks of it?

@PureWeen PureWeen added this to the .NET 9 SR11 milestone Aug 4, 2025
@PureWeen PureWeen moved this from Todo to Ready To Review in MAUI SDK Ongoing Aug 4, 2025
@github-project-automation github-project-automation Bot moved this from Ready To Review to Approved in MAUI SDK Ongoing Aug 11, 2025
@jfversluis
jfversluis changed the base branch from main to inflight/current August 11, 2025 08:01
@jfversluis
jfversluis merged commit 7bf0d26 into dotnet:inflight/current Aug 11, 2025
@github-project-automation github-project-automation Bot moved this from Approved to Done in MAUI SDK Ongoing Aug 11, 2025
github-actions Bot pushed a commit that referenced this pull request Aug 11, 2025
* [iOS] Fixed hidden indicator

* [iOS] Fixed hidden indicator
github-actions Bot pushed a commit that referenced this pull request Aug 15, 2025
* [iOS] Fixed hidden indicator

* [iOS] Fixed hidden indicator
github-actions Bot pushed a commit that referenced this pull request Aug 15, 2025
* [iOS] Fixed hidden indicator

* [iOS] Fixed hidden indicator
github-actions Bot pushed a commit that referenced this pull request Aug 19, 2025
* [iOS] Fixed hidden indicator

* [iOS] Fixed hidden indicator
github-actions Bot pushed a commit that referenced this pull request Aug 22, 2025
* [iOS] Fixed hidden indicator

* [iOS] Fixed hidden indicator
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 10, 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 area-controls-refreshview RefreshView collectionview-cv2 community ✨ Community Contribution platform/ios

Projects

Status: Done

8 participants