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

Add a permanent scan history #3719

Closed
ayecptn opened this issue Feb 19, 2023 · 16 comments · Fixed by #4029
Closed

Add a permanent scan history #3719

ayecptn opened this issue Feb 19, 2023 · 16 comments · Fixed by #4029
Assignees
Labels
✨ enhancement New feature or request good first issue Good for newcomers 🎯 P1

Comments

@ayecptn
Copy link

ayecptn commented Feb 19, 2023

Problem

As someone who answers a lot of questions on the 'not-completed entries' tab, I cannot use the history to find my own scanned products.
I also cannot use the compare feature on the startpage, as I sometimes clear this list.

Proposed solution

Add a setting to automatically add scanned products to the list 'Scanned Products'.

After activating this setting scanned products get automatically added to the list.
Searching for a EAN does not add it to the list.

The list gets sorted sorted by last added.
The last 10-30 entries should be cached.

Part of

@monsieurtanuki
Copy link
Contributor

Hi @ayecptn!
I think we already have a "scan session" list, that gets deleted with the "clear" button on home page.
What you seem to need is a parallel "scan history" list, that gets each new scanned product (like "scan session"), but that does not get deleted by the "clear" button, right?
The next question is: from where would you get access to that list? From profile / my lists?

@ayecptn
Copy link
Author

ayecptn commented Feb 20, 2023

Yes, that is exactly what I need.

Profile / my Lists is the easiest solution I think.
Another idea that came to my mind right now is to add a tab in the history view. Then you would have 2 tabs in the history, one with all viewed products and one with all scanned products

@monsieurtanuki
Copy link
Contributor

Good!
Another option would be to add a filter in the history page, like "show all items / only the items I scanned".
Then, the question is: how do we keep UX consistency in the app? Why does it make sense to put tabs/filters only in history? Should we put tab/filters in all list pages?

@ayecptn
Copy link
Author

ayecptn commented Feb 21, 2023

Filters would be nice, but I think that should be handeled in another issue by itself.

@M123-dev
Copy link
Member

I have to agree with @monsieurtanuki the tab's idea isn't bad, but it cuts into the ux too much.

Would it be good for you to have a filter which stays even if you restart the app.

Somewhat similar to what @teolemon suggested in #1371

image

@monsieurtanuki
Copy link
Contributor

Anyway the first step is to

  • create the new "scanned history" list
  • add scanned products to the new "scanned history" list (as well as "scanned session" of course)

The UI/UX could be tested more consistently later with real data: filters? tabs?

@ayecptn
Copy link
Author

ayecptn commented Feb 22, 2023

@M123-dev I am completly fine with a filter.

@monsieurtanuki
Copy link
Contributor

Anyone ready to implement the "scanned history" product list?
I'm a bit stuck with a temporary limited access to my computer and a limited desire to lose 30 minutes each time I switch to/from flutter 3.0.5/3.7.3 between Smoothie and other projects.

@opxdelwin
Copy link

Hey, is this issue assigned? I'd love to work on it if not-

@monsieurtanuki
Copy link
Contributor

Hi @opxdelwin!

Please

  • create the new "scanned history" product list
  • add each new scanned product to it (same as "scanned session")
  • create a new product page based on "scanned history", accessible from profile / my lists. That part may change, but that's a start and it will take 5 minute

@opxdelwin
Copy link

So, I'll implement a feature of caching last 30-40 which is accessible from profile -> lists, right?

@monsieurtanuki
Copy link
Contributor

More or less: I wouldn't bother about the 30-40 limit (why 30? why 40? why 100?). Let the user clean the list the way she wants, just add freshly scanned products to a new app product list called "scan history".

@opxdelwin
Copy link

opxdelwin commented Feb 27, 2023

Cool, no limit to scanned product history. Now due to complex project structure, it's had to navigate.
So far, I listen to ContinuousScanModel in camera_scan_page.dart to get latestConsultedBarcode and store it in a Hive box. Now we have all the scanned barcodes. Should I be using LocalDatabase or go forward with Hive? Couldn't put much time into this as I have a test tomorrow.

@monsieurtanuki
Copy link
Contributor

@opxdelwin I'm not sure you're going in the right direction: we already use local databases, we already store the product barcode when it's scanned, so please be lazy and stupid and just add "Add barcode to 'scan_history'" when you see "Add barcode to 'scan_session'" in the code.

@monsieurtanuki monsieurtanuki added the good first issue Good for newcomers label Mar 19, 2023
@teolemon teolemon changed the title Auto-add scanned products to a list Add a permanent scan history May 9, 2023
@monsieurtanuki monsieurtanuki self-assigned this May 18, 2023
@monsieurtanuki
Copy link
Contributor

@opxdelwin Still working on it, or may I code it?

@opxdelwin
Copy link

@opxdelwin Still working on it, or may I code it?

go ahead

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ enhancement New feature or request good first issue Good for newcomers 🎯 P1
Development

Successfully merging a pull request may close this issue.

5 participants