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 MAUI RoutedViewHost Navigation #3692

Merged
merged 2 commits into from Dec 7, 2023

Conversation

idotta
Copy link
Contributor

@idotta idotta commented Dec 5, 2023

What kind of change does this PR introduce?

Bug fix

What is the current behavior?

#3640 When 'RoutedViewHost' is activated, it calls 'SyncNavigationStacksAsync', which pushes a page for the current ViewModel. However, the Router.Navigate subscription is also triggered, creating and pushing a new page for the same ViewModel.

What is the new behavior?

To fix this, I filtered Navigate to execute the action only when the NavigationStacks have different sizes, since it seems that is what the Navigate subscription was supposed to do anyway. I think this makes the subsequent call to SyncNavigationStacksAsync() useless. Should I remove it?

What might this PR break?
RoutedViewHost Navigate subscription.

Please check if the PR fulfills these requirements

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

Other information:
I was informed that there were no tests for MAUI and no documentation seemed to be present either.

@glennawatson
Copy link
Contributor

Give me a day to read through all this and test etc.

Copy link

codecov bot commented Dec 6, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (f533f16) 58.38% compared to head (2560b63) 58.98%.

❗ Current head 2560b63 differs from pull request most recent head 2028d07. Consider uploading reports for the commit 2028d07 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3692      +/-   ##
==========================================
+ Coverage   58.38%   58.98%   +0.60%     
==========================================
  Files         160      160              
  Lines        5774     5774              
  Branches     1028     1028              
==========================================
+ Hits         3371     3406      +35     
+ Misses       2015     1980      -35     
  Partials      388      388              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@glennawatson
Copy link
Contributor

glennawatson commented Dec 6, 2023

Documentation is under https://github.com/reactiveui/website repo. At least user facing documentation. XML and inline comments used in the c# code

GitHub
ReactiveUI documentation and guidelines website. PR's welcome! 💖 - GitHub - reactiveui/website: ReactiveUI documentation and guidelines website. PR's welcome! 💖

@idotta
Copy link
Contributor Author

idotta commented Dec 6, 2023

Thank you for being so patient. I mentioned the documentation because I didn't know if there was anything I should add (just following the PR script). Maybe I didn't express myself very well.

@glennawatson
Copy link
Contributor

Alright done some basic checks. Seems alright. Will merge it in. I think we are waiting on a dynamicdata release before releasing the next version of the software.

@glennawatson glennawatson merged commit 14821ae into reactiveui:main Dec 7, 2023
1 check passed
@idotta idotta deleted the maui-bootstrap-navigate branch December 7, 2023 02:08
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants