Skip to content

Commit

Permalink
Merge branch 'develop' into feat/5987
Browse files Browse the repository at this point in the history
  • Loading branch information
monsieurtanuki authored Dec 13, 2024
2 parents cfc2642 + 331fb64 commit a0a9ddc
Show file tree
Hide file tree
Showing 17 changed files with 310 additions and 208 deletions.
32 changes: 16 additions & 16 deletions packages/smooth_app/android/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,20 @@ GEM
artifactory (3.0.17)
atomos (0.1.3)
aws-eventstream (1.3.0)
aws-partitions (1.992.0)
aws-sdk-core (3.210.0)
aws-partitions (1.1019.0)
aws-sdk-core (3.214.0)
aws-eventstream (~> 1, >= 1.3.0)
aws-partitions (~> 1, >= 1.992.0)
aws-sigv4 (~> 1.9)
jmespath (~> 1, >= 1.6.1)
aws-sdk-kms (1.95.0)
aws-sdk-kms (1.96.0)
aws-sdk-core (~> 3, >= 3.210.0)
aws-sigv4 (~> 1.5)
aws-sdk-s3 (1.169.0)
aws-sdk-s3 (1.176.0)
aws-sdk-core (~> 3, >= 3.210.0)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.5)
aws-sigv4 (1.10.0)
aws-sigv4 (1.10.1)
aws-eventstream (~> 1, >= 1.0.2)
babosa (1.0.4)
base64 (0.2.0)
Expand Down Expand Up @@ -74,7 +74,7 @@ GEM
faraday_middleware (1.2.1)
faraday (~> 1.0)
fastimage (2.3.1)
fastlane (2.225.0)
fastlane (2.226.0)
CFPropertyList (>= 2.3, < 4.0.0)
addressable (>= 2.8, < 3.0.0)
artifactory (~> 3.0)
Expand Down Expand Up @@ -114,7 +114,7 @@ GEM
tty-spinner (>= 0.8.0, < 1.0.0)
word_wrap (~> 1.0.0)
xcodeproj (>= 1.13.0, < 2.0.0)
xcpretty (~> 0.3.0)
xcpretty (~> 0.4.0)
xcpretty-travis-formatter (>= 0.0.3, < 2.0.0)
fastlane-plugin-flutter_dart_version_manager (0.1.5)
fastlane-plugin-versioning (0.7.0)
Expand Down Expand Up @@ -158,21 +158,21 @@ GEM
os (>= 0.9, < 2.0)
signet (>= 0.16, < 2.a)
highline (2.0.3)
http-cookie (1.0.7)
http-cookie (1.0.8)
domain_name (~> 0.5)
httpclient (2.8.3)
jmespath (1.6.2)
json (2.7.2)
json (2.9.0)
jwt (2.9.3)
base64
mini_magick (4.13.2)
mini_mime (1.1.5)
multi_json (1.15.0)
multipart-post (2.4.1)
nanaimo (0.3.0)
nanaimo (0.4.0)
naturally (2.2.1)
nkf (0.2.0)
optparse (0.5.0)
optparse (0.6.0)
os (1.1.4)
plist (3.7.1)
public_suffix (6.0.1)
Expand All @@ -183,7 +183,7 @@ GEM
uber (< 0.2.0)
retriable (3.1.2)
rexml (3.3.9)
rouge (2.0.7)
rouge (3.28.0)
ruby2_keywords (0.0.5)
rubyzip (2.3.2)
security (0.1.5)
Expand All @@ -207,15 +207,15 @@ GEM
uber (0.1.0)
unicode-display_width (2.6.0)
word_wrap (1.0.0)
xcodeproj (1.25.1)
xcodeproj (1.27.0)
CFPropertyList (>= 2.3.3, < 4.0)
atomos (~> 0.1.3)
claide (>= 1.0.2, < 2.0)
colored2 (~> 3.1)
nanaimo (~> 0.3.0)
nanaimo (~> 0.4.0)
rexml (>= 3.3.6, < 4.0)
xcpretty (0.3.0)
rouge (~> 2.0.7)
xcpretty (0.4.0)
rouge (~> 3.28.0)
xcpretty-travis-formatter (1.0.1)
xcpretty (~> 0.2, >= 0.0.7)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import 'package:auto_size_text/auto_size_text.dart';
import 'package:flutter/material.dart';
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
import 'package:provider/provider.dart';
Expand Down Expand Up @@ -179,7 +180,7 @@ class _SmoothProductCardHeader extends StatelessWidget {
),
SizedBox(width: dense ? BALANCED_SPACE : MEDIUM_SPACE),
Expanded(
child: Text(
child: AutoSizeText(
label,
maxLines: 1,
overflow: TextOverflow.ellipsis,
Expand Down Expand Up @@ -326,7 +327,7 @@ class ScanProductBaseCardButton extends StatelessWidget {
});

final String text;
final VoidCallback onTap;
final VoidCallback? onTap;

@override
Widget build(BuildContext context) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,55 +37,80 @@ class ScanProductCardNotFound extends StatelessWidget {
end: 5.0,
child: OrangeErrorAnimation(),
),
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
ScanProductBaseCardTitle(
title: appLocalizations.carousel_unknown_product_title,
padding: EdgeInsetsDirectional.only(
top: dense ? 0.0 : 5.0,
end: 25.0,
),
),
SizedBox(height: dense ? BALANCED_SPACE : LARGE_SPACE),
ScanProductBaseCardText(
text: TextWithBubbleParts(
text: appLocalizations.carousel_unknown_product_text,
backgroundColor: theme.primarySemiDark,
textStyle: const TextStyle(
fontSize: 14.5,
child: LayoutBuilder(
builder: (BuildContext context, BoxConstraints constraints) {
final Widget spacer;

if (dense) {
spacer = const SizedBox(height: MEDIUM_SPACE);
} else {
spacer = const Spacer();
}

final Widget child = Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
ScanProductBaseCardTitle(
title: appLocalizations.carousel_unknown_product_title,
padding: EdgeInsetsDirectional.only(
top: dense ? 0.0 : 5.0,
end: 25.0,
),
),
SizedBox(height: dense ? BALANCED_SPACE : LARGE_SPACE),
ScanProductBaseCardText(
text: TextWithBubbleParts(
text: appLocalizations.carousel_unknown_product_text,
backgroundColor: theme.primarySemiDark,
textStyle: const TextStyle(
fontSize: 14.5,
),
bubbleTextStyle: const TextStyle(
color: Colors.white,
fontWeight: FontWeight.w600,
fontSize: 13.5,
),
bubblePadding: const EdgeInsetsDirectional.only(
top: 2.5,
bottom: 3.5,
start: 10.0,
end: 10.0,
),
),
),
ScanProductBaseCardBarcode(
barcode: barcode,
height: 75.0,
padding: const EdgeInsetsDirectional.only(top: MEDIUM_SPACE),
),
bubbleTextStyle: const TextStyle(
color: Colors.white,
fontWeight: FontWeight.w600,
fontSize: 13.5,
spacer,
ScanProductBaseCardButton(
text: appLocalizations.carousel_unknown_product_button,
onTap: dense ? () => _onTap(context) : null,
),
bubblePadding: const EdgeInsetsDirectional.only(
top: 2.5,
bottom: 3.5,
start: 10.0,
end: 10.0,
],
);

if (dense) {
return SingleChildScrollView(
child: InkWell(
onTap: () => _onTap(context),
child: child,
),
),
),
ScanProductBaseCardBarcode(
barcode: barcode,
height: 75.0,
padding: const EdgeInsetsDirectional.only(top: MEDIUM_SPACE),
),
const Spacer(),
ScanProductBaseCardButton(
text: appLocalizations.carousel_unknown_product_button,
onTap: () async {
await AppNavigator.of(context).push(
AppRoutes.PRODUCT_CREATOR(barcode),
);
await onAddProduct?.call();
},
),
],
);
} else {
return child;
}
},
),
);
}

