Implement the error screen designs for the various cases#206
Merged
Conversation
MrPeterss
approved these changes
Nov 21, 2025
Contributor
MrPeterss
left a comment
There was a problem hiding this comment.
Nice work! Looks great. Shoot me a DM/text when you want to merge and I'll bypass the branch restrictions, but next time try your best to keep it under 500 🙏
| // Determine if this eatery has no retrievable menu | ||
| let hasMenu = (selectedEvent?.menu?.categories.isEmpty == false) | ||
| if !hasMenu { | ||
| delegate?.compareMenusEateryViewControllerDidFailToLoadMenu(self) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Overview
These changes mainly revolve around adding in the error screen ui (takes a big portion of the lines added so pr might seem quite long), but in order to implement the Figma designs, some of the current workflows had to be reworked. Specifically, the
CompareMenuslogic and theMenuPickerSheetViewControllerhad to be reworked because neither worked in the error state and both were supposed to work according to the design. Some key areas where error screens are implemented are theHomeViewController(when no eateries are being loaded or all of them have no items),MenusViewController(when no upcoming menus are being loaded),EateryModelController(when menu is not being loaded), andCompareMenusViewController(when at least one of the menus being compared produces an error screen).Changes Made
HomeViewControllerAdd Inline Error UI for Empty States
buildEmptyStateView()to match the new error UI across the app.EateryModelControllerAdd full error-screen UI for networking failures
Networking.default.loadEateryreturns nil, the controller now:MenuHeaderViewwith the correct selected day instead of always defaulting to “Closed Today.”addMenuFromState()now distinguishes between networking failure and “Closed Today” caseTreat “menu exists but has zero items” as empty
Add support for
selectedCanonicalDaypicker.selectedCanonicalDayMenusViewControllerMenus automatically reload when the user changes filters or the selected day
MenuPickerSheetFolderKeep the “Change Date” and “Show Menu” flows consistent
Update how empty-menu days are handled in the controller
Expose the selected day from the sheet
selectedCanonicalDay) so the controller can read the user-selected day.EateryModelControllerto know which day the user tapped even when no menus exist.CompareMenusFolderNew delegates for menu-load failures
CompareMenusPageViewControllerDelegateCompareMenusEateryViewControllerDelegateCompareMenusEateryViewControllerto bubble up so the top-levelCompareMenusViewControllercan show an inline error screen.Update networking logic
Task { [weak self] in ... }ensuring UI builds instantly, eateries load asynchronously, and the table updates after networking completesAdd inline error screen
showInlineError()function toCompareMenusViewControllerCompareMenusEateryViewControllerDelegatereports the error to its parentCompareMenusPageViewControllerforwards the failure throughCompareMenusPageViewControllerDelegateCompareMenusViewControllerreplaces the UI with the red error block and messageTest Coverage
Screenshots
Compare Menus
Eatery Model
Upcoming Menus