Skip to content
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

fix: ios navbar lifecycle #1331

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

fix: ios navbar lifecycle #1331

wants to merge 2 commits into from

Conversation

rajamatt
Copy link
Contributor

@rajamatt rajamatt commented Jan 31, 2025

GitHub Issue (If applicable): closes https://github.com/unoplatform/uno.chefs/issues/1392

PR Type

What kind of change does this PR introduce?

  • Bugfix

What is the current behavior?

iOS NavigationBar lifecycle wasn't handled correctly since on iOS the NavBar is always UnLoaded by default when navigating away.

What is the new behavior?

Added OnLoaded for both iOS and Android NavigationBarPresenter

PR Checklist

Please check if your PR fulfills the following requirements:

Other information

Internal Issue (If applicable):

@rajamatt rajamatt self-assigned this Jan 31, 2025
Copy link

Azure Static Web Apps: Your stage site is ready! Visit it here: https://polite-field-01aa64f0f-1331.eastus2.azurestaticapps.net

@rajamatt rajamatt requested a review from kazo0 January 31, 2025 23:47
Comment on lines +20 to +27
<AppBarButton Click="NavigateBack"
Label="Close"
AutomationProperties.AutomationId="FluentPage2NavBarMainCommand"
Style="{StaticResource DefaultAppBarButtonStyle}">
<AppBarButton.Icon>
<BitmapIcon UriSource="ms-appx:///Assets/CloseIcon.png" />
</AppBarButton.Icon>
</AppBarButton>
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm curious about the need to add an AppBarButton here. We should be automatically displaying a default (native on mobile) button with the default Back arrow icon if no MainCommand is explicitly defined.

Was this just to facilitate the UI Tests to know what to tap? We should test both cases, one with a MainCommand defined, and one with no MainCommand defined. They should both be working the same way

@kazo0 kazo0 linked an issue Feb 3, 2025 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[iOS][NavigationBar] MainCommand not closing while in Flyout
2 participants