-
-
Notifications
You must be signed in to change notification settings - Fork 287
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: #878 - added a multiselect mode to product list page #1035
feat: #878 - added a multiselect mode to product list page #1035
Conversation
Impacted files: * `personalized_ranking_page.dart`: added a `fromItems` constructor for more flexibility * `product_list_item_simple.dart`: added optional `onTap` parameter in order to override the default behavior when checking/unchecking * `product_list_page.dart`: added a "multiselect" mode * `product_query_page.dart`: refactored * `scan_page_helper.dart`: refactored * `smooth_it_model.dart`: for flexibility, now using `List<Product>` instead of `ProductList` * `smooth_product_card_found.dart`: added optional `onTap` parameter in order to override the default behavior when checking/unchecking
Impacted files: * `product_list_page.dart`: added header with buttons; removed FABs * `ranking_floating_action_button.dart`: added a comment about getting rid of this class because of possible confusion
Impacted files: * `product_list_page.dart`: added header with buttons; removed FABs
packages/smooth_app/lib/pages/product/common/product_list_page.dart
Outdated
Show resolved
Hide resolved
packages/smooth_app/lib/pages/product/common/product_list_page.dart
Outdated
Show resolved
Hide resolved
packages/smooth_app/lib/pages/product/common/product_list_page.dart
Outdated
Show resolved
Hide resolved
packages/smooth_app/lib/pages/product/common/product_list_page.dart
Outdated
Show resolved
Hide resolved
packages/smooth_app/lib/pages/product/common/product_list_page.dart
Outdated
Show resolved
Hide resolved
Thank you @monsieurtanuki the code looks great, but question on the UI.
|
This could be useful info, but:
|
Impacted file: * `product_list_page.dart`: closer to the mocks
Impacted file: * `product_query.dart`: unrelated removal of a harmless duplicate
@monsieurtanuki perhaps we can try to replace the title by the history icon ? |
Yes we can but we'll still have the problem with other product list titles. |
packages/smooth_app/lib/pages/product/common/product_list_page.dart
Outdated
Show resolved
Hide resolved
Just tested this PR and I like the feature to choose which products to compare. The code looks good and I don't want to really join the UI/UX discussion but I have a few minor points, nothing which has to be changed immediately:
|
Thank you @M123-dev for your comments.
Fair enough, I need to fix this.
I'm OK with that too.
As evoked previously, this is not really the problem of the "history" title, it's more the problem of the additional text button on the right. We'll have the same problem with all product lists if they have long titles. |
Yeah translations in such small real estate is always a problem, lets check this code in, and continue to think about how we can handle this. Agreed on all other points. More broader concern I have: |
Impacted files: * `app_en.arb`: added a "compare mode" label * `app_fr.arb`: added a "compare mode" label * `product_list_item_simple.dart`: added a `onLongPress` parameter * `product_list_page.dart`: added longPress-to-selection-mode feature; fixed the cancel button position; localized
Thank you @teolemon @jasmeet0817 @M123-dev for your feedback!
|
@jasmeet0817 it's just the way it worked so far, I'm not saying it's a good idea. Besides, I cannot scan, therefore I'm not very sensitive about that. |
Impacted files:
personalized_ranking_page.dart
: added afromItems
constructor for more flexibilityproduct_list_item_simple.dart
: added optionalonTap
parameter in order to override the default behavior when checking/uncheckingproduct_list_page.dart
: added a "multiselect" modeproduct_query_page.dart
: refactoredscan_page_helper.dart
: refactoredsmooth_it_model.dart
: for more flexibility, now usingList<Product>
instead ofProductList
smooth_product_card_found.dart
: added optionalonTap
parameter in order to override the default behavior when checking/uncheckingI'm 99% sure that you won't like the UI, but I couldn't think of another UX...
Product list page, with a new multi-select FAB:
Multi-select mode, with a ranking FAB that goes to the ranking page with the selected items only: