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: 6289 - bulk proof upload page #6437

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

monsieurtanuki
Copy link
Contributor

@monsieurtanuki monsieurtanuki commented Mar 9, 2025

What

  • Now there's a new experimental "bulk proof upload" feature, activated by dev mode (deactivated by default)
  • With this feature, the user specifies the location, the date and the currency.
  • Then the user can send individual proofs, one at a time, in background: when the user clicks on the "send the proof" button, the proof is uploaded in the background and the page is cleared, ready for a new proof with the same location/date/currency

Screenshots

For the record I tested in TEST env, with pictures of my holidays in Japan in 2012. I know you wanted to know that but were too shy to ask.

dev mode page price page
Screenshot_1741542917 Screenshot_1741542924
bulk proof upload page proof image selected
Screenshot_1741542928 Screenshot_1741542956
exiting without saving uploading and clearing
Screenshot_1741542961 Screenshot_1741542973

Fixes bug(s)

Files

New files:

  • price_add_helper.dart: Helper around price/proof adding pages.
  • proof_bulk_add_page.dart: Single page that displays all the elements of bulk proof adding.
  • proof_type_extensions.dart: Extensions on ProofType.

Impacted files

  • app_en.arb: added a label for "bulk proof upload" and "send proof"
  • price_model.dart: new method clearProof
  • price_proof_card.dart: refactoring about the flexibility needed for new fields ProofType? forcedProofType and bool includeMyProofs
  • product_price_add_page.dart: refactored with new class PriceAddHelper
  • proof_crop_helper.dart: minor refactoring
  • user_preferences_dev_mode.dart: added a "bulk proof upload" feature flag (false/hidden by default)
  • user_preferences_prices.dart: optionally display a button to the new "bulk proof upload" page

New files:
* `proof_bulk_add_page.dart`: Single page that displays all the elements of bulk proof adding.
* `proof_type_extensions.dart`: Extensions on ProofType.

Impacted files
* `app_en.arb`: added a label for "bulk proof upload" and "send proof"
* `price_model.dart`: new method `clearProof`
* `price_proof_card.dart`: refactoring about the flexibility needed for new fields `ProofType? forcedProofType` and `bool includeMyProofs`
* `proof_crop_helper.dart`: minor refactoring
* `user_preferences_dev_mode.dart`: added a "bulk proof upload" feature flag (false/hidden by default)
* `user_preferences_prices.dart`: optionally display a button to the new "bulk proof upload" page
@codecov-commenter
Copy link

codecov-commenter commented Mar 9, 2025

Codecov Report

Attention: Patch coverage is 0.46083% with 216 lines in your changes missing coverage. Please review.

Project coverage is 5.81%. Comparing base (4d9c7fc) to head (e2f6a22).
Report is 789 commits behind head on develop.

Files with missing lines Patch % Lines
.../smooth_app/lib/pages/prices/price_add_helper.dart 0.00% 84 Missing ⚠️
...ooth_app/lib/pages/prices/proof_bulk_add_page.dart 0.00% 66 Missing ⚠️
.../smooth_app/lib/pages/prices/price_proof_card.dart 2.63% 37 Missing ⚠️
...h_app/lib/pages/prices/product_price_add_page.dart 0.00% 9 Missing ⚠️
...lib/pages/preferences/user_preferences_prices.dart 0.00% 5 Missing ⚠️
...kages/smooth_app/lib/pages/prices/price_model.dart 0.00% 5 Missing ⚠️
...th_app/lib/pages/prices/proof_type_extensions.dart 0.00% 5 Missing ⚠️
...b/pages/preferences/user_preferences_dev_mode.dart 0.00% 4 Missing ⚠️
...ckages/smooth_app/lib/pages/proof_crop_helper.dart 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           develop   #6437      +/-   ##
==========================================
- Coverage     9.54%   5.81%   -3.73%     
==========================================
  Files          325     493     +168     
  Lines        16411   29367   +12956     
==========================================
+ Hits          1567    1709     +142     
- Misses       14844   27658   +12814     

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

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

New file:
* `price_add_helper.dart`: Helper around price/proof adding pages.

Impacted files
* `product_price_add_page.dart`: refactored with new class `PriceAddHelper`
* `proof_bulk_add_page.dart`: refactored with new class `PriceAddHelper`
@monsieurtanuki monsieurtanuki requested a review from teolemon March 9, 2025 19:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Backlog
Status: 💬 To discuss and validate
Development

Successfully merging this pull request may close these issues.

Allow bulk proof addition for Open Prices (with just date and location)
2 participants