Git Product home page Git Product logo

Comments (5)

hrach avatar hrach commented on May 29, 2024

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.

hrach avatar hrach commented on May 29, 2024

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.

StylianosGakis avatar StylianosGakis commented on May 29, 2024

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.

hrach avatar hrach commented on May 29, 2024

Kiwi.com motivations having it handled externally are:

  1. Handling BCs, preprocessing, etc.
  2. Historical reasons - we are not 100% navigation composed.
  3. 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.

StylianosGakis avatar StylianosGakis commented on May 29, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.