Skip to content

Commit

Permalink
feat: Edit product page with product type + footer (#6313)
Browse files Browse the repository at this point in the history
* Edit product page with product type + footer

* Revert background_task_image

* Haptic feedback for barcode copy

* Fix a regression with TopBar2
  • Loading branch information
g123k authored Jan 30, 2025
1 parent 47421d1 commit 61585ca
Show file tree
Hide file tree
Showing 31 changed files with 1,078 additions and 377 deletions.
Binary file modified packages/smooth_app/assets/fonts/SmoothIcons.ttf
Binary file not shown.
9 changes: 9 additions & 0 deletions packages/smooth_app/assets/fonts/icons/checklist.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
98 changes: 98 additions & 0 deletions packages/smooth_app/assets/fonts/icons/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -1901,6 +1901,104 @@
"search": [
"add_circled"
]
},
{
"uid": "f127f70a024ac437bcee8a9fa2313d5c",
"css": "message_edit",
"code": 59532,
"src": "custom_icons",
"selected": true,
"svg": {
"path": "M834 584.4L920.1 670.6 672.5 918.2 586.4 918.2 586.4 832.1 834 584.4ZM934.6 509.1C950.1 509.1 965.7 515 977.6 526.9 1001.4 550.7 1001.4 589.3 977.6 613L952.4 638.3 866.3 552.2 891.5 526.9C903.4 515 919 509.1 934.6 509.1ZM818.2 100C864.7 100 902.7 135.1 908 180.3L454.5 463.6 1.1 180.3C6.4 135.1 44.4 100 90.9 100ZM0 270.5L0 736.4C0 786.6 40.7 827.3 90.9 827.3L462.4 827.3 909.1 380.5 909.1 270.5 478.6 539.5C463.9 548.8 445.2 548.8 430.5 539.5L0 270.5Z",
"width": 1000
},
"search": [
"message_edit"
]
},
{
"uid": "f544fdc2596647b8e31c11f35f42366c",
"css": "checklist",
"code": 59527,
"src": "custom_icons",
"selected": true,
"svg": {
"path": "M500 0C434.8 0 379.8 41.9 359.2 100L150 100C94.8 100 50 144.8 50 200L50 900C50 955.3 94.8 1000 150 1000L850 1000C905.3 1000 950 955.3 950 900L950 200C950 144.8 905.3 100 850 100L640.8 100C620.2 41.9 565.2 0 500 0ZM500 100C527.6 100 550 122.4 550 150 550 177.6 527.6 200 500 200L850 200 850 900 150 900 150 200 500 200C472.4 200 450 177.6 450 150 450 122.4 472.4 100 500 100ZM620.7 300L549.9 370.7 604.3 425.1 550 479.3 620.7 550.1 675 495.8 729.2 550 799.9 479.3 745.7 425.1 800 370.8 729.3 300.1 675 354.4 620.7 300ZM250 400L250 500 450 500 450 400 250 400ZM620.7 600L549.9 670.7 604.3 725 550 779.3 620.7 850 675 795.7 729.2 850 799.9 779.3 745.7 725 800 670.7 729.3 600 675 654.3 620.7 600ZM250 700L250 800 450 800 450 700 250 700Z",
"width": 1000
},
"search": [
"checklist"
]
},
{
"uid": "e58cbdad28f2345ec3e53bc8bd940f39",
"css": "copy",
"code": 59528,
"src": "custom_icons",
"selected": true,
"svg": {
"path": "M345.9 0C301.7 0 265.9 35.8 265.9 80L265.9 720C265.9 764.2 301.7 800 345.9 800L865.9 800C910.1 800 945.9 764.2 945.9 720L945.9 260C945.9 249.4 941.7 239.2 934.2 231.7L714.2 11.7C706.7 4.2 696.5 0 685.9 0L345.9 0ZM665.9 76.2L869.7 280 705.9 280C683.8 280 665.9 262.1 665.9 240L665.9 76.2ZM145.9 200C101.7 200 65.9 235.8 65.9 280L65.9 920C65.9 964.2 101.7 1000 145.9 1000L665.9 1000C710.1 1000 745.9 964.2 745.9 920L745.9 880 345.9 880C257.7 880 185.9 808.2 185.9 720L185.9 200 145.9 200Z",
"width": 1000
},
"search": [
"copy"
]
},
{
"uid": "e9fa78ac73f006b0ed19bc2e5fbe2f4a",
"css": "creative_commons_attribution",
"code": 59529,
"src": "custom_icons",
"selected": true,
"svg": {
"path": "M500 0C438.7 0 388.9 49.8 388.9 111.1 388.9 172.4 438.7 222.2 500 222.2 561.3 222.2 611.1 172.4 611.1 111.1 611.1 49.8 561.3 0 500 0ZM498.9 244.4C381.8 244.4 300 335.8 300 466.7L300 680.4 367.7 714.2 390.5 1022.2 609.5 1022.2 632.3 714.2 700 680.4 700 466.7C700 337.9 615.4 244.4 498.9 244.4Z",
"width": 1000
},
"search": [
"creative_commons_attribution"
]
},
{
"uid": "8e395c1f7b5b670c8f1ab3d7bcc12ab0",
"css": "creative_commons_share_alike",
"code": 59530,
"src": "custom_icons",
"selected": true,
"svg": {
"path": "M557.8 4.5C382.7 4.5 237.5 137.4 217.5 307.3L198.2 288C187.4 276.9 172.6 270.6 157.1 270.6 133.9 270.6 112.9 284.7 104.2 306.3 95.4 327.9 100.6 352.6 117.3 368.8L226.7 478.2C237.6 492.4 254.4 500.6 272.3 500.6 290.1 500.5 306.9 492.1 317.7 477.9L426.8 368.8C441.7 354.5 447.7 333.2 442.5 313.1 437.3 293.1 421.6 277.5 401.6 272.2 381.6 267 360.3 273 346 288L334.2 299.7C355.9 196 447.3 118.8 557.8 118.8 684.8 118.8 786.5 220.5 786.5 347.4L786.5 652.3C786.5 779.2 684.8 880.9 557.8 880.9 446.7 880.9 355 802.2 333.8 698 330.1 677.7 315.7 660.9 296.1 654.1 276.5 647.4 254.8 651.8 239.4 665.7 224 679.5 217.3 700.6 221.8 720.8 253.6 877.5 392.5 995.2 557.8 995.2 746.6 995.2 900.8 841 900.8 652.3L900.8 347.4C900.8 158.7 746.6 4.5 557.8 4.5Z",
"width": 1000
},
"search": [
"creative_commons_share_alike"
]
},
{
"uid": "d632778f2ab7f5295fd9b06d7d7f0340",
"css": "creative_commons",
"code": 59531,
"src": "custom_icons",
"selected": true,
"svg": {
"path": "M255 640C278 640 299.7 632.7 317.9 619.1 348.9 595.8 392.7 602.1 415.9 632.9 439.2 663.7 432.9 707.6 402.1 730.9 359.4 763.1 308.6 780 255 780 119.9 780 10 670.1 10 535L10 465C10 329.9 119.9 220 255 220 308.6 220 359.4 236.9 402.1 269.1 432.9 292.3 439.2 336.2 415.9 367.1 392.6 397.9 348.8 404.2 317.9 380.9 299.7 367.3 278 360 255 360 197.1 360 150 407.1 150 465L150 535C150 592.9 197.1 640 255 640ZM815 640C838 640 859.7 632.7 877.9 619.1 908.9 595.8 952.7 602.1 975.9 632.9 999.2 663.7 992.9 707.6 962.1 730.9 919.4 763.1 868.6 780 815 780 679.9 780 570 670.1 570 535L570 465C570 329.9 679.9 220 815 220 868.6 220 919.4 236.9 962.1 269.1 992.9 292.3 999.2 336.2 975.9 367.1 952.6 397.9 908.9 404.2 877.9 380.9 859.7 367.3 838 360 815 360 757.1 360 710 407.1 710 465L710 535C710 592.9 757.1 640 815 640Z",
"width": 1000
},
"search": [
"creative_commons"
]
},
{
"uid": "b06c7b15a16d164cfa19f3ce3c193564",
"css": "drag_start",
"code": 59533,
"src": "custom_icons",
"selected": true,
"svg": {
"path": "M917.5 56.4C917.8 36.4 907.3 17.8 890 7.7 872.7-2.4 851.4-2.4 834.1 7.7 816.8 17.8 806.3 36.4 806.6 56.4L806.6 943.9C806.3 963.9 816.8 982.5 834.1 992.5 851.4 1002.6 872.7 1002.6 890 992.5 907.3 982.5 917.8 963.9 917.5 943.9L917.5 56.4ZM695.6 56.4C695.9 36.4 685.4 17.8 668.1 7.7 650.9-2.4 629.5-2.4 612.2 7.7 594.9 17.8 584.4 36.4 584.7 56.4L584.7 943.9C584.4 963.9 594.9 982.5 612.2 992.5 629.5 1002.6 650.9 1002.6 668.1 992.5 685.4 982.5 695.9 963.9 695.6 943.9L695.6 56.4ZM473.8 56.4C474.1 36.4 463.5 17.8 446.3 7.7 429-2.4 407.6-2.4 390.3 7.7 373.1 17.8 362.6 36.4 362.8 56.4L362.8 943.9C362.6 963.9 373.1 982.5 390.3 992.5 407.6 1002.6 429 1002.6 446.3 992.5 463.5 982.5 474.1 963.9 473.8 943.9L473.8 56.4ZM251.9 366.5C251.9 337.4 216.5 322.7 195.9 343.3L67 472.3C51.6 487.6 51.6 512.6 67 528L195.9 656.9C216.5 677.5 251.9 662.8 251.9 633.6L251.9 366.5Z",
"width": 1000
},
"search": [
"drag_start"
]
}
]
}
7 changes: 7 additions & 0 deletions packages/smooth_app/assets/fonts/icons/copy.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions packages/smooth_app/assets/fonts/icons/creative_commons.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions packages/smooth_app/assets/fonts/icons/drag_start.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified packages/smooth_app/assets/fonts/icons/icons.sketch
Binary file not shown.
7 changes: 7 additions & 0 deletions packages/smooth_app/assets/fonts/icons/message_edit.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified packages/smooth_app/assets/fonts/icons/thumbnail.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ class SmoothListTileCard extends StatelessWidget {
return SmoothCard(
padding: EdgeInsets.zero,
margin: margin ?? const EdgeInsets.all(VERY_SMALL_SPACE),
elevation: 4.0,
child: InkWell(
borderRadius: ROUNDED_BORDER_RADIUS,
onTap: onTap,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ class SmoothFloatingSnackbar extends SnackBar {
required super.content,
super.backgroundColor,
super.elevation,
EdgeInsetsGeometry? margin,
super.padding,
super.width,
super.shape,
Expand All @@ -27,7 +28,7 @@ class SmoothFloatingSnackbar extends SnackBar {
Duration? duration,
super.key,
}) : super(
margin: const EdgeInsetsDirectional.all(SMALL_SPACE),
margin: margin ?? const EdgeInsetsDirectional.all(SMALL_SPACE),
duration: duration ??
(action != null
? const Duration(seconds: 10)
Expand All @@ -39,6 +40,7 @@ class SmoothFloatingSnackbar extends SnackBar {
required BuildContext context,
required String text,
super.elevation,
EdgeInsetsGeometry? margin,
super.padding,
super.width,
super.shape,
Expand All @@ -54,7 +56,7 @@ class SmoothFloatingSnackbar extends SnackBar {
Duration? duration,
super.key,
}) : super(
margin: const EdgeInsetsDirectional.all(SMALL_SPACE),
margin: margin ?? const EdgeInsetsDirectional.all(SMALL_SPACE),
duration: duration ??
(action != null
? const Duration(seconds: 10)
Expand Down
24 changes: 24 additions & 0 deletions packages/smooth_app/lib/l10n/app_en.arb
Original file line number Diff line number Diff line change
Expand Up @@ -3813,5 +3813,29 @@
"type": "String"
}
}
},
"product_footer_action_barcode": "View barcode",
"@product_footer_action_barcode": {
"description": "Action to see the barcode of a product"
},
"product_footer_action_barcode_short": "Barcode",
"@product_footer_action_barcode_short": {
"description": "Action to see the barcode of a product (short text)"
},
"product_footer_action_open_website": "Open website",
"@product_footer_action_open_website": {
"description": "Action to see to open the OxF website of the given product"
},
"product_footer_action_report": "Report",
"@product_footer_action_report": {
"description": "Action to see to report a product"
},
"product_footer_action_contributor_guide": "Help",
"@product_footer_action_contributor_guide": {
"description": "Action to open the contributor's guide. If you are in a non-English language, please translate this sentence instead: \"Help (EN)\""
},
"product_footer_action_data_quality_tags": "Data quality",
"@product_footer_action_data_quality_tags": {
"description": "Action to view data quality warnings"
}
}
Loading

0 comments on commit 61585ca

Please sign in to comment.