-
Notifications
You must be signed in to change notification settings - Fork 19
added logic to display next days menu (if available) after 21 #1760
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. ❌ Your project check has failed because the head coverage (60%) is below the target coverage (70%). You can increase the head coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## develop #1760 +/- ##
=======================================
Coverage 60% 60%
=======================================
Files 2 2
Lines 81 81
=======================================
Hits 48 48
Misses 33 33 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR implements automatic tab advancement in the restaurant menu view for evening hours. After 21:00 (9 PM), the app will display the next day's menu by default, improving user experience by showing more relevant information. A special exception is made for Sunday evenings to avoid showing Monday's menu when the weekly menus aren't yet available.
Key Changes:
- Extracted initial tab index calculation into a dedicated
_getInitialIndex()static method - Added logic to advance to the next day's tab when the current time is 21:00 or later
- Implemented Sunday exception to prevent wrapping from Sunday to Monday
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
pedroafmonteiro
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good to me. thanks!
simaopsbarbosa
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is working very well, and your logic is solid i think!
when i suggested this feature, i was thinking more about the favorite restaurants module on the home page, which is where i personally check the meals most often. i think it would be nice to see this change there too! maybe with a label saying something like "tomorrow's meals" just to clarify.
what do you think? maybe we can discuss this better with the team in tomorrow's meeting
great work!
|
@simaopsbarbosa nice catch! and yes I agree. maybe just a simple message as suggested in the pr that is supposed to clarify the lectures better in the home screen |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 5 out of 8 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Closes #1754
Description
Updated the
TabControllerProviderinitialization logic to improve the user experience during evening hours.Logic Changes:
Steps to Replicate
To verify this behavior, you can either modify
_getInitialIndexintab_controller_provider.dartwith a hardcodedDateTimeor change your emulator/device system time.Scenarios to test:
Review checklist
View Changes
Performance