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

fix: Save & restore when leaving an edit page #6250

Merged
merged 1 commit into from
Jan 20, 2025

Conversation

g123k
Copy link
Collaborator

@g123k g123k commented Jan 19, 2025

Hi everyone!

The initial goal of this PR was to fix #6242.

But one more issue appeared, and this time for all SimpleInputWidget (labels, stores, origins…)
If you dismissed the popup to save or cancel, your current input was lost, and the item was not added to the list of values.
Now, if you dismiss this popup, the internal save is canceled and everything is restored.

ScreenRecording_01-20-2025.00-21-33_1.MP4

@github-actions github-actions bot added 🥫 Product page ✏️ Editing Many products are incomplete and don't have Nutri-Score, Eco-Score…so editing is important for users ✏️ Editing - Basic info input labels Jan 19, 2025
@g123k g123k changed the title feat: Save & restore when leaving an edit page fix: Save & restore when leaving an edit page Jan 19, 2025
@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 0% with 15 lines in your changes missing coverage. Please review.

Project coverage is 6.10%. Comparing base (4d9c7fc) to head (f9dbb31).
Report is 688 commits behind head on develop.

Files with missing lines Patch % Lines
...p/lib/pages/product/simple_input_page_helpers.dart 0.00% 8 Missing ⚠️
...mooth_app/lib/pages/product/simple_input_page.dart 0.00% 4 Missing ⚠️
..._app/lib/pages/product/add_basic_details_page.dart 0.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           develop   #6250      +/-   ##
==========================================
- Coverage     9.54%   6.10%   -3.45%     
==========================================
  Files          325     462     +137     
  Lines        16411   27113   +10702     
==========================================
+ Hits          1567    1656      +89     
- Misses       14844   25457   +10613     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@teolemon teolemon merged commit a0fb228 into openfoodfacts:develop Jan 20, 2025
7 checks passed
@g123k g123k deleted the input_widget_save_restore branch January 28, 2025 22:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✏️ Editing - Basic info input ✏️ Editing Many products are incomplete and don't have Nutri-Score, Eco-Score…so editing is important for users 🥫 Product page
Development

Successfully merging this pull request may close these issues.

The mobile app does not prevent losing input in the brand field
3 participants