Skip to content

[IOS] - Fix error when running new template maui app on iOS#24567

Merged
PureWeen merged 12 commits into
dotnet:mainfrom
NirmalKumarYuvaraj:fix-22452
Sep 11, 2024
Merged

[IOS] - Fix error when running new template maui app on iOS#24567
PureWeen merged 12 commits into
dotnet:mainfrom
NirmalKumarYuvaraj:fix-22452

Conversation

@NirmalKumarYuvaraj

@NirmalKumarYuvaraj NirmalKumarYuvaraj commented Sep 2, 2024

Copy link
Copy Markdown
Contributor

Root Cause

When we create a Shell page, a warning is shown. This warning occurs because the UITableView is attempting to layout its visible cells while it is not properly attached to the view hierarchy.

Description of Change

To address this issue, we added a condition to check if uITableView.Window is not null. This ensures that the UITableView is attached to a window before retrieving its visible cells. By doing this, we prevent the UITableView from trying to layout its cells when it is not in a valid state, thereby avoiding the warning.

Issues Fixed

Fixes #24525
Fixes #22452

Output

@dotnet-policy-service dotnet-policy-service Bot added the community ✨ Community Contribution label Sep 2, 2024
@samhouts samhouts added the area-controls-shell Shell Navigation, Routes, Tabs, Flyout label Sep 4, 2024
@NirmalKumarYuvaraj NirmalKumarYuvaraj marked this pull request as ready for review September 4, 2024 13:17
@NirmalKumarYuvaraj NirmalKumarYuvaraj requested a review from a team as a code owner September 4, 2024 13:17
@jfversluis

Copy link
Copy Markdown
Member

/azp run

@azure-pipelines

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

@PureWeen PureWeen left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

NavigationBetweenFlyoutItems looks like a legitimate failure

Bugzilla28570Test you can ignore

@NirmalKumarYuvaraj

Copy link
Copy Markdown
Contributor Author

@PureWeen, I've fixed the issue with NavigationBetweenFlyoutItems and I hope that the test case will pass without any failures

@PureWeen

PureWeen commented Sep 9, 2024

Copy link
Copy Markdown
Member

/azp run

@azure-pipelines

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

@PureWeen PureWeen enabled auto-merge (squash) September 9, 2024 18:38

@PureWeen PureWeen left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

unfortunately, this automationid's don't work on WinUI Flyout Items

[Category(UITestCategories.Shell)]
public void NavigationBetweenFlyoutItems()
{
App.WaitForElement("FlyoutItem1");

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

aw dang

unfortunately this automationid's don't work on WinUi it looks like

NavigationBetweenFlyoutItems is failing on windows.

You can add a templated flyout item and then just place a label inside of it and use that?

auto-merge was automatically disabled September 10, 2024 12:02

Head branch was pushed to by a user without write access

@azure-pipelines

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

@PureWeen PureWeen left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks like the test is still failing

If you want to replace the flyout item with your own template you can do this

https://learn.microsoft.com/en-us/dotnet/maui/fundamentals/shell/flyout?view=net-maui-8.0#define-flyoutitem-appearance

and then locate the items in the flyout that way

@azure-pipelines

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

@PureWeen PureWeen merged commit 19afb50 into dotnet:main Sep 11, 2024
@samhouts samhouts added the fixed-in-net9.0-nightly This may be available in a nightly release! label Oct 1, 2024
@samhouts samhouts added fixed-in-9.0.0-rc.2.24503.2 and removed fixed-in-net9.0-nightly This may be available in a nightly release! labels Oct 14, 2024
@NirmalKumarYuvaraj NirmalKumarYuvaraj deleted the fix-22452 branch October 18, 2024 05:57
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 17, 2024
@NirmalKumarYuvaraj NirmalKumarYuvaraj added the partner/syncfusion Issues / PR's with Syncfusion collaboration label Dec 6, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-controls-shell Shell Navigation, Routes, Tabs, Flyout community ✨ Community Contribution fixed-in-9.0.0-rc.2.24503.2 partner/syncfusion Issues / PR's with Syncfusion collaboration

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ios Shell Fix error when running new template maui app on iOS

4 participants