Skip to content

Commit

Permalink
Merge branch 'develop' into feat/image_gallery
Browse files Browse the repository at this point in the history
# Conflicts:
#	packages/smooth_app/lib/pages/product/edit_product_page.dart
  • Loading branch information
VaiTon committed Aug 16, 2022
2 parents efa58c2 + 133071d commit dbcd334
Show file tree
Hide file tree
Showing 16 changed files with 398 additions and 256 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/crowdin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
uses: actions/checkout@v3

- name: crowdin action
uses: crowdin/github-action@1.4.11
uses: crowdin/github-action@1.4.12
continue-on-error: true
with:
# Upload sources to Crowdin
Expand Down
20 changes: 20 additions & 0 deletions .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Dependency Review Action
#
# This Action will scan dependency manifest files that change as part of a Pull Request, surfacing known-vulnerable versions of the packages declared or updated in the PR. Once installed, if the workflow run is marked as required, PRs introducing known-vulnerable packages will be blocked from merging.
#
# Source repository: https://github.com/actions/dependency-review-action
# Public documentation: https://docs.github.com/en/code-security/supply-chain-security/understanding-your-software-supply-chain/about-dependency-review#dependency-review-enforcement
name: 'Dependency Review'
on: [pull_request]

permissions:
contents: read

jobs:
dependency-review:
runs-on: ubuntu-latest
steps:
- name: 'Checkout Repository'
uses: actions/checkout@v3
- name: 'Dependency Review'
uses: actions/dependency-review-action@v2
20 changes: 10 additions & 10 deletions packages/smooth_app/android/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ GEM
artifactory (3.0.15)
atomos (0.1.3)
aws-eventstream (1.2.0)
aws-partitions (1.608.0)
aws-sdk-core (3.131.3)
aws-partitions (1.617.0)
aws-sdk-core (3.132.0)
aws-eventstream (~> 1, >= 1.0.2)
aws-partitions (~> 1, >= 1.525.0)
aws-sigv4 (~> 1.1)
Expand All @@ -27,7 +27,7 @@ GEM
aws-sdk-core (~> 3, >= 3.127.0)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.4)
aws-sigv4 (1.5.0)
aws-sigv4 (1.5.1)
aws-eventstream (~> 1, >= 1.0.2)
babosa (1.0.4)
claide (1.1.0)
Expand All @@ -40,10 +40,10 @@ GEM
rake (>= 12.0.0, < 14.0.0)
domain_name (0.5.20190701)
unf (>= 0.0.5, < 1.0.0)
dotenv (2.7.6)
dotenv (2.8.1)
emoji_regex (3.2.3)
excon (0.92.3)
faraday (1.10.0)
excon (0.92.4)
faraday (1.10.1)
faraday-em_http (~> 1.0)
faraday-em_synchrony (~> 1.0)
faraday-excon (~> 1.1)
Expand Down Expand Up @@ -72,7 +72,7 @@ GEM
faraday_middleware (1.2.0)
faraday (~> 1.0)
fastimage (2.2.6)
fastlane (2.208.0)
fastlane (2.209.0)
CFPropertyList (>= 2.3, < 4.0.0)
addressable (>= 2.8, < 3.0.0)
artifactory (~> 3.0)
Expand Down Expand Up @@ -129,19 +129,19 @@ GEM
google-apis-core (>= 0.7, < 2.a)
google-apis-playcustomapp_v1 (0.10.0)
google-apis-core (>= 0.7, < 2.a)
google-apis-storage_v1 (0.18.0)
google-apis-storage_v1 (0.17.0)
google-apis-core (>= 0.7, < 2.a)
google-cloud-core (1.6.0)
google-cloud-env (~> 1.0)
google-cloud-errors (~> 1.0)
google-cloud-env (1.6.0)
faraday (>= 0.17.3, < 3.0)
google-cloud-errors (1.2.0)
google-cloud-storage (1.37.0)
google-cloud-storage (1.38.0)
addressable (~> 2.8)
digest-crc (~> 0.4)
google-apis-iamcredentials_v1 (~> 0.1)
google-apis-storage_v1 (~> 0.1)
google-apis-storage_v1 (~> 0.17.0)
google-cloud-core (~> 1.6)
googleauth (>= 0.16.2, < 2.a)
mini_mime (~> 1.0)
Expand Down
20 changes: 10 additions & 10 deletions packages/smooth_app/ios/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ GEM
artifactory (3.0.15)
atomos (0.1.3)
aws-eventstream (1.2.0)
aws-partitions (1.608.0)
aws-sdk-core (3.131.3)
aws-partitions (1.617.0)
aws-sdk-core (3.132.0)
aws-eventstream (~> 1, >= 1.0.2)
aws-partitions (~> 1, >= 1.525.0)
aws-sigv4 (~> 1.1)
Expand All @@ -27,7 +27,7 @@ GEM
aws-sdk-core (~> 3, >= 3.127.0)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.4)
aws-sigv4 (1.5.0)
aws-sigv4 (1.5.1)
aws-eventstream (~> 1, >= 1.0.2)
babosa (1.0.4)
blockenspiel (0.5.0)
Expand All @@ -41,10 +41,10 @@ GEM
rake (>= 12.0.0, < 14.0.0)
domain_name (0.5.20190701)
unf (>= 0.0.5, < 1.0.0)
dotenv (2.7.6)
dotenv (2.8.1)
emoji_regex (3.2.3)
excon (0.92.3)
faraday (1.10.0)
excon (0.92.4)
faraday (1.10.1)
faraday-em_http (~> 1.0)
faraday-em_synchrony (~> 1.0)
faraday-excon (~> 1.1)
Expand Down Expand Up @@ -73,7 +73,7 @@ GEM
faraday_middleware (1.2.0)
faraday (~> 1.0)
fastimage (2.2.6)
fastlane (2.208.0)
fastlane (2.209.0)
CFPropertyList (>= 2.3, < 4.0.0)
addressable (>= 2.8, < 3.0.0)
artifactory (~> 3.0)
Expand Down Expand Up @@ -130,19 +130,19 @@ GEM
google-apis-core (>= 0.7, < 2.a)
google-apis-playcustomapp_v1 (0.10.0)
google-apis-core (>= 0.7, < 2.a)
google-apis-storage_v1 (0.18.0)
google-apis-storage_v1 (0.17.0)
google-apis-core (>= 0.7, < 2.a)
google-cloud-core (1.6.0)
google-cloud-env (~> 1.0)
google-cloud-errors (~> 1.0)
google-cloud-env (1.6.0)
faraday (>= 0.17.3, < 3.0)
google-cloud-errors (1.2.0)
google-cloud-storage (1.37.0)
google-cloud-storage (1.38.0)
addressable (~> 2.8)
digest-crc (~> 0.4)
google-apis-iamcredentials_v1 (~> 0.1)
google-apis-storage_v1 (~> 0.1)
google-apis-storage_v1 (~> 0.17.0)
google-cloud-core (~> 1.6)
googleauth (>= 0.16.2, < 2.a)
mini_mime (~> 1.0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,20 @@ class SmoothListTileCard extends StatelessWidget {

@override
Widget build(BuildContext context) => SmoothCard(
child: ListTile(
padding: EdgeInsets.zero,
child: InkWell(
borderRadius: ROUNDED_BORDER_RADIUS,
onTap: onTap,
title: title,
subtitle: subtitle,
leading: leading,
trailing: Icon(ConstantIcons.instance.getForwardIcon()),
child: Padding(
padding: const EdgeInsets.all(5.0),
child: ListTile(
onTap: onTap,
title: title,
subtitle: subtitle,
leading: leading,
trailing: Icon(ConstantIcons.instance.getForwardIcon()),
),
),
),
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ class SmoothTextFormField extends StatefulWidget {
this.onChanged,
this.onFieldSubmitted,
this.autofocus,
this.focusNode,
});

final TextFieldTypes type;
Expand All @@ -37,6 +38,7 @@ class SmoothTextFormField extends StatefulWidget {
final void Function(String?)? onChanged;
final ValueChanged<String>? onFieldSubmitted;
final bool? autofocus;
final FocusNode? focusNode;

@override
State<SmoothTextFormField> createState() => _SmoothTextFormFieldState();
Expand Down Expand Up @@ -68,6 +70,7 @@ class _SmoothTextFormFieldState extends State<SmoothTextFormField> {
obscureText: _obscureText,
enableSuggestions: enableSuggestions,
autocorrect: autocorrect,
focusNode: widget.focusNode,
autofillHints: widget.autofillHints,
autofocus: widget.autofocus ?? false,
autovalidateMode: AutovalidateMode.onUserInteraction,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import 'dart:convert';

import 'package:openfoodfacts/model/parameter/BarcodeParameter.dart';
import 'package:openfoodfacts/openfoodfacts.dart';
import 'package:openfoodfacts/utils/ProductListQueryConfiguration.dart';
import 'package:smooth_app/data_models/product_list.dart';
import 'package:smooth_app/database/dao_product.dart';
import 'package:smooth_app/database/dao_product_list.dart';
Expand Down Expand Up @@ -67,13 +67,15 @@ class ProductListImportExport {
Future<List<Product>> _fetchProducts(
Iterable<String> barcodes,
) async {
final SearchResult searchResult = await OpenFoodAPIClient.getProductList(
final SearchResult searchResult = await OpenFoodAPIClient.searchProducts(
ProductQuery.getUser(),
ProductListQueryConfiguration(
barcodes.toList(growable: false),
ProductSearchQueryConfiguration(
fields: ProductQuery.fields,
language: ProductQuery.getLanguage(),
country: ProductQuery.getCountry(),
parametersList: <Parameter>[
BarcodeParameter.list(barcodes.toList(growable: false)),
],
),
);

Expand Down
4 changes: 4 additions & 0 deletions packages/smooth_app/lib/l10n/app_en.arb
Original file line number Diff line number Diff line change
Expand Up @@ -1574,6 +1574,10 @@
"@world_results_action": {
"description": "Label for the action button that displays the results from the entire world"
},
"clipboard_barcode_copy": "Copy barcode to clipboard",
"@clipboard_barcode_copied": {
"description": "Action (tooltip) to copy a barcode to the clipboard"
},
"clipboard_barcode_copied": "Barcode {barcode} copied to the clipboard!",
"@clipboard_barcode_copied": {
"description": "Snackbar label after clipboard copy",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import 'package:flutter/material.dart';
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:matomo_tracker/matomo_tracker.dart';
import 'package:openfoodfacts/model/parameter/BarcodeParameter.dart';
import 'package:openfoodfacts/openfoodfacts.dart';
import 'package:openfoodfacts/utils/ProductListQueryConfiguration.dart';
import 'package:provider/provider.dart';
import 'package:smooth_app/data_models/product_list.dart';
import 'package:smooth_app/data_models/up_to_date_product_provider.dart';
Expand Down Expand Up @@ -360,13 +360,15 @@ class _ProductListPageState extends State<ProductListPage>
final LocalDatabase localDatabase,
) async {
try {
final SearchResult searchResult = await OpenFoodAPIClient.getProductList(
final SearchResult searchResult = await OpenFoodAPIClient.searchProducts(
ProductQuery.getUser(),
ProductListQueryConfiguration(
barcodes,
ProductSearchQueryConfiguration(
fields: ProductQuery.fields,
language: ProductQuery.getLanguage(),
country: ProductQuery.getCountry(),
parametersList: <Parameter>[
BarcodeParameter.list(barcodes),
],
),
);
final List<Product>? freshProducts = searchResult.products;
Expand Down

0 comments on commit dbcd334

Please sign in to comment.