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: #2337 - additional "power user" product edit page #2617

Merged
merged 2 commits into from
Jul 22, 2022

Conversation

monsieurtanuki
Copy link
Contributor

New file:

  • simple_input_widget.dart: Simple input widget: we have a list of terms, we add, we remove.

Impacted files

  • edit_product_page.dart: added an item that includes 6 simple items;
  • simple_input_page.dart: now manages multiple items; now using new widget `SimpleInputWidget
  • simple_input_page_helpers.dart: refactored for a better "multiple changes" management

What

  • On the "edit product" page, all items cared about only one product feature (e.g. packaging, nutrition facts, ...)
  • Now there's an additional item in the "edit product" page, which makes it possible to change several (simple) features in the same page.

Screenshot

dark light
Capture d’écran 2022-07-18 à 14 41 42 Capture d’écran 2022-07-18 à 14 43 18
Capture d’écran 2022-07-18 à 14 42 20 Capture d’écran 2022-07-18 à 14 43 04

Fixes bug(s)

New file:
* `simple_input_widget.dart`: Simple input widget: we have a list of terms, we add, we remove.

Impacted files
* `edit_product_page.dart`: added an item that includes 6 simple items;
* `simple_input_page.dart`: now manages multiple items; now using new widget `SimpleInputWidget
* `simple_input_page_helpers.dart`: refactored for a better "multiple changes" management
@monsieurtanuki monsieurtanuki requested a review from a team as a code owner July 18, 2022 12:45
@teolemon teolemon added the ✏️ Editing Many products are incomplete and don't have Nutri-Score, Eco-Score…so editing is important for users label Jul 18, 2022
@teolemon
Copy link
Member

@monsieurtanuki Do the classic edit view get the icon as a result ?

@monsieurtanuki
Copy link
Contributor Author

Do the classic edit view get the icon as a result ?

@teolemon If you mean "does the edit store page display a card with 'Stores' as a title and the icon as a leading icon?", that's correct.

Of course in the "single edit" pages, we could get rid of:

  • the card container
  • the icon
  • the title (already in the page title)

Would that look better to you?

Copy link
Member

@M123-dev M123-dev left a comment

Choose a reason for hiding this comment

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

LGTM great for the power users

Just one quick ui change

padding: i == 0
? EdgeInsets.zero
: const EdgeInsets.only(top: LARGE_SPACE),
child: Card(
Copy link
Member

Choose a reason for hiding this comment

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

SmoothCard for UI consistency

…nsistency

Impacted file:
* `simple_input_page.dart`: now uses `SmoothCard` instead of `Card` for consistency
@monsieurtanuki monsieurtanuki merged commit d5017b4 into openfoodfacts:develop Jul 22, 2022
@codecov-commenter
Copy link

Codecov Report

Merging #2617 (09f5072) into develop (2ea0da3) will decrease coverage by 1.42%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           develop   #2617      +/-   ##
==========================================
- Coverage     8.86%   7.43%   -1.43%     
==========================================
  Files          161     213      +52     
  Lines         6623   10278    +3655     
==========================================
+ Hits           587     764     +177     
- Misses        6036    9514    +3478     
Impacted Files Coverage Δ
...kages/smooth_app/lib/widgets/attribute_button.dart 0.00% <0.00%> (-92.00%) ⬇️
...s/smooth_app/lib/data_models/user_preferences.dart 8.73% <0.00%> (-23.57%) ⬇️
packages/smooth_app/lib/themes/smooth_theme.dart 60.00% <0.00%> (-22.98%) ⬇️
...p/lib/generic_lib/dialogs/smooth_alert_dialog.dart 15.11% <0.00%> (-19.10%) ⬇️
...mooth_app/lib/data_models/product_preferences.dart 24.65% <0.00%> (-6.78%) ⬇️
packages/smooth_app/lib/main.dart 14.16% <0.00%> (-3.73%) ⬇️
.../smooth_app/lib/pages/onboarding/welcome_page.dart 0.00% <0.00%> (-3.13%) ⬇️
.../smooth_app/lib/pages/onboarding/scan_example.dart 0.00% <0.00%> (-2.28%) ⬇️
...p/lib/pages/onboarding/consent_analytics_page.dart 0.00% <0.00%> (-1.57%) ⬇️
...smooth_app/lib/pages/product/new_product_page.dart 0.00% <0.00%> (-0.88%) ⬇️
... and 225 more

Help us with your feedback. Take ten seconds to tell us how you rate us.

@monsieurtanuki
Copy link
Contributor Author

Thank you @M123-dev for the review, I've changed the Card into a SmoothCard.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✏️ Editing Many products are incomplete and don't have Nutri-Score, Eco-Score…so editing is important for users
Development

Successfully merging this pull request may close these issues.

Add power edit mode that concatenates all the editable things for faster contribution
4 participants