Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request adds support for drag-and-drop reordering and improved management of shopping list items, along with user confirmation dialogs for deleting ingredients and recipes. The changes introduce new converters and properties to support drag-and-drop UI feedback, update the shopping list service and model to maintain item order, and enhance the ViewModel with new commands and drag-and-drop logic.
Drag-and-drop and reordering support:
IsBeingDragged,IsBeingDraggedOver, andOrderproperties to theIngredientmodel to track drag state and item order. (FoodbookApp.App/Models/Ingredient.cs)Orderproperty toShoppingListItemto persist item order in the database. (FoodbookApp.App/Models/ShoppingListItem.cs)DragStateToColorConverter,DropZoneToColorConverter,DropZoneBorderColorConverter) for drag-and-drop visual feedback. (FoodbookApp.App/Converters/BoolToColorConverter.cs)ShoppingListDetailViewModelto include commands and logic for moving, dragging, and dropping items, and to handle property changes for saving order and state. (FoodbookApp.App/ViewModels/ShoppingListDetailViewModel.cs) [1] [2] [3] [4] [5]Shopping list service improvements:
GetShoppingListWithCheckedStateAsyncto merge and order recipe and manually added ingredients, and persist order and quantity changes. (FoodbookApp.App/Services/ShoppingListService.cs) [1] [2]SaveAllShoppingListStatesAsyncto save the order and prevent removal of manually added items. Added helper to identify manually added items. (FoodbookApp.App/Services/ShoppingListService.cs)RemoveShoppingListItemAsyncmethod to allow removal of individual shopping list items. (FoodbookApp.App/Services/IShoppingListService.cs,FoodbookApp.App/Services/ShoppingListService.cs) [1] [2]User experience enhancements:
FoodbookApp.App/ViewModels/IngredientsViewModel.cs,FoodbookApp.App/ViewModels/RecipeViewModel.cs) [1] [2]