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: 4155 - check when the user leaves the product addition page if something was input #4156

Merged
merged 1 commit into from
Jun 15, 2023

Conversation

monsieurtanuki
Copy link
Contributor

What

  • When the user leaves the product addition page, we check if something was input.
  • If not, we display a dialog asking tor a confirmation to leave the page.

Screenshot

Screenshot_2023-06-15-10-33-04

Fixes bug(s)

Impacted files

  • add_new_product_page.dart: check when the user leaves the page if something was input
  • app_en.arb: added 1 label
  • app_fr.arb: added 1 label

…omething was input

Impacted files:
* `add_new_product_page.dart`: check when the user leaves the page if something was input
* `app_en.arb`: added 1 label
* `app_fr.arb`: added 1 label
@monsieurtanuki monsieurtanuki requested a review from a team as a code owner June 15, 2023 08:40
@monsieurtanuki monsieurtanuki requested a review from teolemon June 15, 2023 08:40
@github-actions github-actions bot added 🌐 l10n Product addition The easier it is to add a product and get Nutri-Score, Eco-Score, the happier the users. 🥫 Product page labels Jun 15, 2023
@g123k
Copy link
Collaborator

g123k commented Jun 15, 2023

@monsieurtanuki Just a small question for the UI: is-this normal that there is no horizontal padding or is-it only on your device?

@monsieurtanuki
Copy link
Contributor Author

@monsieurtanuki Just a small question for the UI: is-this normal that there is no horizontal padding or is-it only on your device?

I just use the standard SmoothDialog and a Text.

@teolemon
Copy link
Member

The modals do not spark joy in general.

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.

Curious to see if that's going to convince anyone. We should probably paginate addition between scores (Step 1 Nutri-Score, Step 2 Eco-Score)

@monsieurtanuki monsieurtanuki merged commit 03d2dcb into openfoodfacts:develop Jun 15, 2023
@monsieurtanuki
Copy link
Contributor Author

The modals do not spark joy in general.

That's on purpose! If we played cat videos or send bitcoins each time the user does something we don't want him to do, that would be counterproductive.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🌐 l10n Product addition The easier it is to add a product and get Nutri-Score, Eco-Score, the happier the users. 🥫 Product page
Projects
None yet
Development

Successfully merging this pull request may close these issues.

(Product Addition) There should be a confirmation button if you click "Finish" without uploading anything
3 participants