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

feat: 3719 - new "scan history" page among the account product lists #4029

Merged
merged 1 commit into from
May 27, 2023

Conversation

monsieurtanuki
Copy link
Contributor

What

  • There is a "scan session" page, typically for recently scanned products.
  • But there was no huge "scan history" page, with all the previously scanned products.
  • Now this list does exist. It's populated at the same time as "scan session", but is not cleared when "scan session" is cleared. This list is accessed from the account page - that can be changed if needed.

Screenshot

cf. "Scan History / 3"
Screenshot_2023-05-26-16-44-29

Fixes bug(s)

Impacted files

  • app_en.arb: added 1 label for "scan history"
  • continuous_scan_model.dart: added the product to "scan history"
  • product_list.dart: added "scan history"; refactored ProductListType
  • product_list_page.dart: added "scan history"
  • product_query_page_helper.dart: added "scan history"
  • user_preferences_account.dart: added an access to the "scan history" page

Impacted files:
* `app_en.arb`: added 1 label for "scan history"
* `continuous_scan_model.dart`: added the product to "scan history"
* `product_list.dart`: added "scan history"; refactored `ProductListType`
* `product_list_page.dart`: added "scan history"
* `product_query_page_helper.dart`: added "scan history"
* `user_preferences_account.dart`: added an access to the "scan history" page
@teolemon
Copy link
Member

How about putting it among lists ?

@monsieurtanuki
Copy link
Contributor Author

How about putting it among lists ?

There are "account product lists" (e.g. "products I edited (at the server level)") and "user product lists" (e.g. local custom "My breakfast cereals"). And "history" and "scan session" are away from both, and accessed via specific actions.
In this PR, I added the new "scan history" to "account product lists", which is not very consistent.
If we move it to "user product lists", it's not very consistent either, and there's not the "custom" effect like "you have no lists for the moment: create your first list!".
Possibly we can create a dedicated access to a new concept of "automatic lists": "history", "scan session" and "scan history". Not sure it would be clearer for the end user.

@teolemon
Copy link
Member

Ok, my brain melted one hour ago, but:

  • What about bringing the lists shortcut closer to the current History tab.
  • How about allowing to switch between History and User Lists in the Top Bar (with a dropdown on the top bar title ?). The idea is that History and Scan History are just some more lists.
    @monsieurtanuki @M123-dev @g123k

Copy link
Member

@teolemon teolemon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @monsieurtanuki
Approving

@monsieurtanuki monsieurtanuki merged commit e2197d1 into openfoodfacts:develop May 27, 2023
@monsieurtanuki
Copy link
Contributor Author

Thank you @teolemon for your review.

Your suggestion about refactoring the concept of lists from the user's perspective is interesting and deserves its own issue.

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

Successfully merging this pull request may close these issues.

Add a permanent scan history
2 participants