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

[WIP] Offline first product edition #3072

Merged
merged 19 commits into from
May 26, 2020
Merged

Conversation

philippeauriach
Copy link
Collaborator

@philippeauriach philippeauriach commented Apr 19, 2020

This PR is a work in progress. It aims to provide an offline first product creation / edition workflow.

Main goal is to always use the actual "offline" persisting solution (instead of checking if network is there, or waiting for the network to fail to fall down to offline), and create a periodic background job that will perform the upload.

Most of the methods used to upload data / pictures in OfflineProductService comes from the old OfflineEditFragment.

@philippeauriach philippeauriach force-pushed the offline-first-product-edition branch 3 times, most recently from d18c2e1 to a934132 Compare April 19, 2020 21:08
@philippeauriach philippeauriach self-assigned this Apr 19, 2020
@teolemon
Copy link
Member

teolemon commented May 3, 2020

Things working well:

  • On the offline product addition, it does update well.
  • upload is really fast, and save is instant.
  • The background upload works

Issues

(For the editors check when fixed)

Needs testing

  • Background upload would need to be tested on older versions of Android, and on background activity stop agressive smartphone brands
  • Now that all queries go offline first, we need to check what happens to Authentification with a degraded network. Previously, you could only add a new product anonymously. I suspect you might be either: (1) be able to edit anonymously or (2) not be able to add a new product anonymously >> What's the current status ?

@teolemon teolemon added editing Issues relating to allowing the user to edit products WIP Issues or PRs that are currently in development labels May 4, 2020
@philippeauriach

This comment has been minimized.

@teolemon

This comment has been minimized.

@philippeauriach

This comment has been minimized.

@teolemon

This comment has been minimized.

@teolemon

This comment has been minimized.

@philippeauriach

This comment has been minimized.

@raphael0202

This comment has been minimized.

@philippeauriach

This comment has been minimized.

@raphael0202
Copy link
Collaborator

raphael0202 commented May 10, 2020

Two behaviors to fix:
1.

  • scan a new product
  • add the missing front image by clicking on the image logo in the product header
  • once the photo is validated, we go back to the continuous scan activity, instead of staying on the product page
  • Scan a new product
  • Edit it, save the edit
  • the keyboard is still displayed when we go back to the product page

@raphael0202
Copy link
Collaborator

There is also an issue with the product history, it seems I switch between 2 product history lists.

@philippeauriach philippeauriach force-pushed the offline-first-product-edition branch 2 times, most recently from 449ad30 to 5a4f8da Compare May 10, 2020 15:35
@stephanegigandet
Copy link

Not sure if this is related to the new version: when I add a new product, the focus is on the "Expiration date" field, I don't see the top of the form.

Also, I think this field should be removed from the mobile app.

image

@stephanegigandet
Copy link

It's not the expiration date field in fact, it's the period after of opening. Which we don't have on OFF (we do on OBF).

@teolemon
Copy link
Member

Thanks @stephanegigandet I could reproduce it, only on initial addition.

@teolemon
Copy link
Member

I have filed a separate issue for the Best Before issue: #3124

@teolemon teolemon mentioned this pull request May 16, 2020
@philippeauriach philippeauriach force-pushed the offline-first-product-edition branch from 5a4f8da to 2540a49 Compare May 21, 2020 15:21
@teolemon
Copy link
Member

@philippeauriach reports the back to scan screen is in master. So I see no objection for merging, although I'd like this behaviour fixed before release (this is a regression vs production)

@philippeauriach philippeauriach marked this pull request as ready for review May 26, 2020 15:43
@philippeauriach philippeauriach removed WIP Issues or PRs that are currently in development editing Issues relating to allowing the user to edit products labels May 26, 2020
@philippeauriach philippeauriach force-pushed the offline-first-product-edition branch from 2540a49 to 77fcca9 Compare May 26, 2020 15:55
@teolemon teolemon merged commit 0ec71c6 into master May 26, 2020
@teolemon teolemon deleted the offline-first-product-edition branch May 26, 2020 16:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants