Skip to content

Fix timing on iOS Toolbar#12363

Merged
PureWeen merged 6 commits intomainfrom
fix_ios_toolbar_quirks
Jan 18, 2023
Merged

Fix timing on iOS Toolbar#12363
PureWeen merged 6 commits intomainfrom
fix_ios_toolbar_quirks

Conversation

@PureWeen
Copy link
Copy Markdown
Member

@PureWeen PureWeen commented Dec 30, 2022

Description of Change

With MAUI we moved the code for processing Toolbar logic up into the xplat layer by way of an xplat Toolbar control. This allowed us to consolidate the toolbar logic that was copy and pasted across all platforms and between shell and non-shell. On iOS the shell toolbar management is handled by ShellPageToolbarTracker which gets instantiated for every single page. The code inside that tracker needs to ignore any toolbar updates if it's not the currently visible page.

iOS is also a little bit tricky to wire up with regards to timing the back button title text. The BackButton text is based on the UIViewController.NavigationItem of the previous page so we have to pull the BackButtonBehavior off the incoming page and set it on the NavItem of the previous page before the current page is visible. NavigationPage gets around this by making it so the user has to set NavigationPage.BackButtonTitle on the previous page. NavigationPage basically replicates how iOS propagates back button text where as Shell lets you set the back button text on the currently visible page.

Issues Fixed

Fixes (but reverted) #10945
Fixes (but reverted) #11691
Fixes (but reverted) #9269
Fixes (but reverted) #9842
Fixes (but reverted) #9687

@Eilon Eilon added area-controls-shell Shell Navigation, Routes, Tabs, Flyout area/toolbar labels Jan 4, 2023
@PureWeen
Copy link
Copy Markdown
Member Author

PureWeen commented Jan 5, 2023

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 2 pipeline(s).

@PureWeen PureWeen force-pushed the fix_ios_toolbar_quirks branch from 3579544 to e42d629 Compare January 6, 2023 20:10
@PureWeen PureWeen marked this pull request as ready for review January 6, 2023 22:03
@rachelkang rachelkang self-requested a review January 12, 2023 20:57
Copy link
Copy Markdown
Member

@rachelkang rachelkang left a comment

Choose a reason for hiding this comment

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

Looks awesome!! Just had a couple questions and nitpick edits, but overall lgtm :)

@PureWeen PureWeen force-pushed the fix_ios_toolbar_quirks branch from 6cd9aec to d13d16c Compare January 18, 2023 03:41
@PureWeen PureWeen requested a review from rachelkang January 18, 2023 03:42
@PureWeen PureWeen enabled auto-merge (squash) January 18, 2023 12:06
@PureWeen
Copy link
Copy Markdown
Member Author

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 2 pipeline(s).

@PureWeen PureWeen merged commit d2a0048 into main Jan 18, 2023
@PureWeen PureWeen deleted the fix_ios_toolbar_quirks branch January 18, 2023 16:47
rmarinho added a commit that referenced this pull request Jan 19, 2023
This reverts commit d2a0048.

# Conflicts:
#	src/Controls/tests/DeviceTests/Elements/NavigationPage/NavigationPageTests.cs
rmarinho added a commit that referenced this pull request Jan 20, 2023
This reverts commit d2a0048.

# Conflicts:
#	src/Controls/tests/DeviceTests/Elements/NavigationPage/NavigationPageTests.cs
@github-actions github-actions bot locked and limited conversation to collaborators Dec 14, 2023
@samhouts samhouts added the fixed-in-8.0.0-preview.1.7762 Look for this fix in 8.0.0-preview.1.7762! label Aug 2, 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 area-controls-toolbar ToolBar fixed-in-8.0.0-preview.1.7762 Look for this fix in 8.0.0-preview.1.7762! platform/ios

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants