nickslick03 / messiah-meal-planner

1 stars 0 forks source link

Custom meal editor #30

Closed cdrice26 closed 1 month ago

cdrice26 commented 1 month ago

Implemented the custom meal editor, these meals now work just like anything else and can be edited and deleted, and they do persist. Note that editing a custom meal does NOT update it in the meal queue/day editor, but this is also true for normal meals at the moment due to the way our overall implementation works. Given this can be confusing, it may be worth changing in a future sprint, but it’s outside the scope of this PR.

nickslick03 commented 1 month ago

Looks great! I think updating a custom meal in the available meals should update all the associated meals. I also think there should be a checkbox to toggle showing just the custom meals, but this can be added after we implement a search bar since we'll already have filtering capabilities in place. I just did some major prop drilling and made it so that whenever a user adds a custom meal, the table scrolls to the row of that meal. Check it out, it currently goes to the center but I'm open to changing it to scroll to have the meal at the top. You can merge when you think it's ready.

cdrice26 commented 1 month ago

Auto-scrolling looks great to me, I'm going to merge. I agree that synchronization is necessary, and probably should exist for normal meals too in case of price increases and menu changes, I might actually have time tomorrow to restructure to implement this, it will be a major refactor but shouldn't affect the calculation engine and should be relatively straightforward to implement, but I'll make that a separate PR.