What problem does this solve?
Barcode scanning buttons have inconsistent sizes across the app, creating a confusing user experience:
- Meal Editor (when adding ingredients to a meal/recipe): Large button with full icon + label visibility
- Foods screen: Medium inline button within the search bar
- Diary quick-add (logging a meal to the diary): Very small icon button
- Food Editor (creating/editing a food): Small inline button next to barcode input
This inconsistency makes some scan buttons hard to notice or tap, especially on mobile. Users expect the scan button to be prominent and easy to access in all contexts, since barcode scanning is a primary feature for quick food logging.
Proposed solution
Standardize all barcode scan buttons to use the large, prominent style currently seen in the Meal Editor ingredient picker. The big button:
- Makes the feature discoverable and easy to tap
- Provides clear feedback that scanning is available
- Improves mobile usability (larger tap target)
- Matches the prominence of other primary actions (Add buttons, Save buttons)
Implementation approach:
-
Define a reusable ScanButton component (or CSS class .btn-scan-prominent) with:
- Button class:
btn btn-primary or btn btn-accent
- Icon:
barcode_scanner (material-symbols-rounded)
- Label text: "Scan" or "Scan Barcode"
- Consistent height/padding across all instances
-
Update all barcode scan button locations:
MealEditor.svelte (line 954): ingredient picker header — already large, use as reference
Diary.svelte: quick-add meal logging flow — make prominent
Foods.svelte (line 887): foods search bar — upgrade from inline to prominent
FoodEditor.svelte (line 854): barcode input section — upgrade from inline to prominent
-
Consider placement:
- In modal headers (Meal Editor picker): small icon button is OK
- In main screens and dialogs: use large button with label
- Avoid tiny inline buttons unless space is extremely constrained
-
Accessibility:
- Ensure all buttons have
aria-label="Scan barcode" or title="Scan barcode"
- Min tap target 44×44px (iOS) / 48×48dp (Android)
Alternatives you've considered
- Icon-only buttons everywhere: Harder to discover, doesn't solve the inconsistency
- Keyboard shortcut (e.g. Ctrl+B): Good supplement but doesn't fix the UI consistency issue
- Quick-access FAB (floating action button): Could work but adds clutter when multiple actions exist
Additional context
Current implementations:
- Large (Meal Editor, line 954):
<button class="btn-icon" on:click={() => _pickerScannerOpen = true}>
<span class="material-symbols-rounded">barcode_scanner</span>
</button>
What problem does this solve?
Barcode scanning buttons have inconsistent sizes across the app, creating a confusing user experience:
This inconsistency makes some scan buttons hard to notice or tap, especially on mobile. Users expect the scan button to be prominent and easy to access in all contexts, since barcode scanning is a primary feature for quick food logging.
Proposed solution
Standardize all barcode scan buttons to use the large, prominent style currently seen in the Meal Editor ingredient picker. The big button:
Implementation approach:
Define a reusable
ScanButtoncomponent (or CSS class.btn-scan-prominent) with:btn btn-primaryorbtn btn-accentbarcode_scanner(material-symbols-rounded)Update all barcode scan button locations:
MealEditor.svelte(line 954): ingredient picker header — already large, use as referenceDiary.svelte: quick-add meal logging flow — make prominentFoods.svelte(line 887): foods search bar — upgrade from inline to prominentFoodEditor.svelte(line 854): barcode input section — upgrade from inline to prominentConsider placement:
Accessibility:
aria-label="Scan barcode"ortitle="Scan barcode"Alternatives you've considered
Additional context
Current implementations: