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: 5627 - remove focus from price amount after adding product #5729

Merged
merged 1 commit into from
Oct 25, 2024

Conversation

monsieurtanuki
Copy link
Contributor

What

  • When adding a price product, the price amount was potentially still focused on, causing amounts to be typed in in the wrong amount field.
  • Now when we add a price product, we lose the focus on the previous amount field: no confusion is possible now.

Fixes bug(s)

@codecov-commenter
Copy link

Codecov Report

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

Project coverage is 6.94%. Comparing base (4d9c7fc) to head (6a99bf4).
Report is 382 commits behind head on develop.

Files with missing lines Patch % Lines
...h_app/lib/pages/prices/price_add_product_card.dart 0.00% 7 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           develop   #5729      +/-   ##
==========================================
- Coverage     9.54%   6.94%   -2.61%     
==========================================
  Files          325     404      +79     
  Lines        16411   21622    +5211     
==========================================
- Hits          1567    1502      -65     
- Misses       14844   20120    +5276     

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

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.

Great, that was annoying me when adding prices. If I understand well, we unfocus, but don't focus on the next price ?

@monsieurtanuki monsieurtanuki merged commit ccbe094 into openfoodfacts:develop Oct 25, 2024
6 checks passed
@monsieurtanuki
Copy link
Contributor Author

Thank you @teolemon for your review!

Great, that was annoying me when adding prices. If I understand well, we unfocus, but don't focus on the next price ?

That's correct.
My goal here was to fix the bug.
There could be a more refined focus management, but between the focus and the keyboard there are some nuances in flutter I hadn't time to delve into.
Besides, that page is already tagged as confusing (#5632), therefore I guess a whole page UX refactoring would be appropriate, with explicit requirements including focus management.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Focus remains on the previous price on receipt addition
3 participants