SwEnt-Group13 / Unio

The world’s largest campus life platform.
3 stars 1 forks source link

Continue to check for features that don't work in offline mode [CONTINUE IN SPRINT 8] #228

Open Zafouche opened 2 days ago

Zafouche commented 2 days ago

A couple of issues were raised in this issue:

Offline mode should work everywhere in the project, in theory(read and write queries). However I noticed that some operations do not work in offline mode:

Zafouche commented 2 days ago

I'm currently testing offline features from scratch, I will list in this comment what I find:

Event creation:

We should decide if we want to allow a user to create an event while offline. If we do, that means we should allow the user to give, to the location input, whatever he wants to write in. This means the user can also choose not to write an address, and put in whatever word or sentence they want. In offline mode, it wouldn't be possible to restrict this input field to a Location, which is pretty central to an Event, or else how would we know where the event is.

Possible solutions:

Either we allow the user to create an event w/o a location, just disallow the user to create an event w/o connection, or trust the user to put an actual address in the location field. [TO DISCUSS]

Search bars:

Possible solutions:

Check the implementation of the whole search bar mechanism.

Other problem:

While trying to use the search bar on the Explore screen, I noticed we cannot close the search bar's drop down menu by clicking elsewhere. We HAVE to click on a search result, but then it takes us to that result's association profile. This behavior should be fixed, and we should allow the user to close the drop down by clicking elsewhere on the screen.

Map:

Nothing is shown and the map doesn't load when we are in offline mode. This is because, from my research, the free google cloud service does not allow its API users to store the map offline: Maps premium enterprise API is required, meaning you have to pay.

EDIT: I hadn't loaded the map screen before cutting off the connection. It turns out, if we start the app with wifi, load the map once, then the map is cached on the phone. However, since Google's cloud services doesn't allow to download it, the map cache will be emptied after closing the app. But if we have loaded it, and cut off connection after that, we can load back in and browse through the map with no problem.

Possible solutions:

Switch to Open Street Map. I think we should do this, as having the events on the map could be useful. Although the user can still see their addresses in offline mode, and use the default maps app of the phone for GPS, we should consider this for optimized user experience. OSM gives the possibility to do this.

Saving an event:

When we press the heart button to save an event, it takes 3-4 seconds for it to be processed and show up in the Saved screen.

Possible solutions:

Not sure. The backend of the saving mechanism needs to be investigated to determine what causes it to be slow. But it works! But its slow.

Edit Profile:

When we gain back connection, it indeed uploads to changes made in offline mode to firebase, so that's great!

Possible solutions:

Check Edit profile UI logic, and the button / navigation mechanism.

Unrelated issues found while playing around:

Rest of the features:

Other than the above, the rest of the available features all work. We can browse through events and the explore screen, we can check out the specific event screen and association profiles, etc.

Zafouche commented 2 days ago

I will keep this issue open so that we can give updates directly to this issue when we fix something.

Give your opinions here, and take your pick of what you want to fix if it's not a problem that we need to discuss the solution for!

Edit: actually, I'll break these different issues into their own tasks, such that the discussions do not overlap.