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

refactor: Make smooth_app a module (also called step 1) #3101

Merged
merged 12 commits into from
Oct 13, 2022

Conversation

g123k
Copy link
Collaborator

@g123k g123k commented Oct 6, 2022

This PR implemented the "Step 1" of the migration:

  • Add the package attribute for all assets files
  • Create an app package (empty for now)
  • Add smooth_app as a dependency

New entry points are:

  • On Android 🤖: flutter run -t lib/entrypoints/android/main_google_play.dart
  • On iOS 🍎: flutter run -t lib/entrypoints/ios/main_ios.dart on iOS

Android impl is OK.
Still have to check for iOS and tests
Copy link
Contributor

@monsieurtanuki monsieurtanuki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @g123k!
I approve your code regarding the "initial step 1", i.e. adding a package parameter to the asset file references in dart files. The rest is beyond my added value.

@@ -5,7 +5,7 @@ import android.os.Build
import android.service.quicksettings.Tile
import android.service.quicksettings.TileService
import androidx.annotation.RequiresApi
import org.openfoodfacts.scanner.MainActivity
import org.openfoodfacts.app.MainActivity
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure about this.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't worry, this is OK for this one.
This is the name of the app VS smooth_app Android app

@g123k g123k changed the title feat: Make smooth_app a module (also called step 1) refactàr: Make smooth_app a module (also called step 1) Oct 6, 2022
@g123k g123k changed the title refactàr: Make smooth_app a module (also called step 1) refactor: Make smooth_app a module (also called step 1) Oct 6, 2022
@g123k g123k marked this pull request as ready for review October 6, 2022 13:33
@g123k g123k requested a review from a team as a code owner October 6, 2022 13:33
@g123k
Copy link
Collaborator Author

g123k commented Oct 6, 2022

It seems that everything is now OK.
The idea is to do non-regression tests.

No new feature is available in this step

@g123k g123k linked an issue Oct 6, 2022 that may be closed by this pull request
4 tasks
@g123k
Copy link
Collaborator Author

g123k commented Oct 9, 2022

Is there someone to review/merge this PR?
I would like to implement the other steps :)

Copy link
Member

@M123-dev M123-dev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't double checked everything (this is a mobile review)

Just the .gitingore and I noticed we have a Linux macOS and Windows folder in /app/
We probably don't need that

@@ -0,0 +1,46 @@
# Miscellaneous
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't the global .gitignore enouph

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the review Marvin.

For the "desktop" folders, there is an issue about the support of those platforms.
We won't release on them, but it will allow us to run the app without an emulator/simulator.

For the .gitignore, we have the same file in the smooth_app package. It's actually the generated one.

@codecov-commenter
Copy link

Codecov Report

Merging #3101 (7cdf69a) into develop (7a3eb41) will increase coverage by 0.04%.
The diff coverage is 40.90%.

@@            Coverage Diff             @@
##           develop   #3101      +/-   ##
==========================================
+ Coverage     6.40%   6.44%   +0.04%     
==========================================
  Files          247     248       +1     
  Lines        12324   12337      +13     
==========================================
+ Hits           789     795       +6     
- Misses       11535   11542       +7     
Impacted Files Coverage Δ
...p/lib/cards/category_cards/raster_async_asset.dart 0.00% <0.00%> (ø)
..._app/lib/cards/category_cards/svg_async_asset.dart 0.00% <0.00%> (ø)
...cards/product_cards/smooth_product_card_error.dart 0.00% <ø> (ø)
...ards/product_cards/smooth_product_card_thanks.dart 8.33% <ø> (ø)
..._app/lib/data_models/abstract_onboarding_data.dart 0.00% <0.00%> (ø)
...h_app/lib/data_models/onboarding_data_product.dart 0.00% <0.00%> (ø)
...ges/smooth_app/lib/generic_lib/loading_dialog.dart 0.00% <ø> (ø)
...app/lib/generic_lib/widgets/picture_not_found.dart 33.33% <ø> (ø)
...app/lib/generic_lib/widgets/smooth_error_card.dart 100.00% <ø> (ø)
...ackages/smooth_app/lib/helpers/network_config.dart 0.00% <0.00%> (ø)
... and 21 more

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

@teolemon teolemon merged commit e3564e5 into openfoodfacts:develop Oct 13, 2022
@g123k g123k deleted the module_migration_step1 branch December 30, 2024 10:52
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.

[Planning] Modularization of the codebase
5 participants