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

[Navigation] Sample app needs to be changed for ToQuery/FromQuery usages #859

Open
kazo0 opened this issue Jan 15, 2025 · 0 comments · May be fixed by #860
Open

[Navigation] Sample app needs to be changed for ToQuery/FromQuery usages #859

kazo0 opened this issue Jan 15, 2025 · 0 comments · May be fixed by #860
Assignees

Comments

@kazo0
Copy link
Contributor

kazo0 commented Jan 15, 2025

The current samples for the ToQuery and FromQuery usages should be refactored.

Currently, we are embedding the query parameters as part of the actual route in the XAML attached property:

<muxc:NavigationViewItem uen:Region.Name="./ToFromQuery?QueryUser.Id=8a5c5b2e-ff96-474b-9e4d-65bde598f6bc"
Content="FromQuery User 1">
<muxc:NavigationViewItem.Icon>
<SymbolIcon Symbol="Link" />
</muxc:NavigationViewItem.Icon>
</muxc:NavigationViewItem>
<muxc:NavigationViewItem uen:Region.Name="./ToFromQuery?QueryUser.Id=2b64071a-2c8a-45e4-9f48-3eb7d7aace41"
Content="FromQuery User 2">
<muxc:NavigationViewItem.Icon>
<SymbolIcon Symbol="Link" />
</muxc:NavigationViewItem.Icon>
</muxc:NavigationViewItem>

We should instead be passing the QueryUser back and forth as the Navigation Data and allow the ToQuery and FromQuery delegates to do the work of build the route query parameters and extracting the parameters from the route path.

We should be demonstrating how to Navigate to and from these pages through XAML- and ViewModel-navigatoin
https://platform.uno/docs/articles/external/uno.extensions/doc/Learn/Navigation/HowTo-DefineRoutes.html#viewmap

related: unoplatform/uno.extensions#2672

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 a pull request may close this issue.

2 participants