-
Notifications
You must be signed in to change notification settings - Fork 3
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
Allow Users to Hide Weekend Days #11
Open
dathbe
wants to merge
14
commits into
evanhsu:main
Choose a base branch
from
dathbe:weekend
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains 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
change "meal-description" to either "breakfast-description" or "lunch-description" depending on meal type.
replace "meal-description" with both "breakfast-description" and "lunch-description"
Testing conditional based on dayMenu.label
Add config variable to choose whether to display weekends; do not add entries if it is a weekend
Try to add additional days if one of the days is a weekend
comment out adding days for testing
uncomment from previous commit
Added showWeekends config variable and description
If Today/Tomorrow do not have a lunch menu, do not display (rough approximation for Today/Tomorrow being a weekend)
Add check for no breakfast too
Add missing &&
Also hide "Today" and "Tomorrow" if there is no menu for those days (rough approximation for those days being weekends)
5 > 7 days
I've also changed it so that the max number of days to display is increased from 5 to 7 so that 5 weekdays can be displayed. This is sort of related to the weekend thing because without this change and if the weekends are set not to display, the number of displayed days fluctuates from 3-5 depending on what day of the week it is. |
Change documentation to note change to allow 7 days
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.
I've updated the code to add a variable that allows users to set whether they want to
showWeekends
in their configs, and updated the README accordingly. Default is the current behavior of showing weekend days.Note: I believe this will also incorporate the changes from PR #10 because I built off that branch. So please make sure you have either merged that PR (or want to) before merging this one.