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

Migration to Navigator 2.0 #1313

Closed
2 tasks
Tracked by #2515
g123k opened this issue Mar 23, 2022 · 12 comments
Closed
2 tasks
Tracked by #2515

Migration to Navigator 2.0 #1313

g123k opened this issue Mar 23, 2022 · 12 comments

Comments

@g123k
Copy link
Collaborator

g123k commented Mar 23, 2022

What

Feel free to comment if you have better ideas.

Before starting, here are the required steps:

  • Identify a library
  • List all internal routes

Part of

@g123k g123k self-assigned this Mar 23, 2022
@monsieurtanuki
Copy link
Contributor

Feel free to comment if you have better ideas.

I don't have better ideas but I feel free to comment all the same :)

As far as I understand the way GoRouter works, that means that all our pages should be similar to a URL, for instance /product/12345 for product page with barcode 12345. That's fine by me.
Be careful with the awkward home page with 3 tabs; that's probably not going to be the easiest part.
Good luck!

@M123-dev
Copy link
Member

Yes I share the same opinion. It will certainly not be the easiest undertaking but is probably unavoidable for some things.
If you have any question about any design decisions feel free ask

@g123k
Copy link
Collaborator Author

g123k commented Mar 23, 2022

@monsieurtanuki That's exactly what you've described. I think I will list all the possible routes before starting anything.

I know, this will take some time to develop, but when it will be done, the app will be fully compatible with web (even if that's not a priority) and able to handle deep links.

@teolemon
Copy link
Member

It's also very important to acquire user at scale. We have 2 M monthly visitors on the mobile website, and web browsers can offer to install/open the app with associated URL schemes

@monsieurtanuki
Copy link
Contributor

@teolemon Probably that means that the website URLs must match the app route URLs. Is that possible?...

@g123k
Copy link
Collaborator Author

g123k commented Mar 23, 2022

I am not fully sure that it would be a nice idea to have the same routes, as the navigation within the app will be different.

Basically, it's the same as using the same models between an API and the UI. The day we have an external change, we shouldn't be impacted.

@monsieurtanuki
Copy link
Contributor

@g123k I'm not saying it would be a nice idea: it's rather a fear that we will need that. Without that I don't know how you can expect a URL to be correct on the website and correct also on the app as deep link so that it will trigger the app download (if relevant) and the display on the app of the correct page. But I've never implemented deep link, I'm probably missing something :)

@teolemon
Copy link
Member

@monsieurtanuki we just grabbed the barcode in the native versions.
we then had something like app://whatever:barcode
https://github.com/openfoodfacts/openfoodfacts-androidapp/pull/2862/files

@monsieurtanuki
Copy link
Contributor

@teolemon Now with the code I remember more or less: the first thing is to catch the intent from a root URL (e.g. https://smoothie.org/) and then to extract the parameters from the full URL in order to know which page we should display. Therefore no need for the website URLs and the app route URLs to be identical, as long as you code the transformation from the former to the latter.

@monsieurtanuki
Copy link
Contributor

@g123k Still working on it? I've just had a look at Sentry reports that all refer to the same spot, and I guess implementing a more refined navigation would be rather helpful.
Capture d’écran 2022-06-20 à 09 46 09

@g123k
Copy link
Collaborator Author

g123k commented Jun 20, 2022

Yes, I will (re)work on it ASAP.
This feature was judged non essential for the initial release, but now it is

@teolemon
Copy link
Member

teolemon commented Aug 25, 2022

Repository owner moved this from Todo (ready 2 dev) to Done in 🤳🥫 The Open Food Facts mobile app (Android & iOS) Aug 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

5 participants