Comments (5)
My POV: any serious deep-linking should be separate from the navigation stack, i.e. have a separate URL parser that constructs the destination and then navigates "programmatically".
Anyway, I'll accept a PR using a name instead of an ordinal, though the issue stays - it's kind of implementation detail.
from navigation-compose-typed.
I'll accept a PR using a name instead of an ordinal, though the issue stays - it's kind of implementation detail.
I was thinking about this change a few days ago - but my motivation was clarity when debugging (we send those navigation urls to Sentry as breadcrumbs)
from navigation-compose-typed.
have a separate URL parser that constructs the destination and then navigates "programmatically".
Not 100% sure I follow here. Could you elaborate a bit on this? I do like the fact that androidx.navigation kinda handles everything for you normally even for deep links, as long as they are constructed well, with the right parameter names etc.
Is whatever you've done here to fix this issue instead also something that you could share? I'm quite curious.
And changing it to the name even for debugging purposes is interesting, so I do wonder if and how many people may have been relying on the existing behavior with the numbers where such a bump would break them. And if so, what could they do to keep this working again?
from navigation-compose-typed.
Kiwi.com motivations having it handled externally are:
- Handling BCs, preprocessing, etc.
- Historical reasons - we are not 100% navigation composed.
- Some additional logic (landing to a splash activity that redirects to other activities).
Also, I like the concise nav-graph definition and expanding the def with deeplinks is quite making the hierarchy less readable.
I do wonder if and how many people may have been relying on the existing behavior with the numbers where such a bump would break them. And if so, what could they do to keep this working again?
TBH no idea here - I even don't know how exactly that works as I have never used it.
from navigation-compose-typed.
I see yeah, different requirements indeed.
Just to give you some context on how we have been using this is that you use this library normally, and define your route like this, where the screen is this and the deeplink is this and all this works perfectly fine since there are no arguments or whatever involved, simple.
Where they are involved, it's the same setup, but what I had done is try to kinda go backwards from what this library generates as a route for a destination, taking into consideration how some things are optional arguments, some go in the path etc, and then write the route myself adding the right name from the parameter name, with the line
override val uriPattern: String = "$baseDeepLinkDomain/chat?$chatContextParameterName={$chatContextParameterName}"
in this draft PR where I was looking into this.
But I see your point as to how this library is not necessarily 100% focused on making that part work. If you have any more thoughts on this I'd love to hear them, if not I will see if I can come up with something better for ourselves, and share it here. Otherwise I might just do this manual work as I show in that draft PR and go from there 😊
from navigation-compose-typed.
Related Issues (18)
- Dependency Dashboard
- Method to get current destination HOT 1
- Add proguard rules HOT 4
- DialogResultEffect is called after navigateUp is called HOT 4
- Default arguments for startDestination HOT 5
- Add an option to `popUpTo` a specific destination HOT 5
- Consider supporting the accompanist navigation library which has animation support HOT 2
- Consider enabling registering serializers for types coming from third party libraries inside destination classes HOT 3
- Consider using the stable compose BOM instead of the alpha one from Chris Banes HOT 2
- Posibility to add more serializable types to the `SerializersModule` that this library is using, which aren't necessary of the `Destination` type. HOT 4
- How to access destination arguments in a ViewModel via the SavedStateHandle? HOT 12
- Nested NavHost leads to SerializerAlreadyRegisteredException HOT 1
- Include bottomSheet() in library? HOT 1
- Add size transform argument
- ResultDestination with sealed interface as result acting unpredictably HOT 5
- Future because the native impl in Navigation 2.8 HOT 4
- Consider passing `AnimatedContentScope` to the composables HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from navigation-compose-typed.