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

Simple scan activity #4214

Closed
naivekook opened this issue Sep 3, 2021 · 4 comments
Closed

Simple scan activity #4214

naivekook opened this issue Sep 3, 2021 · 4 comments

Comments

@naivekook
Copy link
Contributor

Is your feature request related to a problem? Please describe.
Right now we use ContinuousScanActivity everywhere we need to scan the product, it leads to the situation when we have different pieces of logic for different use cases in one activity
for example, in comparison mode when you open this activity and scan the product you can see for half a sec the bottom view with product details (timing 0:08 in this video https://drive.google.com/file/d/1SW9ILafVQ51YOtv6LpO-hs1cWC55f5UR/view) and under the hood it also does some logic which is unnecessary for the current use case
also in this scan activity you can open other different screens because the bottom navigation bar is available here, that is not very good UX imo, because the user quitting from flow of adding the product

Describe the solution you'd like
I want to create an additional SimpleScanActivity that will just do the scan and return the result back. Single responsibility and simple to use.

Describe alternatives you've considered
Refactor ContinuousScanActivity to support all scan modes, but it is quite hard and requires a lot of time + we have a risk to break the build for users.

@naivekook
Copy link
Contributor Author

@VaiTon @teolemon needs your opinion

@VaiTon
Copy link
Member

VaiTon commented Sep 3, 2021

How would you avoid duplicating things?

@naivekook
Copy link
Contributor Author

@VaiTon do you mean any particular thing or duplication in general?

My thoughts that it will be duplication only in layout for barcode scanner and some logic which retrieve barcode from scanner and call API for product.

This is tradeoff and on one side we have let's say "feature duplication" but on other side we have better UX, less API calls, more simple and straightforward logic. Plus we can write tests on this.

@VaiTon
Copy link
Member

VaiTon commented Sep 6, 2021

Ok then, you can proceed! @naivekook

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants