-
Notifications
You must be signed in to change notification settings - Fork 37
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
OGM-529 Can select whole month from a button in the Calendar #1323
Conversation
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.
Please add the change on the UNRELEASED.md file
This may need rebasing |
48c6b66
to
2130e77
Compare
BOOL previousMultiSelectionConfiguration = self.calendarView.allowsMultipleSelection; | ||
self.calendarView.allowsMultipleSelection = YES; |
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.
What will allowsMultipleSelection do when we set it to YES in this function? It feels like a bit of a 'hack' considering we restore it at the end of the function.
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.
Ok, I've just realised I marked as resolved this question when it wasn't 🤦♂️
Yes, this is a hack, but it's the only way I could find to mark the whole month as selected when the selection configuration is simple (only one date can be selected), without this hack the only date marked as selected in single selection configuration is the last day of the month.
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.
Makes sense to me, should we add a comment indicating that 'selecting whole month' does not take the calendar type into account?
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.
Sorry, I just saw this comment right now, after is merged 😵💫
But yes, I think it makes sense, too.
Backpack/Calendar/Classes/BPKCalendarSelectionConfigurationMultiple.h
Outdated
Show resolved
Hide resolved
…it with unit testing.
…ar's `superview`.
… so they accept `wholeMonthTitle` as parameter.
Implement the presenter with a lazy getter in case it's not injected from the outside.
…o it reflects the design.
…hat highlighting logic under `wholeMonthSelection`.
…m the `selectionConfiguration`.
Co-authored-by: Gert-Jan Vercauteren <[email protected]>
…tiple.h Co-authored-by: Gert-Jan Vercauteren <[email protected]>
…to indicate it's a boolean.
… whole month selection.
…, last day and number of days of a given month.
…the array is empty.
62130ca
to
71c4f08
Compare
We want to implement Whole Month searches, for a given origin/destination pair.
![image](https://user-images.githubusercontent.com/13312014/172327873-df64d9ce-b6e3-473a-abc7-5d143eb54bdd.png)
In order to allow users to perform flights searches for a whole month, we need a "Search whole month" button to the date selection header UI.
NOTE: There is still some work to do related to the selection highlighting. That will be covered in another PR (since that work belongs to another ticket OGM-530).
Remember to include the following changes:
UNRELEASED.md
(to be included in the last PR).README.md
(to be included in the last PR).Backpack.h
header fileIf you are curious about how we review, please read through the code review guidelines