Future<void> _onTap(BuildContext context) async {
await AppNavigator.of(context).push(
AppRoutes.PRODUCT_CREATOR(barcode),
);
await onAddProduct?.call();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ class ProductCompatibilityHelper {
String? getFormattedScore() {
if (_score == null || status == MatchedProductStatusV2.UNKNOWN_MATCH) {
return null;
} else if (_score == 0) {
return '0';
}

return NumberFormat('00').format(_score.toInt());
Expand Down
30 changes: 15 additions & 15 deletions packages/smooth_app/lib/l10n/app_bg.arb
Original file line number Diff line number Diff line change
Expand Up @@ -1349,7 +1349,7 @@
"@crash_reporting_toggle_title": {
"description": "Title for the Crash reporting toggle"
},
"crash_reporting_toggle_subtitle": "When enabled, crash reports are automatically submitted to Open Food Facts' error tracking system, so that bugs can be fixed and thus improve the app.",
"crash_reporting_toggle_subtitle": "Когато е активирано, докладите за сривове се изпращат автоматично до системата за проследяване на грешки на Open Food Facts, така че те да бъдат коригирани и да се подобри приложението.",
"@crash_reporting_toggle_subtitle": {
"description": "SubTitle for the Crash reporting toggle"
},
Expand Down Expand Up @@ -1884,8 +1884,8 @@
},
"prices_app_dev_mode_flag": "Shortcut to Prices app on product page",
"prices_app_button": "Go to Prices app",
"prices_generic_title": "Prices",
"prices_add_n_prices": "{count,plural, =1{Add a price} other{Add {count} prices}}",
"prices_generic_title": "Цени",
"prices_add_n_prices": "{count,plural, =1{Добави цена} other{Добави {count} цени}}",
"prices_send_n_prices": "{count,plural, =1{Send the price} other{Send {count} prices}}",
"prices_add_an_item": "Add an item",
"prices_add_a_price": "Add a price",
Expand Down Expand Up @@ -2013,19 +2013,19 @@
},
"prices_amount_subtitle": "Amount",
"prices_amount_is_discounted": "Is discounted?",
"prices_amount_price_normal": "Price",
"prices_amount_price_normal": "Цена",
"prices_amount_price_discounted": "Discounted price",
"prices_amount_price_not_discounted": "Original price",
"prices_amount_no_product": "One product is missing!",
"prices_amount_price_incorrect": "Incorrect value",
"prices_amount_price_mandatory": "Mandatory value",
"prices_currency_subtitle": "Currency",
"prices_date_subtitle": "Date",
"prices_location_subtitle": "Shop",
"prices_currency_subtitle": "Валута",
"prices_date_subtitle": "Дата",
"prices_location_subtitle": "Магазин",
"prices_location_find": "Find a shop",
"prices_location_mandatory": "You need to select a shop!",
"prices_location_search_broader": "Couldn't find what you were looking for? Let's try a broader search!",
"prices_proof_subtitle": "Proof",
"prices_proof_subtitle": "Доказателство",
"prices_proof_find": "Select a proof",
"prices_proof_receipt": "Receipt",
"prices_proof_price_tag": "Price tag",
Expand Down Expand Up @@ -2150,7 +2150,7 @@
"@all_search_to_be_completed_title": {
"description": "All products to be completed: list tile title"
},
"categorize_products_country_title": "Help categorize products in your country",
"categorize_products_country_title": "Помогни с категоризирането на продукти в страната си",
"@categorize_products_country_title": {
"description": "Help categorize products in your country: list tile title"
},
Expand Down Expand Up @@ -2469,8 +2469,8 @@
"description": "Label for expanding nutrition facts table in application setting"
},
"expand_ingredients_body": "Дръж панела на съставките разгънат",
"search_product_filter_visibility_title": "Show a filter in the search",
"search_product_filter_visibility_subtitle": "Select search site: Open Food Facts, Open Beauty Facts, Open Pet Food Facts or Open Products Facts",
"search_product_filter_visibility_title": "Показване на филтър в търсенето",
"search_product_filter_visibility_subtitle": "Избер на сайт за търсене: Open Food Facts, Open Beauty Facts, Open Pet Food Facts или Open Products Facts",
"@search_product_filter_visibility_subtitle": {
"description": "Label for showing the product type filter in the search bar"
},
Expand Down Expand Up @@ -2986,7 +2986,7 @@
"@country_selector_title": {
"description": "Label written as the title of the dialog to select the user country"
},
"currency_selector_title": "Select your currency:",
"currency_selector_title": "Избери валута:",
"@currency_selector_title": {
"description": "Label written as the title of the dialog to select the user currency"
},
Expand Down Expand Up @@ -3204,15 +3204,15 @@
}
}
},
"photo_viewer_details_date_title": "Date",
"photo_viewer_details_date_title": "Дата",
"@photo_viewer_details_date_title": {
"description": "Label for the uploaded date of a photo"
},
"photo_viewer_details_url_title": "URL",
"@photo_viewer_details_url_title": {
"description": "Label for the link of a photo"
},
"product_page_compatibility_score": "Compatible",
"product_page_compatibility_score": "Съвместим",
"@product_page_compatibility_score": {
"description": "Compatibility score on top of the product page. The sentence is \"100%\" Compatible"
},
Expand Down Expand Up @@ -3402,5 +3402,5 @@
"photo_field_packaging": "Снимка с информация за опаковката",
"photo_already_exists": "This photo already exists",
"photo_missing": "This photo is missing",
"date": "Date"
"date": "Дата"
}
Loading

0 comments on commit a0a9ddc

Please sign in to comment.