Open alexsegura opened 1 year ago
I'm a bit confused about this code @lucasferraro
Why don't you dispatch an @app/SET_BASE_URL
event in _renderRestaurantsForTab()
function ?
This has the side effect of not changing/disconnecting the user connected to the application. Is this an intended effect ?
I'm a bit confused about this code @lucasferraro Why don't you dispatch an
@app/SET_BASE_URL
event in_renderRestaurantsForTab()
function ? This has the side effect of not changing/disconnecting the user connected to the application. Is this an intended effect ?
@r0xsh the code that make the change you are talking about is the following:
In the last code we're calling the action selectServer
which makes all the work related to reconnect the user to a new server.
Sorry, but why is this a problem? Is this a real life use case?
@alexsegura unless there is a reason to prioritize this, I´m going to move to backlog in a few days
Hi! For Ciudad de Mexico we need to support multiple instances in the app and the feature for multiple carts introduced with the custom app, at least in its original implementation, did not work for this case. There's an old PR open to fix that https://github.com/coopcycle/coopcycle-app/pull/1423 but I don't know if current state of the app works fine with that PR.
@lucasferraro But if i have different custom apps for different cooperatives, why do i need this feature? I would have just one cart on each app right? No longer linked?
Yeah but the main application should not crash in this case. And since custom apps are still not a thing, we need to support this. I'll take a look at this PR this Monday and I'll move it to backlog if it require time
I have a meeting with the ITDP people in México on monday, ill ask if they really want this, or if having custom apps solves this, because if custom apps solve this we should focus on that instead. At least i dont know of any other use case where this would be useful
ITDP said that they aren't sure if custom apps fixes this but it might. I'm going to put in suggested for future sprints category until we have more information.
It is because the carts are indexed by restaurant ID (the
@id
property). But when switching between instances in the same city, 2 restaurants may have the same@id
.