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: 3964 - progress texts instead of circular indicator for crop page + isolate #3965

Merged
merged 1 commit into from
May 18, 2023

Conversation

monsieurtanuki
Copy link
Contributor

@monsieurtanuki monsieurtanuki commented May 14, 2023

What

  • Now we display progress texts in the crop page instead of a circular progress indicator.
  • This way we avoid the stuttering of the indicator during computing expensive operations like image+file
  • In addition to that, we now use more compute instead of main thread computations.

Screenshot

with image with progress text
Screenshot_2023-05-14-17-39-51 Screenshot_2023-05-14-17-41-08

Fixes bug(s)

Impacted files

  • app_en.arb: added 4 labels for the action progress on crop page
  • background_task_image.dart: minor refactoring
  • crop_page.dart: displays a text instead of a stuttering circular progress indicator; minor refactoring
  • image_compute_container.dart: now using compute as much as possible - still not possible for ui

… + isolate

Impacted files:
* `app_en.arb`: added 5 labels for the action progress on crop page
* `background_task_image.dart`: minor refactoring
* `crop_page.dart`: displays a text instead of a stuttering circular progress indicator; minor refatoring
* `image_compute_container.dart`: now using `compute` as much as possible - still not possible for `ui`
@codecov-commenter
Copy link

Codecov Report

Merging #3965 (2c1d3b8) into develop (cd04135) will decrease coverage by 0.03%.
The diff coverage is 0.00%.

@@             Coverage Diff             @@
##           develop    #3965      +/-   ##
===========================================
- Coverage    11.00%   10.97%   -0.03%     
===========================================
  Files          265      265              
  Lines        13044    13070      +26     
===========================================
  Hits          1435     1435              
- Misses       11609    11635      +26     
Impacted Files Coverage Δ
...ooth_app/lib/background/background_task_image.dart 0.00% <0.00%> (ø)
...mooth_app/lib/helpers/image_compute_container.dart 0.00% <0.00%> (ø)
packages/smooth_app/lib/pages/crop_page.dart 0.00% <0.00%> (ø)

... and 1 file with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@teolemon
Copy link
Member

Is the cropping image… static ?

@teolemon teolemon requested review from g123k and M123-dev May 18, 2023 11:52
@monsieurtanuki
Copy link
Contributor Author

Is the cropping image… static ?

@teolemon Not sure I get what you mean.
What I can say is that the full operation lasts about 2 seconds, and that when you click on the "send!" button the image is replaced by something like 4 messages, according on the progress.

@teolemon teolemon merged commit 1af41f2 into openfoodfacts:develop May 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Regression ? Image seems to be uploaded in main thread
3 participants