Skip to content
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

CalendarItemFilter Part 1 #163

Merged
merged 4 commits into from
Nov 5, 2016
Merged

CalendarItemFilter Part 1 #163

merged 4 commits into from
Nov 5, 2016

Conversation

louietyj
Copy link

@louietyj louietyj commented Nov 5, 2016

Completely untested code. Does the code make sense?

We need separate filters for Tasks and Events unless we return a List which will be messy. So the controller will need to do four steps:

  1. getFilterTokenDefinitions, and use it to tokenize input
  2. parseIsTaskEvent, and use it to decide whether to process tasks / events / both
  3. Process tasks using filterTasks
  4. Process events using filterEvents

Reason for so many steps is that if step 3 or 4 go wrong, controller's renderDisambiguation needs a lot of contextual information to do anything sensible. (1) allows the controller to populate the natural dates, and (2) allows the controller to autocomplete "task" or "event".

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.7%) to 51.491% when pulling 4cb7cbe on filter-concern into 44f205a on master.

Copy link

@irvinlim irvinlim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Though we still need to test it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants