This PR introduces navigation to the EditFoodItemScreen from the IndividualFoodItemScreen, along with several formatting improvements and minor code cleanup. These changes enhance navigation functionality, streamline the code, and ensure adherence to consistent code style.
Changes
Navigation Addition:
Added a Floating Action Button (FAB) on the IndividualFoodItemScreen, allowing users to navigate to the EditFoodItemScreen for editing food item details. This improves the user flow by enabling quick access to editing.
Code Formatting:
Applied ktfmt for consistent formatting across files, improving readability and adhering to project coding standards.
Adjusted layout arrangements, alignment properties, and minor modifications for a cleaner UI layout.
Code Cleanup:
Removed unused imports and variables across several files to reduce clutter and improve maintainability.
Streamlined modifier usage and eliminated redundant code for enhanced code clarity.
Formatting and Cleanup: BarcodeScannerScreenTest.kt, FoodInputContent.kt, EditFoodItem.kt, AddRecipe.kt, and FoodItemDetails.kt
Testing
Verified navigation to the EditFoodItemScreen from the IndividualFoodItemScreen via the FAB.
Ensured all affected components render correctly after formatting changes.
Confirmed that all unit tests and UI tests pass successfully without regressions.
Additional Notes
These changes pave the way for a smoother user experience and maintain a consistent, readable codebase. Further navigation enhancements can be considered for a more comprehensive in-app flow.
Update
Fixed two small bugs:
Individual Food Item Screen now displays the dates with proper slashes (involved making a new parsing function that added the slashes and making a test for it)
SelectedFoodItem is updated when the submit button in editFoodItemScreen is clicked
Thank you for your time and consideration in reviewing this pull request.
Summary
This PR introduces navigation to the
EditFoodItemScreen
from theIndividualFoodItemScreen
, along with several formatting improvements and minor code cleanup. These changes enhance navigation functionality, streamline the code, and ensure adherence to consistent code style.Changes
Navigation Addition:
IndividualFoodItemScreen
, allowing users to navigate to theEditFoodItemScreen
for editing food item details. This improves the user flow by enabling quick access to editing.Code Formatting:
ktfmt
for consistent formatting across files, improving readability and adhering to project coding standards.Code Cleanup:
Files Affected
MainActivity.kt
,IndividualFoodItem.kt
,NavigationActions.kt
BarcodeScannerScreenTest.kt
,FoodInputContent.kt
,EditFoodItem.kt
,AddRecipe.kt
, andFoodItemDetails.kt
Testing
EditFoodItemScreen
from theIndividualFoodItemScreen
via the FAB.Additional Notes
These changes pave the way for a smoother user experience and maintain a consistent, readable codebase. Further navigation enhancements can be considered for a more comprehensive in-app flow.
Update
Fixed two small bugs:
Thank you for your time and consideration in reviewing this pull request.