commit-crimes / shelf-life

1 stars 0 forks source link

Feat/40 implement individual food item screens #139

Closed frostymate closed 1 day ago

frostymate commented 1 week ago

These changes collectively enhance the user experience by providing detailed views of individual food items and ensuring robust test coverage for new features.This pull request introduces a new feature allowing users to view details of individual food items within the ShelfLife app. The changes include updates to navigation, view models, and UI components to support this feature. I have added nice UI Screen. However, there are things to be worked on as I need to add testing which will be done in [#91], additionally there are some values like font sizes that are hardcoded that I will eventually do. Finally, I believe that the database has to be structured in a way that food items should be collections and each food item should have sub-collections containing their instances. This would make retrieval of instances of the same Food Item very efficient however this is quite an ambitious task that I will leave for M3.

Navigation and Routing Enhancements:

ViewModel Updates:

UI Component Modifications:

New UI Screen:

New Utility Component:

Test Coverage:

Code Refactoring:

frostymate commented 2 days ago

Some difficulties were encountered as my first attempt of passing the selectedFoodItem as a parameter was quite complicated to test and was very complex. So instead I am using the viewModel in order to interact and store the selectedFoodItem.

frostymate commented 2 days ago

The Coverage of New Code is under 80 but for the main files modified/added they have a high coverage. The other files will have their coverage increased before M2.

sonarcloud[bot] commented 1 day ago

Quality Gate Failed Quality Gate failed

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

See analysis details on SonarQube Cloud