Skip to content

Commit

Permalink
Merge branch 'develop' into fix_2/#1538
Browse files Browse the repository at this point in the history
  • Loading branch information
monsieurtanuki committed Sep 6, 2022
2 parents c0620f6 + e9e538f commit e03f062
Show file tree
Hide file tree
Showing 180 changed files with 1,588 additions and 881 deletions.
22 changes: 11 additions & 11 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
---
name: Bug report
about: Create a report to help us improve Project Smoothie
about: Create a report to help us improve the Open Food Facts mobile app (iPhone and Android)
title: ""
labels: ""
labels: "bug"
assignees: ""
---

### What
- Describe the issue clearly
- <!-- Describe the issue clearly -->

### Steps to reproduce the behavior
1. Go to '...'
Expand All @@ -16,21 +16,21 @@ assignees: ""
4. See error

### Expected behavior
A clear and concise description of what you expected to happen.
<!-- A clear and concise description of what you expected to happen. -->

### Why
- (optional, delete if empty) Why it's important
- <!-- (optional, delete if empty) Why it's important -->

### Part of
- Add the issue number preceded by # (that also allows searching by name for similar issues): eg #525
- #525 <!-- Add the issue number preceded by # (that also allows searching by name for similar issues) -->

### Screenshot/Mockup/Before-After
(optional, delete if empty)
<!-- (optional, delete if empty) -->

### Smartphone model
- Device: [e.g. Pixel6]
- OS: [e.g. Android 10]
- App Version [e.g. 22] - you can see that either in the About Smoothie dialog in the settings or using https://nerdschalk.com/how-to-find-version-number-of-an-app-installed-on-your-device/
- Device: <!-- [e.g. Pixel6] -->
- OS: <!-- [e.g. Android 10] -->
- App Version: <!-- [e.g. 22] you can see that either in the "About Open Food Facts" dialog in the settings or using https://nerdschalk.com/how-to-find-version-number-of-an-app-installed-on-your-device/ -->

### Additional context
(optional, delete if empty)
<!-- (optional, delete if empty) -->
7 changes: 4 additions & 3 deletions .github/ISSUE_TEMPLATE/epic.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@ name: Epic
about: Template for epics. Epics group several user stories together into a main piece
of added value.
title: ''
labels: "epic"
labels: "epic"
assignees: ''

---

### Who for

-
### What

-
### Why
-
10 changes: 5 additions & 5 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,21 @@
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
labels: 'enhancement'
assignees: ''

---

### Problem
(Please replace me by a clear and concise description of what the problem is. Ex. I'm always frustrated when [...])
<!-- Please replace me by a clear and concise description of what the problem is. Ex. I'm always frustrated when [...] -->

### Proposed solution
(Please replace me by a clear and concise description of what you want to happen)
<!-- Please replace me by a clear and concise description of what you want to happen -->

### Additional context
(Please replace me by any other context or screenshots about the feature request here.)
<!-- Please replace me by any other context or screenshots about the feature request here. -->

### Mockups

### Part of
- #525 (Please remplace 525 by the most specific parent issue possible)
- #525 <!-- Please remplace 525 by the most specific parent issue possible -->
8 changes: 3 additions & 5 deletions .github/pull_request_template.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
### What
<!-- description of the PR -->
- Changed x to achieve y
- <!-- Changed x to achieve y -->

### Screenshot
<!-- Insert a screenshot to provide visual record of your changes, if visible -->

### Fixes bug(s)
<!-- change by appropriate issues. -->
<!-- Please use a linking keyword https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword -->
- Fixes: #1
- Closes: #2
- Fixes: <!-- #1 Note: you can also use Closes: -->

### Part of
- https://github.com/openfoodfacts/smooth-app/issues/525
<!-- please be as granular as possible -->
- #525 <!-- Add the most granular issue possible -->
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,9 @@ jobs:
with:
channel: stable
cache: true
cache-key: ${{ inputs.FLUTTER-CACHE-KEY }}
flutter-version: '3.0.5'
#cache-key: ${{ inputs.FLUTTER-CACHE-KEY }}
cache-key: revert-3.0.5

- name: Flutter version
run: flutter --version
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,9 @@ jobs:
with:
channel: stable
cache: true
cache-key: ${{ inputs.FLUTTER-CACHE-KEY }}
flutter-version: '3.0.5'
#cache-key: ${{ inputs.FLUTTER-CACHE-KEY }}
cache-key: revert-3.0.5

- name: Flutter version
run: flutter --version
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/postsubmit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,16 @@ jobs:
with:
distribution: 'zulu'
java-version: 11

- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
channel: stable
cache: true
cache-key: flutter-${{ env.FLUTTER_VERSION }}-${{ hashFiles('**/pubspec.lock')}}

flutter-version: '3.0.5'
#cache-key: flutter-${{ env.FLUTTER_VERSION }}-${{ hashFiles('**/pubspec.lock')}}
cache-key: revert-3.0.5

- run: flutter --version

# Get dependencies.
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/presubmit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,10 @@ jobs:
uses: subosito/flutter-action@v2
with:
channel: stable
flutter-version: ${{ env.FLUTTER_VERSION }}
cache: true
cache-key: flutter-${{ env.FLUTTER_VERSION }}-${{ hashFiles('**/pubspec.lock')}}
flutter-version: '3.0.5'
#cache-key: flutter-${{ env.FLUTTER_VERSION }}-${{ hashFiles('**/pubspec.lock')}}
cache-key: revert-3.0.5

- run: flutter --version

Expand Down
47 changes: 47 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,52 @@
# Changelog

## [3.13.0](https://github.com/openfoodfacts/smooth-app/compare/v3.12.0...v3.13.0) (2022-09-06)


### Features

* Instant refresh views ([#2901](https://github.com/openfoodfacts/smooth-app/issues/2901)) ([0d2be11](https://github.com/openfoodfacts/smooth-app/commit/0d2be113fc3fd79a1f16db72437843d702c6d2ab))


### Bug Fixes

* fixed package versions ([#2936](https://github.com/openfoodfacts/smooth-app/issues/2936)) ([d7ed371](https://github.com/openfoodfacts/smooth-app/commit/d7ed37133e4fc31f7ee588c4912c2e225fb93871))

## [3.12.0](https://github.com/openfoodfacts/smooth-app/compare/v3.11.0...v3.12.0) (2022-09-06)


### Features

* Improve the Feature request template ([#2931](https://github.com/openfoodfacts/smooth-app/issues/2931)) ([47bbf89](https://github.com/openfoodfacts/smooth-app/commit/47bbf89a421718f4dcf1c6e2e04ab0198d9b0514))


### Bug Fixes

* [#2846](https://github.com/openfoodfacts/smooth-app/issues/2846) horizontal layout buttons ([#2899](https://github.com/openfoodfacts/smooth-app/issues/2899)) ([91aa457](https://github.com/openfoodfacts/smooth-app/commit/91aa45782793d9e1f78c5201053c599d08314260))
* back to flutter 3.0.5 ([#2923](https://github.com/openfoodfacts/smooth-app/issues/2923)) ([513af0e](https://github.com/openfoodfacts/smooth-app/commit/513af0e22df0939ba4a59994c1b26f84447af9e4))
* Dark status bar for onboarding ([#2864](https://github.com/openfoodfacts/smooth-app/issues/2864)) ([e8c97e4](https://github.com/openfoodfacts/smooth-app/commit/e8c97e479b408e745a7e8e26eb3cc38a9a637881))
* Improve the issue template for better issues ([#2930](https://github.com/openfoodfacts/smooth-app/issues/2930)) ([90f9d9e](https://github.com/openfoodfacts/smooth-app/commit/90f9d9edc772f0369403c298fb8bc925876f31fd))
* improve the PR template ([#2933](https://github.com/openfoodfacts/smooth-app/issues/2933)) ([23b1dd4](https://github.com/openfoodfacts/smooth-app/commit/23b1dd4a4ff56108fbc07e71c7382e1d05d04853))
* remove the epic horse ([b42ddb7](https://github.com/openfoodfacts/smooth-app/commit/b42ddb7d160661af5ba5823fdbf3d2065dcec10a))


### Miscellaneous

* New Crowdin translations ([#2920](https://github.com/openfoodfacts/smooth-app/issues/2920)) ([a5f5343](https://github.com/openfoodfacts/smooth-app/commit/a5f53430a5164ba198b6269867a20d1a1db8fdd2))

## [3.11.0](https://github.com/openfoodfacts/smooth-app/compare/v3.10.3...v3.11.0) (2022-09-04)


### Features

* Add a gallery of the images selected and uploaded for a product ([#2801](https://github.com/openfoodfacts/smooth-app/issues/2801)) ([c706839](https://github.com/openfoodfacts/smooth-app/commit/c70683939db4324f3299f0c91e103e3eb7368584))


### Miscellaneous

* **deps:** bump flutter_launcher_icons in /packages/smooth_app ([#2873](https://github.com/openfoodfacts/smooth-app/issues/2873)) ([242ec9d](https://github.com/openfoodfacts/smooth-app/commit/242ec9d91868a1c0e46f2991f58b1c2ce6366951))
* New Crowdin translations ([#2914](https://github.com/openfoodfacts/smooth-app/issues/2914)) ([d1b9020](https://github.com/openfoodfacts/smooth-app/commit/d1b902084b538407575e616169d5bd66d1770982))

## [3.10.3](https://github.com/openfoodfacts/smooth-app/compare/v3.10.2...v3.10.3) (2022-09-03)


Expand Down
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@
# New Open Food Facts mobile app for Android and iPhone - Codename: "Smooth App"
[![SmoothApp Post-Submit Tests](https://github.com/openfoodfacts/smooth-app/actions/workflows/postsubmit.yml/badge.svg)](https://github.com/openfoodfacts/smooth-app/actions/workflows/postsubmit.yml)

## Alert!

We are currently using Flutter 3.0.5 as the new 3.3.0 [has some bugs](https://github.com/openfoodfacts/smooth-app/issues/2919).

Running `flutter downgrade 3.0.5` downgrades the version.

------

Latest commit deployed to App Stores: (August 25th 2022 as Build 722) https://github.com/openfoodfacts/smooth-app/releases/tag/v3.8.1

A new Flutter application by [Open Food Facts](https://github.com/openfoodfacts). You can install it on [Android](https://play.google.com/store/apps/details?id=org.openfoodfacts.scanner) or [iPhone/iPad](https://apps.apple.com/app/open-food-facts/id588797948). Note that a internal development build ([Android](https://play.google.com/apps/internaltest/4699092342921529278) or [iPhone/iPad](https://testflight.apple.com/join/c2tiBHgd) )if you'd like to use the results of your PRs quicker.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import 'dart:io';
import 'dart:typed_data';

import 'package:flutter/foundation.dart';
import 'package:path/path.dart';
Expand Down
15 changes: 7 additions & 8 deletions packages/smooth_app/lib/cards/data_cards/image_upload_card.dart
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,11 @@ class ImageUploadCard extends StatefulWidget {
}

class _ImageUploadCardState extends State<ImageUploadCard> {
ImageProvider? _imageProvider; // Normal size image to display in carousel
ImageProvider?
_imageFullProvider; // Full resolution image to display in image page
/// Normal size image to display in carousel
ImageProvider? _imageProvider;

/// Full resolution image to display in image page
ImageProvider? _imageFullProvider;

Future<void> _getImage() async {
final File? croppedImageFile =
Expand All @@ -47,8 +49,7 @@ class _ImageUploadCardState extends State<ImageUploadCard> {
}
await uploadCapturedPicture(
context,
barcode: widget.product
.barcode!, //Probably throws an error, but this is not a big problem when we got a product without a barcode
barcode: widget.product.barcode!,
imageField: widget.productImageData.imageField,
imageUri: croppedImageFile.uri,
);
Expand Down Expand Up @@ -113,9 +114,7 @@ class _ImageUploadCardState extends State<ImageUploadCard> {
context,
MaterialPageRoute<bool>(
builder: (BuildContext context) => ProductImageGalleryView(
productImageData: widget.productImageData,
allProductImagesData: widget.allProductImagesData,
title: widget.productImageData.title,
imagesData: widget.allProductImagesData,
barcode: widget.product.barcode,
),
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class ProductImageCarousel extends StatelessWidget {
Widget build(BuildContext context) {
final AppLocalizations appLocalizations = AppLocalizations.of(context);
final List<ProductImageData> allProductImagesData =
getAllProductImagesData(product, appLocalizations);
getProductMainImagesData(product, appLocalizations);

return SizedBox(
height: height,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ class SmoothProductCardFound extends StatelessWidget {
padding: const EdgeInsets.all(VERY_SMALL_SPACE),
child: Row(
children: <Widget>[
SmoothProductImage(
SmoothMainProductImage(
product: product,
width: screenSize.width * 0.20,
height: screenSize.width * 0.20,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import 'package:auto_size_text/auto_size_text.dart';
import 'package:flutter/material.dart';
import 'package:smooth_app/cards/product_cards/smooth_product_card_found.dart';
import 'package:smooth_app/generic_lib/design_constants.dart';
import 'package:smooth_app/generic_lib/widgets/images/smooth_image.dart';
import 'package:smooth_app/generic_lib/widgets/smooth_card.dart';
import 'package:smooth_app/generic_lib/widgets/smooth_product_image_container.dart';
import 'package:smooth_app/helpers/ui_helpers.dart';

/// Empty template for a product card display.
Expand Down Expand Up @@ -51,10 +51,10 @@ class SmoothProductCardTemplate extends StatelessWidget {
padding: const EdgeInsets.all(VERY_SMALL_SPACE),
child: Row(
children: <Widget>[
SmoothProductImageContainer(
SmoothImage(
width: screenSize.width * 0.20,
height: screenSize.width * 0.20,
child: Container(color: itemColor),
color: itemColor,
),
const Padding(padding: EdgeInsets.only(left: VERY_SMALL_SPACE)),
Expanded(
Expand Down
21 changes: 21 additions & 0 deletions packages/smooth_app/lib/generic_lib/loading_sliver.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import 'package:flutter/widgets.dart';

/// A [SliverChildBuilderDelegate] that can show progress by displaying
/// [loadingWidget]s.
///
/// When [loading] is `true`, [loadingCount] of [loadingWidget] will be
/// displayed.
class LoadingSliverChildBuilderDelegate extends SliverChildBuilderDelegate {
LoadingSliverChildBuilderDelegate({
required IndexedWidgetBuilder childBuilder,
required int childCount,
Widget? loadingWidget,
int loadingCount = 4,
bool loading = false,
}) : assert(loading == false || loadingWidget != null),
super(
(BuildContext context, int index) =>
loading ? loadingWidget : childBuilder(context, index),
childCount: loading ? loadingCount : childCount,
);
}
Loading

0 comments on commit e03f062

Please sign in to comment.