commit-crimes / shelf-life

1 stars 0 forks source link

Add Navigation to EditFoodItemScreen and Code Formatting Enhancements #173

Closed matvitn closed 4 hours ago

matvitn commented 8 hours ago

Summary

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

  1. 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.
  2. 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.
  3. 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.

Files Affected

Testing

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:

  1. 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)
  2. SelectedFoodItem is updated when the submit button in editFoodItemScreen is clicked

Thank you for your time and consideration in reviewing this pull request.

sonarcloud[bot] commented 5 hours ago

Quality Gate Failed Quality Gate failed

Failed conditions
59.8% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud